Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

How to Create Publications and Define Articles (Transact-SQL)

SQL Server 2000

How to Create Publications and Define Articles (Transact-SQL)

To create a snapshot or transactional publication

  1. Execute sp_replicationdboption to enable publication of the current database.

  2. Execute sp_addpublication with repl_freq set to snapshot to define the publication.

  3. Execute sp_addpublication_snapshot to create a Snapshot Agent, set the publication agent_id, and place the schema and data into the replication working directory.

  4. Execute sp_addarticle n times to define each article in the publication.

To define an article for a snapshot or transactional publication

  1. Execute sp_addarticle to define an article.

  2. Execute sp_articlefilter to filter a table horizontally.

  3. Execute sp_articlecolumn to filter a table vertically.

  4. Execute sp_articleview to create the synchronization object for an article when a table is filtered vertically or horizontally.

To create a merge publication

  1. Execute sp_replicationdboption to enable publication of the current database.

  2. Execute sp_addmergepublication to define the publication.

  3. Execute sp_addpublication_snapshot to create a Snapshot Agent and place the schema and data into the replication working directory.

  4. Execute sp_addmergearticle n times to define each article in the publication.

To define a merge article

  1. Execute sp_addmergearticle to define an article.

  2. Execute sp_addmergefilter to create a partitioned publication.
Show:
© 2015 Microsoft