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.
For Oracle, this command verifies permissions are valid for the Sybase Replication Agent to obtain system data from the primary database. It also checks the condition of the primary database to determine if archiving is turned on or off, and then loads the RASD with system data from the primary database.
Because the pdb_xlog create command
is deprecated, Sybase recommends that you use pdb_xlog
init.
pdb_xlog [[init |create | remove] [, force]] | move_truncpt]
The keyword for moving the truncation point to the end of the transaction log.
The keyword for creating a transaction log.
The keyword for removing a transaction log.
A keyword that refers to the remove or init operation.
A keyword that moves the truncation point for Oracle only.
pdb_xlog init 2048, 4096
This command creates the xlog base components, and specifies in the transaction log table an initial extent size of 2048 bytes and a next extent size of 4096 bytes.
When pdb_xlog is invoked with no option, it returns the actual names (not synonyms or aliases) of all Sybase Replication Agent transaction log base objects in the primary database. For Oracle, if you have initialized the Sybase Replication Agent, it returns the name of the component and the Oracle database instance name.
See the chapter for your specific primary data server
in the Sybase Replication Agent Primary Database Guide for
more information on Sybase Replication Agent object names.
If pdb_xlog is invoked with no option, and the Sybase Replication Agent transaction log base objects do not exist in the primary database, or the RASD has not been initialized (for Oracle), the command returns no information.
If pdb_xlog is invoked with the init keyword the truncation point is moved to the end of the log.
If pdb_xlog is invoked with the init, force keywords the truncation point is moved to the end of the log if the Replication Agent is not already initialized. However, if the Replication Agent is already initialized, the truncation point is not moved.
If pdb_xlog is invoked with the init, move_truncpt keyword the truncation point is moved to the end of the log (the current online Oracle redo log). The move_truncpt option has no effect if the Replication Agent has not been inialized.
To prevent Replication Server from requesting a log
starting point which occurs earlier in the log than the location
established by the move_truncpt option,
the Replication Server's LTM locator value for the primary connection
must be zeroed. Execute Replication Server System Database command rs_zeroltm against
the primary database connection to zero the LTM locator.
When pdb_xlog is invoked with the init keyword, Sybase Replication Agent does the following (not supported in Oracle):
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-15_0\inst_name\scripts\xlog directory, where inst_name is the name of the Sybase Replication Agent instance.
If the value of the pdb_auto_run_scripts configuration
parameter is false, the mark.sql script
will be saved but not executed automatically. To manually re-run
the script, you must first set pdb_auto_run_scripts to true and
then re-run the command.
Executes the script to create the Sybase 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-15_0\inst_name\scripts\xlog\installed directory.
For Oracle, the file is called partinit.sql and
is for informational purposes only. It can not be
manually executed.
If the create script fails, it is stored in a file (create.sql) in the RAX-15_0\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 init keyword, and transaction log base objects already exist in the primary database (using the prefix string specified by the pdb_xlog_prefix configuration parameter) or the RASD has been initialized (for Oracle), then pdb_xlog returns an error message.
When pdb_xlog is invoked with the remove keyword, Sybase Replication Agent does the following (not supported in Oracle):
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-15_0\inst_name\scripts\xlog directory, where inst_name is the name of the Sybase Replication Agent instance.
If the value of the pdb_auto_run_scripts configuration
parameter is false, the mark.sql script
will be saved but not executed automatically. To manually re-run
the script, you must first set pdb_auto_run_scripts to true and
then re-run the command.
If the value of the pdb_auto_run_scripts configuration
parameter is false, the mark.sql script
will be saved but not executed automatically. To manually re-run
the script, you must first set pdb_auto_run_scripts to true and
then re-run the command.
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-15_0\inst_name\scripts\xlog\installed directory.
For Oracle, the file is called partdeinit.sql and
is for informational purposes only. It can not be
manually executed.
If the remove script fails, it is stored in a file (remove.sql) in the RAX-15_0\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) or the RASD has not been initialized (for Oracle), 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. You also can use the pdb_setrepddl command to determine if DDL is enabled.
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 option, the command is valid when the Sybase Replication Agent instance is in either Admin or Replicating state.
If pdb_xlog is invoked with either the init or remove keyword, the command is valid only when the Sybase Replication Agent instance is in the Admin state.
For more information about the Sybase Replication Agent transaction log, see the chapter for your specific primary data server in the Sybase Replication Agent Primary Database Guide.