Sybase SQL Remote DC38133-01-0902-01 User Manual

Page of 485
Chapter 8. SQL Remote Design for Adaptive Server Enterprise
Creating publications
In this section
This section describes how to create simple publications consisting of whole
tables, or of column-wise subsets of tables.
Simple publications are also discussed in the chapter
Creating whole-table articles
The simplest type of article is one that includes all the rows and columns of
a database table.
To create an article that includes all the rows and columns of a
table
1. Mark the table for replication. You do this by executing the
sp_add_remote_table procedure:
sp_add_remote_table table-name
2. Add the table to the publication. You do this by executing the
sp_add_article procedure:
sp_add_article publication-name, table-name
Example
The following commands add the table SalesRep to the SalesRepData
publication:
sp_add_remote_table ’SalesRep’
sp_add_article ’SalesRepData’, ’SalesRep’
go
Creating articles containing some of the columns in a table
To create an article that includes only some of the columns from a table, you
need to list the columns that you wish to include, using sp_add_article_col.
If no columns are listed, the article includes all columns of the table.
To create an article that includes some of the columns and all the
rows of a table
1. Mark the table for replication. You do this by executing the
sp_add_remote_table procedure:
sp_add_remote_table table-name
go
143