oracledba.help
Main

Data Guard

Data Guard Administration

Common Creation Tasks

  1. Prerequisites
  2. Primary Database Changes
  3. Network Changes
  4. RMAN Backup and File Copy
  5. Standby Database Changes: OMF | ASM
  6. Configure Broker
  7. Enable Flashback Database
  8. Add Database to Oracle-Restart (if used)

Specs used in examples:

 IP             Hostname   Role     db_name   db_unique_name  ORACLE_SID (Env Var)
 -------------- ---------  -------  --------  ---------------  --------------------
 192.168.56.101  lnx01     Primary  oradb     oradb            oradb
 192.168.56.102  lnx02     Standby  oradb     oradb_sb         oradb_sb
  • SB = Standby database system.
  • For RAC examples lnxsb is used for the SB host while lnx01 & lnx02 are the nodes.

Common Gotchas

  • Case
    Some names\passwords are now case sensitive so you may need to consider:
    • alter system set sec_case_sensitive_logon=false scope=both;
    • Creating the password file on Primary using ignorecase.
      orapwd file=$ORACLE_HOME/dbs/orapwMyDB password=mypw entries=10 force=y ignorecase=y
    • Check case and ownership of password file.
      ls -l $ORACLE_HOME/dbs/orapw*
    • Using lower case for all listener and tnsnames.ora entries.
    • For 12.2\18c add sqlnet.ora entry: SQLNET.ALLOWED_LOGON_VERSION_SERVER=11
      See Case-Insensitive Passwords
  • Flashback
    • If Flashback Database is not enabled, you will have to manually recreate your Primary as a Standby in a failover event to reinstate it. With multi-terabyte databases common and depending on the network connectivity between your primary and standby sites, this could end up being quite a lengthy process.
  • ORACLE_HOME
    • For RAC & Oracle-Restart the listener.ora static service entries must be the DATABASE ORACLE_HOME. Not GRID_HOME. Example: (ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/dbhome_1)
  • Password File (12c and earlier)
    • If a SYSDBA account password is changed (SYS) you have to recopy the password file to the Standby. It is not replicated.
    • Because of encryption changes, you might need to copy the password file from Primary rather than recreating it on the Standby.
  • Patches
    Don't even start to configure Data Guard unless you have applied the latest patches on both the Primary and SB.
  • PROFILE
    The PROFILE for SYS\SYSDBA may need to be less restrictive.
    • ALTER PROFILE default LIMIT PASSWORD_LIFE_TIME UNLIMITED;
    • ALTER PROFILE default LIMIT PASSWORD_REUSE_TIME UNLIMITED;
  • RAM
    • For 18c and later the Primary and SB OS must have at least 8gb RAM or more.
  • RMAN
    If the Primary is RAC and the SB is not:
    • You cannot use DUPLICATE TARGET DATABASE FOR STANDBY FROM ACTIVE DATABASE; option.
      There are too many mismatches in the parameter file between the two environments.
      Unless there is a way in an RMAN operation to ignore the unused RAC entries. TBD.
    • You can still use the standard DUPLICATE option though:
      DUPLICATE TARGET DATABASE FOR STANDBY NOFILENAMECHECK;

References