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

[RMAN] whether to use RMAN to restore the directory

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

Share

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

1. Recovery Catalog Overview

When there is no recovery catalog, the backup information related to RMAN, such as archive file path, backup set path, etc., is stored in the control file of the target database. However, considering that the control file cannot grow indefinitely, and the control file is not only used to store information related to backup, thus RMAN also has a special storage place for backup information, which is the recovery catalog. When the database to be backed up is registered in the recovery catalog, much more detailed information is stored in the recovery catalog than in the control file (which is actually only partially saved).

2. Recovery Directory Creation

1) Create a separate table space

SQL> create tablespace rmancatalog datafile '/u01/app/oracle/oradata/orcl/rman01.dbf' size 50m;

Be careful not to create a recovery catalog on the target database to be backed up.

(2) Create a separate CSHEMA to record backup information and grant related permissions

SQL> grant connect,resource,recovery_catalog_owner to rmanct identified by rmanct;

(3) Connect to the newly created recovery catalog through RMAN

$ rman catalog rmanct/rmanct

(4) Create CATALOG in RMAN

RMAN> create catalog tablespace rmancatalog;

At this point, the recovery catalog has been created, and a recovery catalog database can serve multiple databases at the same time, but it needs to be registered in the recovery catalog before performing a backup using the recovery catalog

3. Restore the database registered in the directory

(1) Connect to target database and restore catalog in catalog mode

$ rman target / catalog rmanct/rmanct@orcl

(2) Registration database

RMAN> register database;

After that, the operation information will be stored in the storage directory.

4. Unregister database

RMAN> unregister database;

5. Do you want to use recovery directories

Recovery catalog is only an optional option in RMAN, not a required option. Whether backup information is recorded in CATALOG depends on whether CATALOG is connected during RMAN operation. That is to say, even if the target database has been registered in recovery catalog and is not connected in CATALOG mode during connection, backup information is still stored only in control file.

If the DBA has a large number of Oracle databases to manage, it is recommended that you use a recovery catalog for backups of those databases. However, DBAs only manage one or several databases, it is not recommended to use recovery directories, do not give yourself trouble.

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