In the new features of Oracle Database 12cR2 (12.2.0.1) DBCA can already be used to create dataguard on the standby side.
Below is the environment detail:
Type | Hostname | db_unique_name |
Primary | host01 | orclpri |
Standby | host02 | orclsby |
Enable force logging on primary.
SQL> alter database force logging; Database altered. SQL> select name,force_logging from v$database; NAME FORCE_LOGGING ————————— ————————————— orclpri YES
2. Create standby with DBCA. Assume we have listener is running on primary side.
[oracle@host02 ~]$ dbca -silent -createDuplicateDB -gdbName orclpri -primaryDBConnectionString host01:1521/orclpri -sid orclpri -createAsStandby -dbUniqueName orclsby Enter SYS user password: Listener config step 33% complete Auxiliary instance creation 66% complete RMAN duplicate 100% complete Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/orclsby/orclpri.log" for further details.
3. Standby Created successfully. Now we are going to login and check the roles.
[oracle@host02 ~]$ sqlplus / as sysdba SQL*Plus: Release 12.2.0.1.0 Production on Wed Aug 9 09:48:19 2017 Copyright (c) 1982, 2016, Oracle. All rights reserved.Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 – 64bit Production SQL> select database_role from v$database; DATABASE_ROLE ————————————— PHYSICAL STANDBY SQL> show parameter db_unique_name NAME TYPE VALUE —————————————— ———————– —————————— db_unique_name string orclsby
Standby will automatically create pfile, spfile & orapwdfile.
[oracle@host02 dbs]$ ll total 20 -rw-rw—- 1 oracle oinstall 1544 Aug 9 09:44 hc_orclpri.dat -rw-r—– 1 oracle oinstall 68 Aug 9 09:42 initorclpri.ora -rw-r—– 1 oracle oinstall 24 Aug 9 09:43 lkorclsby -rw-r—– 1 oracle oinstall 3584 Aug 9 09:42 orapworclpri -rw-r—– 1 oracle oinstall 3584 Aug 9 09:48 spfileorclpri.ora
Modify the tnsnames.ora on both sides.
orclpri = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = host01)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orclpri) ) ) orclsby = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = host02)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orclsby) ) )
Note: This feature only supports non-cdb database. You will get below error.
[FATAL] [DBT-16057] Specified primary database is a container database (CDB). CAUSE: Duplicate database operation is supported only for non container databases.
Stay Tuned for more detail on DG Broker Configuration.
Thank you for giving your valuable time to read the above information.
If you want to be updated with all our articles send us the Invitation or Follow us:
Skant Gupta’s LinkedIn: www.linkedin.com/in/skantali/
Joel Perez’s LinkedIn: Joel Perez’s Profile
Anuradha’s LinkedIn: Anuradha’s Profile
LinkedIn Group: Oracle Cloud DBAAS
Facebook Page: OracleHelp