sp_addpub  sp_addreplicateconn

Chapter 4: ASE Replicator Procedures

sp_addreplicateart

Description

Creates a new replicate article (or articles) in a specified subscription.

Syntax

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

Parameters

sub_name

The name of the subscription to which the new article is added.

pri_art

The name of a primary article. Primary article names can be specified in the form owner.name.

rep_art

The name of a replicate article, if different from the primary article. This parameter can be used when the name of the replicate object is different from the name of the primary object, which is always the same as the name of the primary article. Replicate article names can be specified in the form owner.name.

NoteTo avoid problems on case-insensitive data servers, always specify replicate object names using the same character case as returned by the catalog stored procedures on the replicate data server.

field_nums

One or more numbers that identify the published fields to be subscribed to. Numbers can be entered with separating commas, or with dashes to indicate inclusive ranges. Numeric values are treated as strings and must be enclosed in quotes.

where_clause

A SQL-type where clause that further selects the published data to be received by the replicate object identified by the replicate article. The SQL keyword where is optional.

Examples

Example 1

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

Creates a new replicate article in the subscription subdoc, for the primary article table1, subscribing only to published fields 2, 3, and 4 in the primary article.

Example 2

sp_addreplicateart subdoc, table1, @where_clause="where style = 'round' or 
style = 'square'"

Creates a new replicate article in the subscription subdoc, for the primary article table1, subscribing to all published fields in the primary article, and replicating only rows in which the value of style is either round or square.

Example 3

sp_addreplicateart subdoc, table1, reptable1, "1,3-4", "where style = 'round' or style = 'square'" 

Creates a new replicate article in the subscription subdoc, for the primary article table1, with the replicate object named reptable1, subscribing only to published fields 1, 3, and 4 in the primary article, and replicating only rows in which the value of style is either round or square.

Usage

See also

sp_addprimaryart, sp_addreplicateconn, sp_addsub, sp_helpreplicateart, sp_helpreplicateconn, sp_helpsub





Copyright © 2005. Sybase Inc. All rights reserved. sp_addreplicateconn

View this book as PDF