19c Container Database
19c Container Database
Purpose
This note outlines the steps to create an Oracle 19c Container Database via DBCA and then use the RMAN DUPLICATE command to create a physical
standby Container Database.
Data Guard Broker configuration steps are also shown in the note.
Environment
Primary database host: db22
Standby database host: db21
Primary CDB ORACLE_SID: crsacdb
Standby CDB ORACLE_SID: crsacdb
Primary CDB DB_UNIQUE_NAME: crsacdb
Standby CDB DB_UNIQUE_NAME: crsacdb_s
Data file location for Primary and Standby database is the same
Primary and Standby Listener: LISTENER_CRS on port 1512
oracle@db22:/opt/oracle/product/19.0.0/dbhome_1/bin$ ./dbca
Enter password:
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.7.0.0.0
File created.
oracle@db21:/opt/oracle/product/19.0.0/dbhome_1/network/admin$ vi listener.ora
SID_LIST_LISTENER_CRS =
(SID_LIST =
(SID_DESC =
(SID_NAME = crsacdb)
(ORACLE_HOME = /opt/oracle/product/19.0.0/dbhome_1)
(GLOBAL_DBNAME = crsacdb_s.intranet)
)
)
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=db21)(PORT=1512)))
STATUS of the LISTENER
------------------------
Add entries to tnsnames.ora (on BOTH primary and standby database servers)
CRSACDB.INTRANET =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = db22.intranet)(PORT = 1512) (SEND_BUF_SIZE = 10485760) (RECV_BUF_SIZE = 10485760))
)
(SDU = 65535)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = CRSACDB.intranet)
)
)
oracle@db21:/opt/oracle/product/19.0.0/dbhome_1/dbs$ vi initcrsacdb.ora
*.db_unique_name='crsacdb_s'
Enter password:
Connected to an idle instance.
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
RMAN> run {
allocate channel c1 type disk;
allocate channel c2 type disk;
allocated channel: c2
channel c2: SID=1462 device type=DISK
allocated channel: c3
channel c3: SID=3 device type=DISK
allocated channel: c4
channel c4: SID=246 device type=DISK
allocated channel: c5
channel c5: SID=489 device type=DISK
allocated channel: c6
channel c6: SID=731 device type=DISK
archived log for thread 1 with sequence 14 is already on disk as file /d_fra/acpt/CRSACDB_S/archivelog/2020_06_08/o1_mf_1_14_hfv9xj57_.arc
archived log for thread 1 with sequence 15 is already on disk as file /d_fra/acpt/CRSACDB_S/archivelog/2020_06_08/o1_mf_1_15_hfv9xjbl_.arc
archived log file name=/d_fra/acpt/CRSACDB_S/archivelog/2020_06_08/o1_mf_1_14_hfv9xj57_.arc thread=1 sequence=14
archived log file name=/d_fra/acpt/CRSACDB_S/archivelog/2020_06_08/o1_mf_1_15_hfv9xjbl_.arc thread=1 sequence=15
media recovery complete, elapsed time: 00:00:01
Finished recover at 08-JUN-20
DATABASE_ROLE OPEN_MODE
---------------- --------------------
PHYSICAL STANDBY MOUNTED
File created.
Database dismounted.
ORACLE instance shut down.
System altered.
System altered.
System altered.
System altered.
System altered.
System altered.
System altered.
System altered.
System altered.
System altered.
System altered.
SQL> alter database add standby logfile thread 1 group 4 size 200m;
Database altered.
SQL> alter database add standby logfile thread 1 group 5 size 200m;
Database altered.
SQL> alter database add standby logfile thread 1 group 6 size 200m;
Database altered.
Database altered.
SQL> alter database add standby logfile thread 1 group 4 size 200m;
Database altered.
SQL> alter database add standby logfile thread 1 group 5 size 200m;
Database altered.
SQL> alter database add standby logfile thread 1 group 6 size 200m;
Database altered.
SQL> alter database add standby logfile thread 1 group 7 size 200m;
Database altered.
System altered.
System altered.
System altered.
DESTINATION
--------------------------------------------------------------------------------
STATUS ERROR
--------- -----------------------------------------------------------------
VALID
CRSACDB_S
VALID
Configure parameters for Data Guard Broker (on BOTH primary and standby databases)
System altered.
oracle@db21:/opt/oracle/product/19.0.0/dbhome_1/network/admin$ vi listener.ora
LISTENER_CRS =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = db21)(PORT = 1512))
)
)
SID_LIST_LISTENER_CRS =
(SID_LIST =
(SID_DESC =
(SID_NAME = crsacdb)
(ORACLE_HOME = /opt/oracle/product/19.0.0/dbhome_1)
(GLOBAL_DBNAME = crsacdb_s.intranet)
)
(SID_DESC =
(GLOBAL_DBNAME = CRSACDB_S_DGMGRL.intranet)
(ORACLE_HOME = /opt/oracle/product/19.0.0/dbhome_1)
(SID_NAME = crsacdb)
)
)
oracle@db21:/opt/oracle/product/19.0.0/dbhome_1/network/admin$ lsnrctl reload listener_crs
oracle@db22:/opt/oracle/product/19.0.0/dbhome_1/network/admin$ vi listener.ora
LISTENER_CRS =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = db22.intranet)(PORT = 1512))
)
)
SID_LIST_LISTENER_CRS =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = CRSACDB_DGMGRL.intranet)
(ORACLE_HOME = /opt/oracle/product/19.0.0/dbhome_1)
(SID_NAME = crsacdb)
)
)
oracle@db22:/opt/oracle/product/19.0.0/dbhome_1/network/admin$ dgmgrl
DGMGRL for Solaris: Release 19.0.0.0.0 - Production on Mon Jun 8 11:15:30 2020
Version 19.7.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
Configuration Status:
SUCCESS (status updated 24 seconds ago)