Returns the names of transaction log base objects, creates transaction log base objects in the primary database, or removes transaction log base objects from the primary database.
pdb_xlog [create|remove [, force]]
The keyword for creating a transaction log.
The keyword for removing a transaction log.
A keyword that refers to the remove operation.
When pdb_xlog is invoked with no argument, it returns the actual names (not synonyms or aliases) of all Replication Agent transaction log base objects in the primary database.
See the appendix for your specific primary database
server at the end of this book for more information on transaction
log object names.
If pdb_xlog is invoked with no argument and the Replication Agent transaction log base objects do not exist in the primary database, the pdb_xlog command returns no information.
When pdb_xlog is invoked with the create keyword, Replication Agent does the following:
Generates a SQL script that creates the tables and procedures required for the transaction log base objects in the primary database.
Saves the generated script in a file called create.sql in the rax-12_5\inst_name\scripts\xlog directory, where inst_name is the name of the Replication Agent instance.
If the value of the pdb_auto_run_scripts configuration
parameter is false, the create.sql script
will be saved but not executed automatically. When the value of
the pdb_auto_run_scripts configuration
parameter is false, you must manually execute
the transaction log creation scripts.
Executes the script to create the Replication Agent transaction log base objects in the primary database (if the value of the pdb_auto_run_scripts configuration parameter is true).
After the script completes successfully, moves the create.sql file to the rax-12_5\inst_name\scripts\xlog\installed directory.
If the create script fails, it is stored in a file (create.sql) in the rax-12_5\inst_name\scripts\xlog directory and the transaction log is not created. You can examine the script by viewing the create.sql file.
If pdb_xlog is invoked with the create keyword and transaction log base objects already exist in the primary database (using the prefix string specified by the pdb_xlog_prefix configuration parameter), then pdb_xlog returns an error message.
When pdb_xlog is invoked with the remove keyword, Replication Agent does the following:
Generates a SQL script that deletes the tables and procedures required for the transaction log base objects in the primary database.
Saves the generated script in a file called remove.sql in the rax-12_5\inst_name\scripts\xlog directory, where inst_name is the name of the Replication Agent instance.
If the value of the pdb_auto_run_scripts configuration
parameter is false, the remove.sql script
will be saved but not executed automatically. When the value of
the pdb_auto_run_scripts configuration
parameter is false, you must manually execute
the transaction log removal scripts.
Executes the script to delete the transaction log base objects in the primary database (if the value of the pdb_auto_run_scripts configuration parameter is true).
After the script completes successfully, moves the remove.sql file to the rax-12_5\inst_name\scripts\xlog\installed directory.
If the remove script fails, it is stored in a file (remove.sql) in the rax-12_5\inst_name\scripts\xlog directory and the transaction log is not deleted. You can examine the script by viewing the remove.sql file.
When pdb_xlog is invoked with the remove keyword followed by the force keyword, the remove.sql script continues executing, even if errors occur. The force keyword may be useful when a previous remove operation failed and the remove.sql script terminated with an error.
If pdb_xlog is invoked with the remove keyword and transaction log base objects do not exist in the primary database (using the prefix string specified by the pdb_xlog_prefix configuration parameter), then pdb_xlog returns an error message.
If pdb_xlog is invoked with the remove keyword and any objects in the primary database are still marked for replication, then pdb_xlog returns an error message.
You can use the pdb_setrepproc and pdb_setreptable commands to determine which stored procedures and tables in the primary database are still marked.
Even if objects are marked in the primary database, you can use the pdb_xlog command with the remove keyword followed by the force keyword to unmark any marked objects and then remove the transaction log objects.
If pdb_xlog is invoked with no argument, the command is valid when the Replication Agent instance is in either Admin or Replicating state.
If pdb_xlog is invoked with either the create or remove keyword, the command is valid only when the Replication Agent instance is in the Admin state.
For more detailed information about the Replication Agent transaction log components and structure, see the appendix for your specific primary database server at the end of this book.
pdb_setrepcol, pdb_setrepproc, pdb_setreptable, ra_config