SQL Remote User's Guide
Command Reference for Adaptive Server Enterprise
To add an article to a publication.
sp_add_article publication_name,
table_name,
where_expr,
subscribe_by_expr,
subscribe_by_view
Argument | Description |
---|---|
publication_name | The name of the publication to which the article is to be added. |
table_name | The table containing the article. |
where_expr |
This optional argument must be a column name or NULL. The publication includes only rows for which the supplied column value is not NULL.
The default value is NULL, in which case no rows are excluded from the publication. |
subscribe_by_expr |
The new subscription expression defining which rows are to be included in the publication for each subscription.
The expression must be the name of a column in table_name. The default value is NULL. |
subscribe_by_view |
A view defining the columns and rows to be included in the publication.
For more information, see Tuning extraction performance and Tuning extraction performance for shared rows. |
sp_create_publication procedure
Running sp_add_article adds an article to a publication. The table must be marked for replication using sp_add_remote_table before it can be added to a publication; failure to do so leads to an error.
Calling sp_add_article adds all the columns of the table to a publication. If you wish to include only some of the columns of the table in a publication you must first run sp_add_article and then call sp_add_article_col.
As with other data definition changes, in a production environment this procedure should only be run on a quiet SQL Remote installation.
For more information on the requirements for a quiet system, see Making schema changes.
The following statement adds the SalesRep table to a publication named SalesRepData:
sp_add_article 'SalesRepData', 'SalesRep' go