pdb_setrepproc

Description

Returns stored procedure replication marking status; unmarks all marked stored procedures or a specified stored procedure; enables or disables replication for all marked stored procedures or a specified stored procedure; marks a specified stored procedure for replication.

Note Sybase Replication Agent does not support procedure replication for DB2 Universal Database.

Syntax

To return stored procedure replication marking status:

pdb_setrepproc [procname|mark|unmark|enable|disable]

To unmark, enable or disable all marked stored procedures:

pdb_setrepproc all, {unmark[, force]|enable|disable}

To mark, unmark, enable, or disable a specified stored procedure:

pdb_setrepproc procname, {mark|unmark[, force]|enable|disable}

Parameters

procname

The name of the stored procedure in the primary database.

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:

"Proc"

NoteIf you must use an object name case that does not match the setting 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:

"proc name"
"proc.name"

If an object name contains a period, it must be both owner-qualified and delimited with quote characters. For example:

owner."proc.name"
"proc.owner"."proc.name"
repname

The name of the stored procedure specified in the function replication definition for a primary stored procedure. This parameter can be delimited with quote characters to specify character case. See the previous description of the procname parameter for specifics.

By specifying a replicated name, stored procedure invocations can be replicated to a stored procedure invocation in the replicate database that has a different stored procedure name from the primary database.

NoteThe replicated name you specify with the pdb_setrepproc command must match a stored procedure name specified by a deliver as proc_name clause in a function replication definition for the primary database connection. The Replication Agent pdb_setrepproc command cannot verify the existence of a valid function replication definition, but if it does not exist, function replication from the primary table will fail.

all

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

mark

A keyword that refers to marking stored procedures for replication.

unmark

A keyword that refers to unmarking marked stored procedures.

force

A keyword that refers to the unmark operation.

When the force keyword follows the unmark keyword, the pdb_setrepproc command immediately removes replication marking for the specified stored procedure in the primary database, without first checking the enable status of the stored procedure or checking for pending operations in the transaction log. When the force keyword follows the unmark keyword and the all keyword, the pdb_setrepproc command immediately removes replication marking from all marked stored procedures 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_setrepproc 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 stored procedures.

disable

A keyword that refers to disabling replication for marked stored procedures.

Examples

Example 1

pdb_setrepproc

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

Example 2

pdb_setrepproc authors

This command returns replication marking information for the stored procedure named authors in the primary database.

Example 3

pdb_setrepproc authors, mark

This command marks the stored procedure named authors in the primary database.

Example 4

pdb_setrepproc authors, enable

This command enables replication for the stored procedure named authors in the primary database.

Example 5

pdb_setrepproc all, unmark

This command unmarks all marked stored procedures in the primary database.

Usage

See also

pdb_xlog, pdb_setrepcol, pdb_setreptable, ra_config