You can specify database attributes using qualifiers on either of the following Replicate commands:
$ DBO/REPLICATE AFTER_JOURNAL START ORANOD::PARTS -
/STANDBY_ROOT=REMNOD::DISK$:[DIRECTORY}STANDBY_PARTS -
/SYNCHRONIZATION=HOT
$ rmu -replicate after_journal start ORANOD::MF_PERSONNEL \
> -standby_root=/hotdisk/STANDBY_PERSONNEL \
> -synchronization=hot
$ RMU/REPLICATE AFTER_JOURNAL START ORANOD::MF_PERSONNEL -The Hot Standby software saves the qualifier settings in the database root file (in this case, the database attributes are saved in the master database root file). The next time you start replication operations, you could enter the command line without the qualifier, as shown in the following Oracle CODASYL DBMS example:
/STANDBY_ROOT=REMNOD::STAMDBY_PERSONNEL -
/SYNCHRONIZATION=HOT
$ DBO/REPLICATE AFTER_JOURNAL START ORANOD::PARTSThe following examples show the header information from Oracle Rdb master and standby database root files.
Hot Standby...
- Database is currently being replicated
Master database is ``_$111$DUA15:[ORACLEUSER]MF_PERSONNEL.RDB;1''
Database is local to this node (``ORANOD'')
Replication commenced on 15-JUN-1996 09:36:05.16
Database replication is ``offline''
Server checkpoint interval is 100 messages
Server timeout interval is 5 minutes
Server buffer count is 256
Server 2PC transaction resolution is ``commit''
Hot Standby...
- Database replication is currently active
Standby database is ``_$111$DUA15:[ORACLEUSER]MF_PERSONNEL.RDB;1''
Database is local to this node (``STNDBY'')
Replication commenced on 15-JUN-1996 09:36:15.75
Synchronization obtained via no-quiet-point
Server checkpoint interval is 100 messages
Server wait interval is 5 minutes
Replication synchronization is ``cold''
DBO /Replicate After_Journal Configure database_rootfile
RMU /Replicate After_Journal Configure database_rootfile
rmu -replicate after_journal configure database_rootfile
The following lists show the qualifiers you can preset using the Replicate After_Journal Configure command:
The master database attributes are stored in the master database root file, and the standby database attributes are stored in the standby database root file. For example, if you use the Replicate After_Journal Configure command to preconfigure the master and standby database configurations and then invoke the Replicate After_Journal Start command on either a master or standby database node, the Hot Standby software:
Usage Notes
You cannot invoke the Replicate After_Journal Configure command when replication operations are active.
Example
The following examples show how to use the Replicate After_Journal Configure command to start replication on the master and standby database:Oracle CODASYL DBMS
$ DBO/REPLICATE AFTER_JOURNAL CONFIGURE ORANOD::PARTS -
/STANDBY_ROOT=REMNOD::STANDBY_PARTS -
/SYNCHRONIZATION=COLD -
/QUIET_POINT -
/CHECKPOINT=10 -
/CONNECT_TIMEOUT=1
Oracle Rdb on Digital UNIX
$ rmu -replicate after_journal configure ORANOD::MF_PERSONNEL \
> -standby_root=REMNOD::STANDBY_PERSONNEL \
> -synchronization=cold \
> -quiet_point \
> -checkpoint=10 \
> -connect_timeout=1
Oracle Rdb on OpenVMS
$ RMU/REPLICATE AFTER_JOURNAL CONFIGURE ORANOD::MF_PERSONNEL -
/STANDBY_ROOT=REMNOD::STAMDBY_PERSONNEL -
/SYNCHRONIZATION=COLD -
/QUIET_POINT -
/CHECKPOINT=10 -
/CONNECT_TIMEOUT=1
Replicate After_Journal Reopen_Output
Closes the current informational file and re-opens it as a new file. You can enter this command on either the master database node (to reopen the output file that records LCS information) or the standby database node (to reopen the output file that records LRS information).Format
Oracle CODASYL DBMS
DBO /Replicate After_Journal Reopen_Output master_rootfile
Rdb7 on OpenVMS
RMU /Replicate After_Journal Reopen_Output master_rootfile
Rdb7 on Digital UNIX
rmu -replicate after_journal reopen_output master_rootfile
Description
The Replicate After_Journal Reopen_Output command:
The Replicate After_Journal Reopen_Output command is useful when:
If the disk that contains the output file becomes full, the Hot Standby software stops writing information to the file and sends a message to the system operator. Note that replication operations continue, even when write I/O to the output file stops.
The Hot Standby software dynamically and transparently transitions from writing to the original output file to the new file. There is no need to stop or interrupt database replication operations during the transition to the new output file.
The new output file is written as follows:
The Replicate After_Journal Reopen_Output command is applicable only to the files that record activities for the LCS process or the LRS process. If you want to reopen or view the output file that records information about the ALS process, use the RMU Server After_Journal Reopen_Output command or the DBO Server After_Journal Reopen_Output command, as appropriate.
Reference: For more information about displaying ALS information, refer to the:
$ DBO /Replicate After_Journal Reopen_Output PARTS.ROO
$ rmu -replicate after_journal reopen_output mf_personnel.rdb
$ RMU /Replicate After_Journal Reopen_Output MF_PERSONNEL.RDB
DBO /Replicate After_Journal Start database_rootfile
RMU /Replicate After_Journal Start database_rootfile
rmu -replicate after_journal start database_rootfile
Starting Replication
You can start database replication while either the master database, the standby database, or both databases are online (open) and accessible for active use. There is no need to close either database in order to initiate database replication. The databases can process transactions during replication start up, as follows:
In addition, replication operations cannot start when these conditions exist:
For Oracle Rdb databases, you can also use the PRESTARTED TRANSACTIONS ARE DISABLED clause on the SQL IMPORT statement.
Reference: Appendix C discusses how to define the logical names and configuration parameters that are specific to the Hot Standby software.
Qualifier Usage
Some of the qualifiers for the Replicate After_Journal Start command are applicable only when you start replication operations on the master database node while others are applicable to the standby database node. The following lists categorize the qualifiers according to usage:
Note: Whenever you specify a qualifier on the Replicate After_Journal Start command line, you must also include the Master_Root or Standby_Root qualifier, as appropriate, on the command line. For example, to change the value of the Synchronization qualifier on a master database node, you must specify both the Synchronization and Standby_Root qualifiers, as shown in the following example:
$ DBO /Replicate After Start MF_PERSONNEL /Synch=Cold -
_$ /Standby=REMOTE::DISK$:[DIRECTORY]PARTS
Note: Do not include a node name when you specify the database_rootfile parameter. This parameter must specify a locally-accessible database root file; the parameter cannot include a remote file specification.
The following table describes which database root file to specify depending on where you enter the command. When you enter the Replicate After_Journal Start command:
Reference: See the Master and Standby qualifiers discussed later in this chapter.
You can use the optional Buffers qualifier to override the default number of buffers. For optimal performance, you should allocate a sufficient number of buffers so that the server process can roll the after-image journal records forward with a minimum number of I/O operations. To estimate an appropriate number of buffers, use the following equation:
(Number of Modified Buffers per Transaction * Number of Users) + 20%For example, if the average number of modified buffers per transaction is 10 and there are 100 users on the database, then the server process needs 1000 buffers (multiply 10 by 100) at any one time. To ensure that you have an adequate number of buffers, add another 20 percent (200 buffers) for a total of 1200 buffers.
Note: The LRS server ignores the Buffers qualifier if you defined global buffers on the standby database using either of the following methods:
Note that the replication servers on the standby database do not use buffer values defined by the following:
These automatic checkpoints advance the oldest active checkpoint indicator for the purpose of making older after-image journals available for backup operations. You cannot change or override these checkpoint intervals.
The default checkpoint interval usually is sufficient to effectively maintain synchronization between the master and standby database root files. However, you can override the default checkpoint interval by specifying the Checkpoint qualifier when you start replication on either the master database, the standby database, or both.
For example, if you specify the qualifier Checkpoint=300 on the standby database, the LRS server process updates the state information in the standby database root file after every 300 messages are exchanged between the master and the standby database.
The following describes how the frequency of the checkpoint operation can affect database synchronization. If you specify:
For Oracle Rdb databases, you can monitor the effectiveness of the current setting of the Checkpoint qualifier by using the RMU Show Statistic utility and examining the Checkpoint Information screen.
The Connect_Timeout qualifier is useful when you start replication operations on the master database before you start replication on the standby database. This is because the Connect_Timeout qualifier allows sufficient time for the network connection to be made before the LCS process begins sending after-image journal records across the network.
Note: While the LCS process on the master database waits for the replication activity to begin on the standby database, users and applications can continue to access and modify data in the master database.
Also, because the Connect_Timeout qualifier only waits for the network connection, you might consider using the Wait qualifier in addition to the Connect_Timeout qualifier. The Wait qualifier causes the Replicate After_Journal Start command to wait for the server processes to be activated. See the Wait qualifier later in this chapter for additional information.
To use the replication governor most effectively, ensure the Governor qualifier is Enabled and include the Synchronization=Cold qualifier when you start replication operations on the standby database. (Also, see the Synchronization qualifier discussed later in this section.)
Oracle Corporation recommends that you set the Synchronization qualifier to Cold mode. This setting is most effective because of the way the LRS process monitors its replication workload from the master database, as described in the following list:
Use the RMU or DBO Show Statistic utility on the master database to monitor the dynamically changing synchronization mode required by the actual work load, and compare that to the mode you specified with the Synchronization qualifier.
Recommendation: Oracle recommends that you do not use the Governor=Disabled setting until the replication performance is fairly well understood and constant. Severe performance deviations on the master database could result in stalling or stopping the database replication operations.
Reference: See Section 3.2 for more information about Hot Standby synchronization algorithms.
Log
NoLog
Indicates whether or not to log the status of, and information about, replication startup operations. This qualifer is:
Whereas the Log qualifier records information about the Replication After_Journal Start command, you also can include the Output qualifier to record information about replication activities performed by the LCS or LRS processes. Include the Output qualifier on the command line if you want to write operational information about the LCS or LRS server to an output file.
Reference: See the Output qualifier discussed later in this chapter.
The master and standby databases communicate using network communications (for remote database access) or interprocess communications (for local database access) according to how you specify the master database name. The following describes how the Hot Standby software chooses the method of communication:
The default setting (Noonline) disallows applications and users from attaching to the standby database during replication operations.
Note: If row caching is enabled on the standby database, the Hot Standby software assumes the Online setting. Because row caching requires the row cache server to be an online server, you cannot override the online setting. Specifying the Online qualifier on the Replicate After_Journal Start command line has no effect.
Because the Replicate After_Journal Start command fails if you enter it on a standby node where read/write transactions are in progress (including prestarted read/write transactions), the Oracle Corporation recommends that you choose the Nonline (default) setting.
Note: The server processes on the standby database cannot perform replication operations if any read/write transactions, including prestarted read/write transactions, are in progress. To disable the ability to prestart transactions, use the following:
The purpose of the operational log is to record the transmittal and receipt of network messages, and to provide administrative and diagnostic information.
Note the following when you specify the Output qualifier:
Alternatively, you can use a logical name or configuration parameter to specify an output log file.
Quiet_Point
NoQuiet_Point
Determines whether or not the log catch-up server (LCS) process acquires a transactional quiet-point during the database synchronization phase of the replication restart procedure. This qualifier is:
The Hot Standby software does not record the resolution of the prepared transaction in the standby database after-image journal. This is because there may not be enough available free space in the journal to write the commit or rollback records
Prior to starting replication operations on the master database, the standby database must be opened (manually) for access.
The master and standby databases communicate using network communications (for remote database access) or interprocess communications (for local database access) according to how you specify the database name. The following describes how the Hot Standby software chooses the method of communication:
If replication operations are not started on the standby database when you invoke the Replicate After_Journal Start command on the master database, the Hot Standby software attempts to start replication on the standby database using the default replication attributes configured in the database root file before starting replication on the master database.
For each level of database synchronization, you make a trade off between how closely the standby and master databases match each other in regard to committed transactions against performance.
For example, the Synchronization=Cold level provides the best performance for the master database, but the lowest level of master and standby database synchronization. However, in some business environments, this tradeoff might be acceptable. In the event of failover, it may be preferable to risk losing recent transactions to gain faster master database performance. Business models are such that the value of individual after-image journal records (transactions) are minimal, but the system throughput has greater financial importance and impact.
$ RMU/REPLICATE AFTER START MF_PERSONNEL -The following Replicate command initiates database replication on an Oracle CODASYL DBMS master database:
$ /MASTER=REMOTE::DISK$:[DIRECTORY]MF_PERSONNEL
$ DBO/REPLICATE AFTER START MF_PERSONNEL -The following Replicate command initiates database replication on an Oracle Rdb (Digital UNIX) database. The default qualifier values are read from the database root file header information.
_$ /STANDBY=REMOTE::DISK$:[DIRECTORY]PARTS
$ rmu -replicate after start mf_personnel
DBO /Replicate After_Journal Stop database_rootfile
RMU /Replicate After_Journal Stop database_rootfile
rmu -replicate after_journal stop database_rootfile
If the database is not manually opened on the node where you entered the RMU Replicate After_Journal Start command, you must enter the Replicate After_Journal Stop command on the node where the corresponding replication server is running or first open the database manually.
When replication operations stop, the Hot-Standby software automatically restarts the AIJ log server (ALS) processes on the standby node.