Oracle   Home  

 

Oracle Database 9i, 10g, 11g

Oracle Data Warehouse & BI

Oracle Applications EBS 11i, R12

 Oracle Middleware

SQL & PL/SQL

UNIX/ Linux

   Home  >  Oracle Database Administration (DBA)  >  Backup & Recovery  >  RMAN Catalog Maintenance

 

Oracle Database 10g Administration (DBA): Backup and Recovery

RMAN Catalog Maintenance

 

 

1. How to register a new database with the RMAN Catalog

 

To register a new database to the RMAN catalog we have to be connected to the RMAN catalog and to the new (target) database. After that we will use the REGISTER DATABASE; command. See below: 

 

During the database registration a full resynchronization is done automatically. 

 

 

2. Resynchronization of the Database

 

RMAN catalog must keep all the metadata information about the target database up-to-date. And every time some RMAN commands (like BACKUP & COPY) are executed the RMAN catalog is synchronized with the database (controlfile). 

 

There are 2 types of synchronization:

  • FULL : all the controlfile information is synchronize with the catalog

  • PARTIAL: the physical schema information (data files, tablespaces, online files) is not synchronized; the information about the backups and new archive log is synchronized. 

  When you run RESYNC CATALOG, RMAN creates a snapshot control file in order to obtain a read-consistent view of the  

  control  file, then updates the recovery catalog with any new information from the snapshot. The RESYNC CATALOG command  

   updates the classes or records described in the following table.

 

Record Type Description

Log history

Records that are created whenever a log switch occurs. Note that log history records describe an online log switch, not a log archival.

Archived redo logs

Records associated with archived logs that were created by archiving an online redo log, copying an existing archived redo log, or restoring backups of archived redo logs.

Backups

Records associated with backup sets, backup pieces, proxy copies, and image copies.

Physical schema

(Only in FULL SYNC)

Records associated with datafiles and tablespaces. If the target database is open, then rollback segment information is also updated.

 

 

3. Resetting a Database

 

When ALTER DATABASE OPEN RESETLOG is run a new database incarnation is created. This could be see in the V$DATABASE_INCARNATION view of the target database. 

 

>>  If this is done using RMAN, the RMAN will recognize the new database as a new one and will use this new incarnation number for the following backups/ restore. 

>>  If this is NOT done using RMAN, the RMAN will NOT recognize the new database as a new one. To let RMAN know that this is a new incarnation we have to reset the database using the command: RESET DATABASE;

 

If we want to restore backups of a prior incarnation of the database, we can use 

RESET  DATABASE TO INCARNATION <incarnation_number>; command.

 

 

4. Generate Reports & Lists

 

RMAN> list backup;    -> To list all backup sets, backup pieces

RMAN> list expired backup;  -> To identify those backups that were not found during a

                                                   crosscheck

RMAN> list backup by file;     ->  List Backup by File 

RMAN> list archivelog all; -> List all archived log files

RMAN> list backup summary;  -> Backups summary

 

For more information about LIST command click here.

 

RMAN> crosscheck backup;  -> check if the backup files exist physically on the disk

 

Use the need backup option to identify which datafiles need a new backup:

RMAN> report need backup days = 9 database; # needs at least 9 days of logs to recover
RMAN> report need backup days = 23 tablespace system;
RMAN> report need backup days = 12 datafile '/oracle/oradata/data_file_15.dbf';

 

If complete recovery of a datafile requires more than the specified number of incremental backups, then RMAN considers it in need of a new backup.

 

RMAN>  report need backup incremental = 3 database; 
RMAN>  report need backup incremental = 6 tablespace system;
RMAN>  report need backup incremental = 8 datafile '/oracle/oradata/data_file_15.dbf';

 

Use the obsolete option to identify which backups are obsolete because they are no longer needed for recovery. The redundancy parameter specifies the minimum level of redundancy considered necessary for a backup or copy to be obsolete (if you do not specify the parameter, redundancy defaults to 1).

 

RMAN>   report obsolete redundancy = 2;   -> Lists backups or copies that have at least 2 more recent backups or copies

 

For more information about REPORT command click here.

For more information about RMAN maintenace click here.

 

 

More information about  this subject ( RMAN Catalog Maintenance ) you can get from  www.in-oracle.com

 

 

 

Oracle Database 9i, 10g, 11g

Oracle Data Warehouse & BI Oracle Applications EBS 11i, R12  Oracle Middleware

SQL & PL/SQL

UNIX/ Linux

   Home  >  Oracle Database Administration (DBA)  >  Backup & Recovery  >  RMAN Catalog Maintenance

 

 

Different Romanian Links/ Linkuri romanesti diferite

  1. Invata limba engleza (Learn English language if you are Romanian)

  Doresti un proiect de arhitectura ieftin (pentru zonele Buzau, Bucuresti sau Prahova) ?

Disclaimer: The views expressed on this web site are my own and do not reflect the views of Oracle Corporation. You may use the information from this site only at your risk. Copyright (c) 2009-2011 Paul Catalin Tomoiu. All rights reserved.