Returns replication marking status; unmarks all marked tables or a specified table; enables or disables replication for all marked tables or a specified table; marks a specified table for replication.
To return replication marking status:
pdb_setreptable [tablename|mark|unmark|enable|disable]
To unmark, enable or disable all tables:
pdb_setreptable all, {unmark[, force]|enable|disable}
To mark, unmark, enable, or disable a specified table:
pdb_setreptable tablename, {mark[, owner]| unmark[, force] |enable|disable}
To mark a specified table for replication with a replicated name:
pdb_setreptable tablename, repname, mark[, owner]
The name of a user table in the primary database.
The tablename parameter can be owner-qualified to include the primary table owner name, with each element separated by a period. For example:
owner.table
If you want to use owner-qualified table names for either
primary tables or replicate tables, you must set the value of the Replication Agent use_rssd parameter
to true.
This parameter can be delimited with quote characters to specify the character case.
If mixed case (uppercase and lowercase) is required, the name must be delimited. For example:
"Owner".table
"Owner"."Table"
Each mixed case element of the tablename parameter must be delimited separately, as illustrated in the previous example.
If you must use an object name case that does not match
the value of the ltl_character_case parameter,
the object name must be delimited.
If an object name contains any non-alphanumeric characters, such as spaces, periods, and so forth, it must be delimited with quote characters. For example:
"table name"
owner."table name"
If an object name contains a period, it must be both owner-qualified and delimited with quote characters. For example:
owner."table.name"
"table.owner"."table.name"
The name of the table specified in the replication definition for a primary table.
The replicated name (including the owner name) you specify
with the pdb_setreptable command must
match a table name specified by a with all tables named clause
in a replication definition for the primary database connection. The
Replication Agent pdb_setreptable command
cannot verify the existence of a valid replication definition, but
if it does not exist, replication from the primary table will fail.
The repname parameter can be owner-qualified to include the replicate table owner name, with each element separated by a period. For example:
repowner.reptable
If you want to use an owner-qualified replicate table
name with the replicate owner’s name, do not use
the owner keyword with the pdb_setreptable command.
If you use the owner keyword and specify a replicate
table name, the primary table owner name is sent with the replicate
table name in the LTL.
This parameter can also be delimited with quote characters to specify the character case. See the previous description of the tablename parameter for specifics.
A keyword that refers to all marked tables in the primary database. By using the all keyword, you can apply an unmark, enable, or disable operation to all marked tables.
A keyword that refers to replication marking.
When the mark keyword is the only option, the pdb_setreptable command returns a list of all marked tables in the primary database. When the mark keyword follows a table name (and optionally a replicated name), the pdb_setreptable command marks the specified table in the primary database.
A keyword that refers to the mark operation.
When the optional owner keyword follows the mark keyword, the pdb_setreptable command marks the specified table in the primary database so that when operations against that table are replicated, the primary table owner name is sent along with the table name in the form owner.tablename when LTL is sent to the primary Replication Server.
If you want to use owner-qualified table names for either
primary tables or replicate tables, you must set the value of the Replication Agent use_rssd parameter
to true.
If you want to use an owner-qualified replicate table
name with the replicate owner’s name, do not use
the owner keyword with the pdb_setreptable command.
If you use the owner keyword and specify a replicate
table name, the primary table owner name is sent with the replicate
table name in the LTL.
A keyword that refers to unmarking a marked table.
When the unmark keyword is the only option, the pdb_setreptable command returns a list of all tables in the primary database that are not marked for replication. When the unmark keyword follows a table name, the pdb_setreptable command removes replication marking for the specified table in the primary database. When the unmark keyword follows the all keyword, the pdb_setreptable command removes replication marking for all marked tables in the primary database.
A keyword that refers to the unmark operation.
When the force keyword follows the unmark keyword, the pdb_setreptable command immediately removes replication marking for the specified table in the primary database, without first checking the enable status of the table or checking for pending operations in the transaction log. When the force keyword follows the unmark keyword and the all keyword, the pdb_setreptable command immediately removes replication marking from all marked tables in the primary database, regardless of their enable status or any pending operations in the transaction log.
The force keyword also forces complete execution of the unmarking script, even if errors occur during the unmarking process. Normally, when errors occur during script execution, the script terminates immediately without completing. The force keyword can be useful when a previous script execution failed and left the unmarking operation incomplete.
When errors occur during a forced script execution, the pdb_setreptable command returns the following message:
Errors were encountered and ignored during FORCEd script execution. See error log for details.
A keyword that refers to enabling replication for marked tables.
When the enable keyword is the only option, the pdb_setreptable command returns a list of all marked tables in the primary database for which replication is enabled. When the enable keyword follows a table name, the pdb_setreptable command enables replication for the specified table in the primary database. When the enable keyword follows the all keyword, the pdb_setreptable command enables replication for all marked tables in the primary database.
A keyword that refers to disabling replication for marked tables.
When the disable keyword is the only option, the pdb_setreptable command returns a list of all marked tables in the primary database for which replication is disabled. When the disable keyword follows a table name, the pdb_setreptable command disables replication for the specified table in the primary database. When the disable keyword follows the all keyword, the pdb_setreptable command disables replication for all marked tables in the primary database.
pdb_setreptable authors
This command returns replication marking information for the table named authors in the primary database.
pdb_setreptable mark
This command returns replication marking information for all marked tables in the primary database.
pdb_setreptable disable
This command returns replication marking information for all marked tables for which replication has been disabled in the primary database.
pdb_setreptable all, unmark, force
This command forces unmarking for all marked tables in the primary database.
pdb_setreptable all, enable
This command enables replication for all marked tables in the primary database.
pdb_setreptable authors, mark
This command marks for replication the table named authors in the primary database.
pdb_setreptable authors, mark, owner
This command marks for replication the table named authors in the primary database so that the name of the primary table owner will be passed along with the table name in the LTL.
pdb_setreptable authors, auth_name, mark
This command marks for replication the table named authors in the primary database with a replicate name auth_name.
pdb_setreptable authors, auth_name, mark, owner
This command marks for replication the table named authors in the primary database with a replicate name auth_name so that the name of the primary table owner will be passed along with the replicate name in the LTL.
pdb_setreptable authors, bob.auth_name, mark
This command marks for replication the table named authors in the primary database with a replicate name auth_name so that the name of the replicate table owner (bob) will be passed along with the replicate name in the LTL.
pdb_setreptable authors, enable
This command enables replication for the marked table authors in the primary database.
pdb_setreptable table=mark, enable
This command enables replication for the marked table named mark in the primary database.
pdb_setreptable authors, unmark, force
This command forces unmarking for the marked table authors in the primary database.
When pdb_setreptable is invoked, its function is determined by the keywords and options you specify.
When multiple keywords and/or options are specified, each must be separated by a comma. Blank space before or after the comma(s) is optional. For example:
pdb_setreptable all, unmark, force
When you specify a primary table in the pdb_setreptable command, you must use the name of a valid primary table.
You cannot specify the following items as a primary table in the pdb_setreptable command:
Primary database system tables
Views
Replication Agent transaction log tables
If you specify an alias or synonym as a primary table in the pdb_setreptable command, the actual table that the alias or synonym refers to is acted upon. The actual table name is the table name sent to the primary Replication Server.
If a table name in the primary database is the same as a keyword, it can be identified by adding the string
table=
to the beginning of the table name. For example:
pdb_setreptable table=unmark, mark
This is true for both primary table names and replicated names.
When pdb_setreptable is invoked to mark a table for replication, trigger-based Replication Agents (for Informix, Microsoft SQL Server, and Oracle) do the following:
Generate a SQL script that creates the tables, procedures, and triggers required for the transaction log in the primary database.
Save the generated script in a file called mark.sql in the rax-12_5\inst_name\scripts\tablename directory, where inst_name is the name of the Replication Agent instance and tablename is the name of the table being marked.
If the value of the pdb_auto_run_scripts configuration
parameter is false, the mark.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 table-marking scripts.
Execute the script to mark the table and create the transaction log objects in the primary database (if the value of pdb_auto_run_scripts is true).
After the script completes successfully, move the mark.sql file to the rax-12_5\inst_name\scripts\tablename\installed directory.
If a user trigger exists on the table, modify the user trigger to add code that captures data and generates Replication Agent transaction log records.
If the mark script fails, it is stored in a file (mark.sql) in the rax-12_5\inst_name\scripts\tablename directory, the table is not marked, and transaction log objects are not created. You can examine the script by viewing the mark.sql file.
When pdb_setreptable is invoked to unmark a marked primary table, trigger-based Replication Agents (for Informix, Microsoft SQL Server, and Oracle) do the following:
Generate a SQL script that removes the tables, procedures, and triggers required for the transaction log in the primary database.
Save the generated script in a file called unmark.sql in the rax-12_5\inst_name\scripts\tablename directory, where inst_name is the name of the Replication Agent instance and tablename is the name of the table being unmarked.
If the value of the pdb_auto_run_scripts configuration
parameter is false, the unmark.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 table-unmarking scripts.
Execute the script to unmark the table and remove the transaction log objects in the primary database (if the value of pdb_auto_run_scripts is true).
After the script completes successfully, move the unmark.sql file to the rax-12_5\inst_name\scripts\tablename\installed directory.
If a user trigger existed on the table when it was marked, modify the user trigger to remove Replication Agent code that captures data and generates transaction log records.
If the unmark script fails, it is stored in a file (unmark.sql) in the rax-12_5\inst_name\tablename\scripts directory, the table is not unmarked, and the transaction log objects are not removed. You can examine the script by viewing the unmark.sql file. When the unmark script execution encounters a fatal error on any database object, the pdb_setreptable command returns the following message:
Could not unmark the following objects: ... See error log for details.
When you use the unmark keyword to remove replication marking from a primary table, the pdb_setreptable command verifies that replication is disabled for that table and checks to make sure that there are no pending (unprocessed) operations for that table in the transaction log. If replication is not disabled or there is a pending operation for that table in the transaction log, pdb_setreptable returns an error.
When you use the unmark keyword to remove replication marking from primary tables, you can also specify the force keyword to immediately remove replication marking from primary tables, without regard to whether replication is disabled or whether pending operations exist in the transaction log. The force keyword also ignores script execution errors. If the unmark script execution encounters a fatal error on any database object, the pdb_setreptable command returns the following message:
Could not unmark the following objects: ... See error log for details.
When pdb_setreptable is invoked with either no argument or a single argument, it returns marking information about the tables in the primary database.
If pdb_setreptable is invoked with no argument, it returns a list of all marked tables in the primary database.
Invoking the pdb_setreptable command
with no argument produces the same result as invoking the pdb_setreptable command with
the mark keyword.
If pdb_setreptable is invoked with a table name, it returns complete marking information about the specified primary table.
If pdb_setreptable is invoked with the mark keyword, it returns a list of all marked tables in the primary database.
If pdb_setreptable is invoked with the unmark keyword, it returns a list of all unmarked tables in the primary database.
If pdb_setreptable is invoked with the enable keyword, it returns a list of all marked tables in the primary database for which replication is enabled.
If pdb_setreptable is invoked with the disable keyword, it returns a list of all marked tables in the primary database for which replication is disabled.
Tables marked for replication are listed in the marked objects table. All other user tables are considered unmarked.
The Replication Agent transaction log tables and shadow tables
are not included in the list of unmarked tables. Also not included
are any synonyms, views, or aliases of these database objects.
For tables listed as unmarked or disabled, transactions will not be captured for replication.
When pdb_setreptable is invoked with the all keyword, the operation specified by the following keyword (unmark, enable, or disable) is applied to all marked tables in the primary database.
If pdb_setreptable is invoked with the all keyword and the unmark keyword, it removes replication marking from all marked tables in the primary database. You can also specify the force keyword after the unmark keyword to force immediate unmarking of all marked tables, or to unmark tables for which replication is still enabled or pending operations remain in the transaction log.
If pdb_setreptable is invoked with the all keyword and the enable keyword, it enables replication for all marked tables in the primary database.
If pdb_setreptable is invoked with the all keyword and the disable keyword, it disables replication for all marked tables in the primary database.
When pdb_setreptable is invoked with a valid primary table name followed by one or more keywords, the operation specified by the keyword (mark, unmark, enable, or disable) is applied to the primary table.
If pdb_setreptable is invoked with a table name and the mark keyword, it marks the specified table in the primary database for replication. You can also specify the owner keyword after the mark keyword so that when operations against the table are replicated, the primary table owner name will be attached to the table name in the form owner.tablename.
If you want to use owner-qualified table names for either primary
tables or replicate tables, you must set the value of the Replication Agent use_rssd parameter
to true.
If pdb_setreptable is invoked with a table name and the unmark keyword, it removes replication marking from the specified table in the primary database. You can also specify the force keyword after the unmark keyword to force immediate unmarking of the specified table, to unmark a table for which replication is still enabled or pending operations remain in the transaction log, or to force the script execution to ignore errors and continue an unmarking operation that failed previously.
If pdb_setreptable is invoked with a table name and the enable keyword, it enables replication for the specified marked table in the primary database. If the enable script execution encounters a fatal error on any database object, the pdb_setreptable command returns the following message:
Could not enable the following objects: ... See error log for details.
If pdb_setreptable is invoked with a table name and the disable keyword, it disables replication for the specified marked table in the primary database. If the disable script execution encounters a fatal error on any database object, the pdb_setreptable command returns the following message:
Could not disable the following objects: ... See error log for details.
If the table name you specify does not exist in the primary database, the pdb_setreptable command returns an error.
When pdb_setreptable is invoked with a primary table name and a replicated name, followed by the mark keyword, the primary table is marked for replication with the specified replicated name.
If the primary table name you specify does not exist in the primary database, the pdb_setreptable command returns an error.
By specifying a replicated name, transactions can be replicated to a table in the replicate database that has a different name from the primary table.
The replicated name you specify with the pdb_setreptable command must
match a table name specified by a with all tables named clause
in a replication definition for the primary database connection.
The Replication Agent pdb_setreptable command
cannot verify the existence of a valid replication definition, but
if it does not exist, replication from the primary table will fail.
You can also specify the owner keyword after the mark keyword so that when operations against the primary table are replicated, the primary table owner name will be attached to the replicate table name in the form owner.tablename.
If you want to use an owner-qualified replicate table
name with the replicate owner’s name, do not use
the owner keyword with the pdb_setreptable command.
If you use the owner keyword and specify a replicate
table name, the primary table owner name is sent with the replicate
table name in the LTL.
If the Replication Agent transaction log does not exist in the primary database, the pdb_setreptable command returns an error.
pdb_xlog, pdb_setrepcol, pdb_setrepproc, ra_config