IG='DG_CONFIG=(chicago,boston)'
CONTROL_FILES='/arch1/chicago/control1.ctl', '/arch2/chicago/control2.ctl'
LOG_ARCHIVE_DEST_1='LOCATION=/arch1/chicago/ VALID_FOR=(ALL_LOGFILES,ALL_ROLES)
DB_UNIQUE_NAME=chicago'
LOG_ARCHIVE_DEST_2='SERVICE=boston LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)
DB_UNIQUE_NAME=boston'
LOG_ARCHIVE_DEST_STATE_1=ENABLE
LOG_ARCHIVE_DEST_STATE_2=ENABLE
REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE
LOG_ARCHIVE_FORMAT=%t_%s_%r.arc
LOG_ARCHIVE_MAX_PROCESSES=30
These parameters control how redo transport services transmit redo data to the standby system and the archiving of redo data on the local file system. Note that the example specifies theLGWRprocess and asynchronous (ASYNC) network transmission to transmit redo data on theLOG_ARCHIVE_DEST_2initialization parameter. These are the recommended settings and require standby redo log files (seeSection 3.1.3,"Configure a Standby Redo Log"on page 3-2).Example 3–4shows the additional standby role initialization parameters on the primary database. These parameters take effect when the primary database is transitioned to the standby role.
Example 3–4 Primary Database: Standby Role Initialization Parameters(当chicago变为standby的时候就用下面的参数,这个时候boston是主库,chicago是备库,所以(先主备)DB_FILE_NAME_CONVERT=’boston’,’chicago’
FAL_SERVER=boston
FAL_CLIENT=chicago
DB_FILE_NAME_CONVERT=
'/u01/app/oracle/oradata/boston','/u01/app/oracle/oradata/chicago'
LOG_FILE_NAME_CONVERT= '/arch1/boston/','/arch1/chicago/','/arch2/boston/','/arch2/chicago/'
STANDBY_FILE_MANAGEMENT=AUTO
Specifying the initialization parameters shown in Example 3–4 sets up the primary database to resolve gaps, converts new datafile and log file path names from a new primary database, and archives the incoming redo data when this database is in the standby role. With the initialization parameters for both the primary and standby roles set as described, none of the parameters need to change after a role transition. The following table provides a brief explanation about each parameter setting shown in Example 3–3 andExample 3–4.
Parameter Recommended Setting
DB_NAME Specify an 8-character name. Use the same name for all standby databases.
DB_UNIQUE_NAME Specify a unique name for each database. This name stays with the database and
does not change, even if the primary and standby databases reverse roles.
LOG_ARCHIVE_CONFIG Specify theDG_CONFIGattribute on this parameter to list theDB_UNIQUE_
NAME of the primary and standby databases in the Data Guard configuration;
this enables the dynamic addition of a standby database to a Data Guard
configuration that has a Real Application Clusters primary database running in
either maximum protection or maximum availability mode. By default, the
LOG_ARCHIVE_CONFIG parameter enables the database to send and receive
redo; after a role transition, you may need to specify these settings again using
theSEND,NOSEND,RECEIVE, orNORECEIVEkeywords.
CONTROL_FILES Specify the path name for the control files on the primary database.
Example 3–3 shows how to do this for two control files. It is recommended that
a second copy of the control file is available so an instance can be easily restarted after
copying the good control file to the location of the bad control file.
LOG_ARCHIVE_DEST_n Specify where the redo data is to be archived on the primary and standby
systems. InExamp