The Replication Agent instance must be running and connectivity to the primary database must be established before you can create a transaction log. See “Starting a Replication Agent instance” for more information.
To create a Replication Agent transaction log in the
primary database
Log in to the Replication Agent administration port.
Use the pdb_xlog command to determine if a transaction log associated with this Replication Agent instance exists in the primary database:
pdb_xlog
If a transaction log does not exist for this Replication Agent instance, the pdb_xlog command returns no information about transaction log objects. Continue this procedure to create a transaction log in the primary database.
The pdb_xlog command looks
for transaction log components based on the current value of the pdb_xlog_prefix configuration
parameter. If the value of the pdb_xlog_prefix parameter
changed after a transaction log was created for a Replication Agent instance,
the pdb_xlog command will not find the
previously created transaction log.
If a transaction log already exists for this Replication Agent instance, the pdb_xlog command returns a list of the names of the transaction log database objects. If a transaction log exists, you need not complete this procedure.
If you want to use a particular string for the database object name prefix of the transaction log components, use the ra_config command to set the value of the pdb_xlog_prefix parameter:
ra_config pdb_xlog_prefix, XXX
where XXX is a one- to three-character string that will be the new value of the pdb_xlog_prefix parameter and the prefix string that will be used in the database object names of transaction log components when the transaction log is created. The default value of the pdb_xlog_prefix parameter is ra_.
The value of the pdb_xlog_prefix_chars parameter
specifies the non-alphabetic characters that are allowed in the
prefix string (the value of the pdb_xlog_prefix parameter).
The primary database server may restrict the characters that are
actually allowed to be used in database object names.
You can also use the ra_config command to determine the current value of the pdb_xlog_prefix parameter:
ra_config pdb_xlog_prefix
When you invoke the ra_config command and specify a parameter with no value, it returns the current value of the specified parameter.
Use the pdb_xlog command to create the Replication Agent transaction log:
pdb_xlog create
When you invoke the pdb_xlog command
with the create keyword, the command returns
an error message if a transaction log already exists in the primary
database using the prefix character string currently specified as
the value of the pdb_xlog_prefix parameter.
After you invoke the pdb_xlog command with the create keyword, Replication Agent generates a script that, when executed, creates the transaction log base objects in the primary database.
You can configure Replication Agent to simply build the script,
but not execute it, by setting the value of the pdb_auto_run_scripts parameter to false prior
to invoking the pdb_xlog command. To
complete the transaction log creation process, you have to manually
execute the script.
If the log creation script executes successfully, the script is stored in a file named create.sql in the rax-12_5\inst_name\scripts\xlog\installed directory.
If the log creation script does not execute successfully, the primary database is not changed and the script is stored in a file named create.sql in the rax-12_5\inst_name\scripts\xlog directory.