Replication Agent uses the native transaction log maintained by the primary database to obtain transactions. To support replication, Replication Agent creates some objects in the primary database.
Before you initialize a Replication Agent that has an
RASD, the primary database must be quiesced. Only Replication Agent
for Oracle and Replication Agent for Microsoft SQL Server use an
RASD. The following procedure includes that quiesce.
Before you create the Replication Agent objects, you can specify the object name prefix string to be used to name the 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 Replication Agent object names. Use the ra_config command to change the value of the pdb_xlog_prefix parameter.
Replication Agent uses the value of pdb_xlog_prefix to
find its objects in the primary database. If you change the value
of pdb_xlog_prefix after you initialize
Replication Agent, Replication Agent is unable to find the objects that
use the old prefix.
Replication Agent requires you to perform specific setup
tasks at the primary database before you can initialize Replication
Agent. See the Replication Agent Primary Database Guide to
verify that the required setup tasks have been performed for your
primary database.
To initialize a Replication Agent
Log in to the Replication Agent administration port.
To define a prefix that uniquely identifies the Replication Agent transaction log you are creating, use the following command:
ra_config pdb_xlog_prefix, string
Here, string is a character string of one to three characters that is used as a prefix for all names of the Replication Agent objects 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 Replication Agent, use the following command:
pdb_xlog init
Replication Agent versions earlier than 12.6 use the pxb_xlog command
with the create keyword to initialize the Replication
Agent. This keyword has been retained for backward compatibility,
but the init keyword is the correct and preferred
syntax to be used with the pdb_xlog command.
When you invoke the pdb_xlog command with the init option, 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 Replication Agent objects in the primary database.
For Replication Agents that use an RASD, the RASD is initialized with information from the primary database.
Replication Agent must be initialized before any objects
can be marked for replication in the primary database.
To verify that the Replication Agent was initialized and that its objects were created in the primary database, use the following command:
pdb_xlog
When you invoke the pdb_xlog command with no options, Replication Agent returns a list of the objects in the primary database, if initialization completed successfully. If no information is returned, Replication Agent has not been initialized, and none of its objects exist in the primary database.
When the Replication Agent is initialized and both primary database and Replication Server connections are defined correctly, you can put the Replication Agent instance in Replicating state. See “Starting the Replication Agent” for more information about putting the Replication Agent in Replicating state.