Chapter 4: ASE Replicator Procedures

This chapter describes the ASE Replicator command procedures that you use to perform ASE Replicator administration and maintenance tasks.

ASE Replicator procedures are created by the aserep script when you initialize the ASE Replicator process. ASE Replicator procedures are located in the Distribution Database, and they are owned by the ASE Replicator system user.

Executing ASE Replicator procedures

ASE Replicator procedures can be run only in the Distribution Database. Therefore, when you log in to the Adaptive Server to administer ASE Replicator, you must either open the Distribution Database with the use command, or qualify each procedure name with the Distribution Database name.

All ASE Replicator procedures report a return status. The following message indicates that the procedure executed successfully:

return status = 0

Return value examples in this book do not include the return status.

Entering parameter values

If a parameter value for an ASE Replicator procedure contains punctuation or embedded blanks, or is a reserved word, you must enclose it in single or double quotes. If the parameter is an object name qualified by a database name or owner name, enclose the entire name in single or double quotes. For example:

"owner.table"

If a procedure has multiple optional parameters, instead of supplying all the parameters, you can supply parameters in this form:

@parametername = value

The parameter names in the syntax statements match the parameter names defined by the procedures.

For example, the syntax for sp_addreplicateart is:

sp_addreplicateart sub_name [, pri_art [, rep_art [, field_nums [, where_clause]]]]

To use sp_addreplicateart to create a replicate article in the subscription subdoc, for the primary article table1, with no replicate article name specified, and subscribing to published fields 2, 3, and 4 in the primary article, you can invoke the procedure as:

sp_addreplicateart subdoc, table1, @field_nums="2-4"

NoteUnlike Adaptive Server system procedures, you cannot use “null” as a placeholder for ASE Replicator procedures. If you attempt to do so, Adaptive Server returns an error.

If you specify more parameters than the number expected by the procedure, the extra parameters are ignored.

List of procedures

Table 4-1 lists all ASE Replicator procedures along with a brief description.

Table 4-1: ASE Replicator procedures

Procedure name

Description

Page

sp_addprimaryart

Creates a new primary article in a publication

§

sp_addprimaryconn

Defines a new primary database connection

§

sp_addpub

Creates a new publication

§

sp_addreplicateart

Creates a new replicate article in a subscription

§

sp_addreplicateconn

Defines a new replicate database connection

§

sp_addsub

Creates a new subscription for a publication

§

sp_configprimaryconn

Sets or returns information about primary connection configuration parameters

§

sp_configrep

Sets or returns information about ASE Replicator configuration parameters

§

sp_configreplicateconn

Sets or returns information about replicate connection configuration parameters

§

sp_dropprimaryart

Deletes an existing primary article from a publication

§

sp_dropprimaryconn

Deletes an existing primary database connection

§

sp_droppub

Deletes an existing publication

§

sp_dropreplicateart

Deletes an existing replicate article from a subscription

§

sp_dropreplicateconn

Deletes an existing replicate database connection

§

sp_dropsub

Deletes an existing subscription

§

sp_helpconn

Returns information about database connections

§

sp_helplastcommit

Returns timestamp and locator value of the most recent transaction committed in the replicate database

§

sp_helplocator

Returns fields in the specified locator string

§

sp_helpprimaryart

Returns information about primary articles

§

sp_helpprimaryconn

Returns information about primary database connections

§

sp_helppub

Returns information about publications

§

sp_helprep

Returns statistics or status information for overall replication system, connections, and subscriptions

§

sp_helpreplicateart

Returns information about replicate articles

§

sp_helpreplicateconn

Returns information about replicate database connections

§

sp_helpsub

Returns information about subscriptions

§

sp_materializesub

Materializes and validates a subscription

§

sp_resumeprimaryconn

Resumes primary database connections

§

sp_resumerep

Resumes replication processes that are suspended or quiesced

§

sp_resumereplicateconn

Resumes replicate database connections and subscriptions

§

sp_resumesub

Resumes subscriptions

§

sp_shutdownrep

Shuts down ASE Replicator

§

sp_suspendprimaryconn

Suspends primary database connections

§

sp_suspendrep

Suspends all ASE Replicator components, connections, and subscriptions, but does not shut down ASE Replicator

§

sp_suspendreplicateconn

Suspends replicate database connections and subscriptions

§

sp_suspendsub

Suspends a specified subscription

§

sp_tracerep

Turns trace flags on or off, lists trace flags and their status

§

sp_validatesub

Validates a subscription

§

The rest of this chapter describes each ASE Replicator procedure in detail.