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

What is the difference between nocatalog and catalog in RMAN?

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

Share

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

Nocatalog mode: using control file as catalog, each backup will write a lot of backup information into the control file, and there will be more and more backup information in the control file, that is, the backup information of RMAN will be written in the local control file.

Catalog way: must first create a directory backup database (catalog, also known as knowledge base), establish a recovery directory, that is, the backup information of the database is written to the recovery directory.

The difference between nocatalog and catalog in RMAN

Nocatalog mode: using control file as catalog, each backup will write a lot of backup information into the control file, and there will be more and more backup information in the control file, that is, the backup information of RMAN will be written in the local control file.

-

Catalog way: must first create a directory backup database (catalog, also known as knowledge base), establish a recovery directory, that is, the backup information of the database is written to the recovery directory.

When backing up the Oracle database through rman nocatalog, Oracle uses controlfile to store the backup information of RMAN. Therefore, when backing up a database using Rman nocatalog, be sure to back up controlfile.

The initialization parameter control_file__record_keep_time sets the storage time of backup information, and the previous backup information is automatically cleared at the specified time:

SQL > alter sysem set control_file_record_keep_time=7 scope=spfile

-

When using Rman nocatalog to restore, the database is at least in the "mount" state, that is, the control file must be loaded first, otherwise RMAN cannot find the recorded backup information. The prerequisite for Oracle startup mount is that control must exist. Therefore, you must restore controlfile before restoring datafile. When using Rman catalog mode, you can startup nomount and then restore controlfile;, but when using Rman nocatalog, you must first restore controlfile as a file.

Let's compare the recovery steps of Rman nocatalog and Rman catalog to establish the correct backup strategy (the following restores are all backups in the online state):

Rman nocatalog recovery:

1) establish an oracle running environment (including init or sp files)

2) restore controlfile to the location specified in the init file (or start to NOMOUNT first and restore controlfile from autobackup in RMAN)

3) startup mount

4) Rman,restore datafile,recover datafile

5) alter database open resetlogs

Rman catalog recovery:

1) establish an oracle running environment (including init or sp files)

2) Rman, restore controfile

3) alter database mount

4) Rman, restore datafile,recover datafile

5) alter database open resetlogs

As you can see, when Rman nocatalog is backed up, controlfile must be backed up as a file.

In addition, because controlfile is used to store backup information when nocatalog, it is recommended to increase the CONTROL_FILE_RECORD_KEEP_ time value in the Oracle parameter file (default is 7 days), which is in $ORACLE_HOME/dbs/initSID.ora (9i may also be in spfile after 9i, and can only be changed through the Oracle statement).

The recovery directory (that is, catalog mode) supports the following commands

{CREATE | UPGRADE | DROP} CATALOG

{CREATE | DELETE | REPLACE | PRINT} SCRIPT.

LIST INCARNATION

REGISTER DATABASE

REPORT SCHEMA AT TIME

RESET DATABASE

RESYNC CATALOG

Www.2cto.com

1. Resync command

Resync can synchronize information between the database and the recovery directory, and in practice, rman can generally synchronize automatically.

Synchronization is required under the following circumstances

The change of physical structure of database

Data files are added or resized

Tablespace deletion

Creation and deletion of rollback segment

Every 10 archive logs are generated

2. Reset command

After the target database resetlogs, you need to reset the recovery directory. The Reset command is used to reset the recovery directory.

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