Mirror Replication Agent uses the native transaction log maintained by the primary database to obtain transactions.
The Mirror Replication Agent also creates a few user tables in the primary
database to support its operation.
Before you initialize a Mirror Replication Agent, the primary database must be quiesced. The following procedure includes that quiesing.
You must have set up connectivity between the Mirror Replication Agent instance
and the following Mirror Activator for Oracle system components:
Primary data server
Replication Server
RSSD
In addition, primary databases require you to perform specific setup tasks before you can initialize the Mirror Replication Agent transaction log. See Appendix C, “Mirror Replication Agent and Oracle Databases,” to verify that the required setup tasks have been performed for your primary database.
Before you create the Mirror Replication Agent transaction log base objects, you can specify the object name prefix string that will be used to name transaction log objects. You can set this prefix string to avoid conflicts with the names of existing database objects in your primary database.
The value of the pdb_xlog_prefix parameter is the prefix string used in all Mirror Replication Agent transaction log component names. Use the ra_config command to change the value of the pdb_xlog_prefix parameter.
Mirror Replication Agent uses the value of pdb_xlog_prefix to
find its transaction log objects in the primary database. If you
change the value of pdb_xlog_prefix after
you create the transaction log, Mirror Replication Agent will not find the transaction
log objects that use the old prefix.
To initialize a Mirror Replication Agent transaction log
Log in to the Mirror Replication Agent administration port.
To define a prefix that uniquely identifies the Mirror Replication Agent transaction log objects that you are creating, use the following command:
ra_config pdb_xlog_prefix, string
where string is a character string of one to three characters that will be used as a prefix for all database object names of the Mirror Replication Agent transaction log components created in the primary database.
The default value of the pdb_xlog_prefix parameter
is ra_. Unless this string poses a conflict
with existing database object names in your primary database, you
should use the default value.
To initialize the transaction log, use the following command:
pdb_init
By default, ra_init will
load the timezone information from Oracle's Home installation/oracore/zoneinfo/timezone.dat.
If the file is not accessed by Mirror Replication Agent, you will
need to configure the pdb_timezone_file configuration
property and specify the location of the timezone.dat
file. For more information, see Mirror Activator for Oracle Mirror Replication Agent Reference
Manual.
When you invoke the pdb_init command, the Mirror Replication Agent validates required settings in the primary database are correctly set to support replication, and creates objects in the primary database.
The pdb_init command validates that the following settings are true in the primary database:
Archiving of redo logs is enabled.
Automatic archiving of redo logs is disabled.
Supplemental logging of primary key and unique indexes is enabled.
If any of these settings is not set, the pdb_init command returns an error. The following Oracle SQL commands can be used to manually validate the settings:
The result from the following query should be "ARCHIVELOG" when archiving of redo logs is enabled:
select log_mode v$database
The result from the following query should be "FALSE" when automatic archiving of redo logs is disabled:
select value from v$system_parameter where name = “log_archive_start”
The results from the following query should both be "TRUE" when supplemental logging of primary key and unique indexes is enabled:
select supplemental_log_data_pk, supplemental_log_data_ui from v$database
If any adjustment to these settings is required, follow the instructions in the Oracle documentation for your database version on the proper commands to make these changes permanent in your environment.
Transaction log base objects must be created before
any objects can be marked for replication in the primary database.
To verify that the Mirror Replication Agent transaction log was created, use the following command:
ra_helpsysinfo
When you invoke the ra_helpsysinfo command, Mirror Replication Agent returns a list of the transaction log base objects in the primary database if initialization completed successfully. If no information is returned, the transaction log does not exist in the primary database.