Get the App
SLTechnology News&Howtos  ›  Database  › 

The use of RMAN (5)

Shulou Source: shulou.com Published: 2022-06-01 05:50:27 10月04日 Update

XIII. Restoration of Contents

The recovery catalog database is used to store information from the RMAN repository in place of control files.

First create the recovery catalog database. The recovery catalog database can be on the same database as the target database or on a different database.

1. Create a table space for the recovery catalog database

SQL> create tablespace tbs_hfml datafile '/u01/app/oradata/orcl/tbs_hfml01.dbf' size 500m;

2. User who created the recovery catalog database

SQL> create user hfml identified by hfml

default tablespace tbs_hfml

temporary tablespace temp;

3. Grant permissions to restore directory database users

SQL> alter user hfml quota unlimited on tbs_hfml;

SQL> grant recovery_catalog_owner to hfml;

SQL> grant connect,resource to hfml;

4. Connect Recovery Catalog Database

If the recovery catalog database can be in the same database as the target database, automatically connect the target database when connecting the recovery catalog database.

[oracle@oracle11g ~]$ rman catalog hfml/ hfml

If the recovery catalog database is not in the same database as the target database, you need to connect to the target database after connecting the recovery catalog database.

RMAN> connect target system/ hfml @mubiao

They can also be executed together on a single command.

RMAN> connect catalog hfml/ hfml @orcl target hfml/ hfml@mubiao

5. Create Recovery Catalog

RMAN> create catalog tablespace tbs_hfml;

6. Register the target database in the recovery catalog

[oracle@oracle11g ~]$ rman target hfml/ hfmlcatalog hfml/lijian

RMAN> register database;

7. synchronous recovery directory

RMAN> resync catalog;

Tags: Data database directory target information user different information base command file space empowerment previous synchronization storage control Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Xiaomi Redmi MySQL Docker