Mirror Replication Agent uses a mirrored copy of the native transaction log maintained by the primary database to obtain transactions.
For Oracle: The Mirror Replication Agent for Oracle creates user tables in
the primary database to support its 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 primary database. 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 primary database objects, you can specify the object name prefix string that will be used to name the primary database 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 object 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 primary database objects in the primary database. If you
change the value of pdb_xlog_prefix after
you create the primary database object, Mirror Replication Agent will not find
the objects that use the old prefix.
Initializing a Mirror Replication Agent primary database
Log in to the Mirror Replication Agent administration port.
Define a prefix that uniquely identifies the Mirror Replication Agent primary database 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 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 primary database:
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 primary database objects.
For Oracle: 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. See the Mirror Replication Agent Reference
Manual.
For ASE: 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 database, you must
not allow any DDL operations in the primary database before it is
quiesced later in the setup procedure.
For Oracle: 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: 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_min, supplemental_log_data_pk, supplemental_log_data_ui from v$database
For Oracle: 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.
The primary database objects must be created before
any objects can be marked for replication in the primary database.
Verify that the Mirror Replication Agent primary database objects were created:
ra_helpsysinfo
When you invoke the ra_helpsysinfo command, Mirror Replication Agent returns a list of the primary database objects in the primary database if initialization completed successfully. If no information is returned, the primary database objects do not exist in the primary database.