About

Martin Klier

usn-it.de

Create Oracle Data Guard Standby with DBCA

Demands of Automation

You can easily create an Oracle Data Guard Standby Database with the Database Configuration Assistant DBCA. That’s especially interesting if you have automation at work, and are not keen on configuring stuff all over the place. This is available in version 19c upwards.

DBCA uses RMAN DUPLICATE FOR STANDBY with an auxiliary database here, a technology that has been around for a while, and works flawlessly.

Preparation

You do not have to prepare much:

  • Oracle Home on the new host (or use an existing one)
  • Enable FORCE LOGGINF on primary
  • Create Standby Redo Logs (if your desired setup shall be a SYNC setup)
Example code:
ALTER DATABASE FORCE LOGGING;
alter database add standby logfile thread 1 group 7 size 52428800; 
alter database add standby logfile thread 1 group 8 size 52428800; 
alter database add standby logfile thread 1 group 9 size 52428800; 
alter database add standby logfile thread 1 group 10 size 52428800; 
alter database add standby logfile thread 1 group 11 size 52428800; 
alter database add standby logfile thread 1 group 12 size 52428800; 
alter database add standby logfile thread 1 group 13 size 52428800; 

Example Setup

$ORACLE_HOME/bin/dbca -silent \
 -createDuplicateDB -gdbName PDB19MT -sid PDB19MT \
 -createAsStandby -dbUniqueName PDB19MT2 -sysPassword secret \
 -primaryDBConnectionString mydbhost.mydomain.mytld:1521/PDB19MT \
 -datafileDestination +DATA -useOMF true -storageType ASM \
 -recoveryAreaDestination +FRA \
 -recoveryAreaSize 204800 -enableArchive true \
 -databaseConfigType SINGLE \
 -initParams DB_CREATE_ONLINE_LOG_DEST_1='+REDO1', DB_CREATE_ONLINE_LOG_DEST_2='+REDO2'

DB-Vorgang vorbereiten
22 % abgeschlossen
Listener config step
44 % abgeschlossen
Erstellen einer Auxiliary-Instanz
67 % abgeschlossen
RMAN-Duplikat
89 % abgeschlossen
Post-Datenbankduplizierungsvorgänge
100 % abgeschlossen

Third Control File

If you like to have a third control file, just adding “CONTROL_FILES=’+REDO1’\,’+REDO2’\,’+DATA'” as an init parameter does not work, you still have to add it the old-fashioned way (RMAN restore from <one of the other CFs>).

Thanks Franck Pachot for your old and yet underrated blog post which put me on track. 🙂

Stay SYNC and AFFIRM,
Martin

DOAG Konferenz 2021 Slides for Download
Symposium42 // SYM42

One thought on “Create Oracle Data Guard Standby with DBCA

  1. Be prepared, if you have a firewall running on your standby.
    DBCA starts a separate listener for the auxiliary instance on another port.
    So maybe consider to (temporarily) disable the firewall on your standby machine.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.