Recovery catalog creation for your database

Recovery catalog creation for your database

Create a catalog user

[oracle@orcl19x admin]$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Tue Nov 24 21:45:33 2020

Copyright (c) 1982, 2014, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> create user rcat identified by password;

User created.

grant permissions to user

SQL> grant recovery_catalog_owner to rcat;

Grant succeeded.
SQL> grant unlimited tablespace to rcat;

Grant succeeded.

Create tablespace for catalog and map it to rcat user

SQL> create tablespace rcat datafile '/apps01/oradata/orcl19x/rcattbs' size 500M;

Tablespace created.

SQL> alter user rcat default tablespace rcat;

User altered.

SQL> exit

Connect to recovery catalog with the user

create a catalog and register to the database

RMAN> connect catalog rcat/password;

connected to recovery catalog database

RMAN> create catalog;

recovery catalog created

RMAN> register database;

database registered in recovery catalog
starting full resync of recovery catalog
full resync complete

Crosscheck backup of the database to verify the catalog in action

RMAN> crosscheck backup;

allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=69 device type=DISK
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/data01/FRA/ORCL19X/backupset/2020_11_23/o1_mf_annnn_TAG20201123T184819_hvqfnw1r_.bkp RECID=1 STAMP=1057258100
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/data01/FRA/ORCL19X/backupset/2020_11_23/o1_mf_nnndf_TAG20201123T184835_hvqfod5s_.bkp RECID=2 STAMP=1057258116
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/data01/FRA/ORCL19X/backupset/2020_11_23/o1_mf_ncsnf_TAG20201123T184835_hvqfrg9h_.bkp RECID=3 STAMP=1057258214
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/data01/FRA/ORCL19X/backupset/2020_11_23/o1_mf_annnn_TAG20201123T185015_hvqfrhqh_.bkp RECID=4 STAMP=1057258215
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/data01/FRA/ORCL19X/backupset/2020_11_23/o1_mf_ncnnf_TAG20201123T185354_hvqfzf5d_.bkp RECID=5 STAMP=1057258437
Crosschecked 5 objects

Verify the databases registered with recovery catalog

SQL> conn rcat/password
Connected.

SQL> select * from rc_database;

    DB_KEY  DBINC_KEY       DBID NAME     RESETLOGS_CHANGE# RESETLOGS FINAL_CHANGE#
---------- ---------- ---------- -------- ----------------- --------- -------------
         1          2 4045524769 ORCL19X            1594143 22-NOV-20


Leave a Reply

%d bloggers like this: