Mirror Replication Agent uses the native transaction log maintained by the primary database to obtain transactions.
For Oracle only: The Mirror Replication Agents
for Oracle creates user tables in the primary database to support
their operation.
You must have set up connectivity between the Mirror Replication Agent instance and the following Mirror Activator system components:
Primary data server
Replication Server
RSSD
Primary databases require you to perform specific setup tasks before you can initialize the Mirror Replication Agent transaction log. See the Mirror Replication Agent Primary Database Guide 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.
Define a prefix that uniquely identifies the Mirror Replication Agent transaction log objects that you are creating:
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.
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, use
the default value.
Initialize the transaction log:
pdb_init
When you invoke the pdb_init command, the Mirror Replication Agent does the following:
Checks the primary database for compatible settings.
Generates a SQL script that is run in the primary database. This script creates the Mirror Replication Agent transaction log base objects.
For Oracle only: By default, pdb_init will
load the time zone information from Oracle, 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 the Mirror Activator Mirror Replication Agent Reference
Manual.
For ASE only: When you invoke the pdb_init command, the Mirror Replication Agent validates that required settings in the primary database are correctly set to support replication, and creates objects in the primary database. Initializing the primary database does the following:
Verifies that the primary database configuration is correct for the Mirror Activator system
Marks the primary database for replication (equivalent to executing sp_reptostandby in the primary database)
Sets the secondary truncation point to the end of the log
After you initialize the primary dabatase, you must not allow
any DDL operations in the primary database before it is quiesced
later in the setup procedure.
For Oracle only: The pdb_init command validates that the following settings are set to true in the primary database:
Archiving of redo logs is enabled.
Supplemental logging of primary key and unique indexes is enabled.
For Oracle only: If any of these settings is not set, the pdb_init command returns an error. The following 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 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
For Oracle only: If any adjustment to these settings is required, follow the instructions in the 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.
Verify that the Mirror Replication Agent transaction log was created:
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.