Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Detailed explanation of list and report commands of RMAN

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

I. list command

RMAN's list command is a way to query backup history information in a database control file or recovery directory.

1. List the counterpart

Command: list incarnation

Purpose: provide users with a list of database counterparts for each target database, and you can restore the database to a point in time before the last resetlogs command is executed.

Example:

RMAN > list incarnation of database

List of Database Incarnations

DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time

-

1 1 ORCL 1460865374 CURRENT 945184 12-JAN-1

In this example, you can see the counterpart that the database has. Where (the Inc keyword) is each counterpart's own key. The Status field column that lists the status of the counterpart. There are old counterparts (PARENT), current counterparts (CURRENT), and isolated counterparts (ORPHAN, restored after the resetlogs command). The reset SCN and reset time indicate when the database counterpart was created (this is why the reset SCN of the first entry is 1). This column is useful for restoring with the resetlog command and is easy to restore to the previous counterpart.

two。 List backup

2.1 Overview of available backups:

Rman > List backup summary

2.2 list backups by backup type

Rman > List backup by file

2.3 additional backup information

Rman > List backup

2.4 list backups suitable for recovery

Rman > List recoverable backup of database

2.5 list expired backup information

Rman > List expired backup

List expired backup of datafile 3 or list expired backup of archivelog all for expired archive log backups and automatic backup lists of control files / service parameter files.

2.6 list backups by tablespace name and data file number

Rman > list backup of tablespace users

Rman > list backup of datafile 3

2.7 list archive log backups

Rman > list archivelog all

Use the list backup of archivelog all command to view more detailed archive log backups.

2.8 list control files and server parameter file backups

Rman > list backup of controlfile

3. List copies of the image

List all copies of the image using list copy

3.1 list copies of data files

Rman > list copy of database

Check to see if there are tablespaces and data file copies of data files with: list copy of tablespace users

3.2 list archived redo logs

Rman > list copy of archivelog all

You can also list copies of redo logs for a specific archive by time, sequence, or database scn. Such as:

Rman > list copy of archivelog from sequence 35

Rman > list copy of archivelog from sequence 33 until sequence 35

3.3 list copies of control files

Rman > list copy of controlfile

II. Report command

RMAN's report command is used to determine the current recoverable state of the database and to provide specific information for database backups.

1. Report data files that have not been backed up recently

View tablespaces that have not been backed up in the last 3 days, such as:

Rman > report need backup days = 3

Generate reports based on the number of incremental backups that need to be applied, such as:

Rman > report need backup incremental = 3

2. Report backup redundancy or recovery window

Rman > report need backup redundancy = 2

Rman > report need backup recovery window of 2 days

3. Report the unrecoverable operation of the data file

Rman > report unrecoveable

4. Report database schema

The schema refers to the physical structure of the database. The schema includes the data file name, the data file number, the table space assigned to these data files, the size of the data file, and whether the data file contains rollback segments.

Rman > report schema

5. Report discarded backups

If the backup uses a save policy, the backup may be marked as discarded (OBSOLETE). Execute report obsolete at this time to see the discarded backup records

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report