pdb_setreptable

Description

Returns replication marking status; marks all user tables or a specified table for replication; unmarks all marked tables or a specified table; enables or disables replication for all marked tables or a specified table.

Syntax

To return replication marking status:

pdb_setreptable [tablename|mark|unmark|enable|disable]

To mark all user tables (available only for Oracle and Microsoft SQL Server):

pdb_setreptable all, mark

To unmark, enable, or disable all marked 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]

Parameters

tablename

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

This parameter can be delimited with quote characters to specify the character case.

If mixed character case (both uppercase and lowercase) is required, the name must be delimited. For example:

"Owner".table
"Owner"."Table"

Each mixed case element of the tablename option must be delimited separately, as shown in the previous example.

If an object name contains any non-alphanumeric characters, such as spaces or periods, 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"
repname

The name of the table specified in the replication definition for a primary table.

NoteThe replicated name you specify with the pdb_setreptable command must match a table name specified by a with primary table named clause in a Replication Server replication definition for the primary database connection. The Replication Agent cannot validate the replication definition, but if it does not exist, or if the with primary table named clause does not match the replicated name specified with pdb_setreptable, replication from the primary table will fail.

The repname option can be owner-qualified to include the replicate table owner name, with each element separated by a period. For example:

repowner.reptable

The repname option can also be delimited with quote characters to specify the character case. See the previous description of the tablename option for details.

NoteIf the replicate table name contains a period (for example, table.name), without owner qualification, you must set the value of the Replication Agent use_rssd parameter to true.

all

A keyword that refers to all tables in the primary database. By using the all keyword, you can mark all user tables, or apply an unmark, enable, or disable operation to all marked tables.

mark

A keyword that refers to replication marking.

owner

A keyword that refers to the mark operation.

The owner keyword turns on the SEND OWNER mode. When you specify the owner of a table in a replication definition, you must always use the owner keyword if you want to enable the SEND OWNER mode.

unmark

A keyword that refers to unmarking a marked table.

force

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 (Microsoft SQL Server only). 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.
enable

A keyword that refers to enabling replication for marked tables.

disable

A keyword that refers to disabling replication for marked tables.

Examples

Example 1

pdb_setreptable authors

This command returns replication marking information for the table named “authors” in the primary database.

Example 2

pdb_setreptable mark

This command returns replication marking information for all marked tables in the primary database.

Example 3

pdb_setreptable disable

This command returns replication marking information for all marked tables for which replication has been disabled in the primary database.

Example 4

pdb_setreptable all, unmark, force

This command forces unmarking for all marked tables in the primary database.

Example 5

pdb_setreptable all, enable

This command enables replication for all marked tables in the primary database.

Example 6

pdb_setreptable authors, mark

This command marks for replication the table named “authors” in the primary database.

Example 7

pdb_setreptable authors, mark, owner

This command marks for replication the table named “authors” in the primary database so that the OWNER_MODE is enabled in the LTL.

Example 8

pdb_setreptable ptable, rtable, mark, owner

The table in the replication definition will be:

powner.rtable

Example 9

pdb_setreptable ptable, rowner.rtable, mark,owner

The table in the replication definition will be:

rowner.rtable

Example 10

pdb_setreptable ptable, rowner.rtable, mark,owner

The table in the replication definition will be:

rowner.rtable

Example 11

pdb_setreptable authors, enable

This command enables replication for the marked table “authors” in the primary database.

Example 12

pdb_setreptable table=mark, enable

This command enables replication for the marked table named “mark” in the primary database.

Example 13

pdb_setreptable authors, unmark, force

This command forces unmarking for the marked table “authors” in the primary database.

Usage

See also

pdb_setrepcol, pdb_setrepproc, ra_config