Hello Readers,
In this article ,we will see how to a container database to the existing RMAN recovery catalog.
Please check below article before adding container database to RMAN Catalog.
Target Database : Catalog Database:
Name : AVMCDB(Container DB) Name: AVDEV
IP Address : 192.168.0.130 IP Address : 192.168.0.60
Follow below steps to add Container DB to Recovery Catalog
Target DB:
Check Container Database details
1 2 3 4 5 6 7 8 9 10 11 |
[oracle@oracle ~]$ sqlplus / as sysdba SQL*Plus: Release 12.1.0.2.0 Production on Thu Mar 4 00:02:58 2021 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> set linesize 300 SQL> Select name,Open_mode,CDB from V$database; NAME Open_MODE CDB ------- ------------- --------- AVMCDB READ WRITE YES |
Check pdbs list
1 2 3 4 5 6 7 8 9 |
SQL> sho pdbs CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 AVM1 READ WRITE NO 4 AVM5 READ WRITE NO 5 AVM3 READ WRITE NO 6 AVM4 READ WRITE NO 7 AVM6 READ WRITE NO |
Step 2 :
Create listener for CDB database
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
[oracle@oracle admin]$ vi listener.ora AVMCDB = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.50 )(PORT = 1561)) ) ) ) SID_LIST_AVMCDB = (SID_LIST = (SID_DESC = (SID_NAME = AVMCDB) (ORACLE_HOME =/u01/app/oracle/product/12.1.0/dbhome_1 ) ) ) |
Start the listener
1 |
[oracle@oracle admin]$ lsnrctl start AVMCDB |
Step 3 :
Create a backup directory to store rman Backup Files
1 |
[oracle@oracle ~]$ mkdir -p /u01/oradata/AVMCDB/AVMCDB/rmanbkp |
Catalog DB :
Step 4:
Prepare tnsnames.ora file
1 2 3 4 5 6 7 8 9 10 11 12 |
[oracle@oracle ~]$ cd /u01/app/oracle/product/12.1.0/dbhome_1/network/admin/ [oracle@oracle admin]$ vi tnsnames.ora to_AVMCDB = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.50)(PORT = 1561)) ) (CONNECT_DATA = (SID = AVMCDB) ) ) |
Check tnsping
1 2 3 4 5 6 7 8 |
[oracle@oracle admin]$ tnsping to_AVMCDB TNS Ping Utility for Linux: Version 12.1.0.2.0 - Production on 04-MAR-2021 00:11:56 Copyright (c) 1997, 2014, Oracle. All rights reserved. Used parameter files: /u01/app/oracle/product/12.1.0/dbhome_1/network/admin/sqlnet.ora Used TNSNAMES adapter to resolve the alias Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.50)(PORT = 1561))) (CONNECT_DATA = (SID = AVMCDB))) OK (10 msec) |
Step 5 :
Connect to RMAN catalog and check registered databases.
1 2 3 4 5 6 7 8 9 10 |
[oracle@oracle admin]$ rman catalog bco/bco target sys/sys@to_AVMCDB Recovery Manager: Release 12.1.0.2.0 - Production on Thu Mar 4 00:12:28 2021 Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved. connected to target database: AVMCDB (DBID=1216244104) connected to recovery catalog database RMAN> list db_unique_name all; List of Databases DB Key DB Name DB ID Database Role Db_unique_name ------- ------- ----------------- --------------- ------------------ 1 AVPROD 4020222652 PRIMARY AVPROD |
Note:
We have already registered Non -Container DB(AVPROD), now we are adding Container database to same Recovery Catalog..
Step 6 :
Use REGISTER DATABASE to register container database (AVMCDB)
1 2 3 4 |
RMAN> register database; database registered in recovery catalog starting full resync of recovery catalog full resync complete |
Database successfully Registerered.
Step 7:
Check Database registered lists using DB_UNIQUE_NAME ALL;
1 2 3 4 5 6 |
RMAN> list db_unique_name all; List of Databases DB Key DB Name DB ID Database Role Db_unique_name ------- ------- ----------------- --------------- ------------------ 1401 AVMCDB 1216244104 PRIMARY AVMCDB 1 AVPROD 4020222652 PRIMARY AVPROD |
Step 8:
Now take the full Container database backup using Recovery Catalog :
1 2 3 4 5 6 7 8 9 10 |
RMAN> run { allocate channel c1 type disk; allocate channel c2 type disk; configure backup optimization on; backup as compressed backupset database plus archivelog format '/u01/oradata/AVMCDB/AVMCDB/rmanbkp/%U.dkp'; configure backup optimization off; delete noprompt archivelog all backed up 1 times to disk completed before 'SYSDATE-1'; backup current controlfile format '/u01/oradata/AVMCDB/AVMCDB/rmanbkp/%U.bkp'; } |
Ouput log :
Click below to Download RMAN Container Backup Logfile:
Thank you for giving your valuable time to read the above information. Please click here to subscribe for further updates
KTEXPERTS is always active on below social media platforms.
Facebook : https://www.facebook.com/ktexperts/
LinkedIn : https://www.linkedin.com/company/ktexperts/
Twitter : https://twitter.com/ktexpertsadmin
YouTube : https://www.youtube.com/c/ktexperts
Instagram : https://www.instagram.com/knowledgesharingplatform