how to add table and all its index for replication

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Paul Ibison (Paul.Ibison_at_Pygmalion.Com)
Date: 01/10/05


Date: Mon, 10 Jan 2005 01:45:47 -0800

If you're talking about code as in stored procedure
calls, the stored procedures you need are:

exec sp_addarticle
exec sp_addsubscription or exec sp_refreshsubscriptions

I can script mine out for you and post them up, but it
would be more useful for you to create a dummy
publication and add the new articles using enterprise
manager. After they're created, right click the
publication and get EM to script out the publications.
Selecting the relevant sp_addarticle sp_and
addsubscription bits will give you what you need.

Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)



Relevant Pages

  • source text file as input parameter from a stored procedure
    ... I am using an active X script in combination with a global ... transform task that loads data from a .txt file to a table. ... I can also tell that the stored procedure is correctly passing in the ... EXEC sp_OAGeterrorinfo @object, @hr ...
    (microsoft.public.sqlserver.dts)
  • Re: sp_changepublication
    ... property's in the EM Publication Property dialog, ... exec sp_changepublication @publication = 'RMLP', ... only want the Snapshot Agent to generate scripts and bcp data for the NEW ... Snapshot Agent's script article generation behavior so I ...
    (microsoft.public.sqlserver.replication)
  • sp_changepublication
    ... Publication so that they replicate over to the Subscribers. ... Snapshot Agent to generate scripts and bcp data for the NEW tables created ... Snapshot Agent's script article generation behavior so I ... exec sp_changepublication @publication = 'RMLP', ...
    (microsoft.public.sqlserver.replication)
  • Re: Replicator:Main DB insert turns into sp_MSupd on Replicator
    ... Subscription script: ... -- Enabling the replication database ... @description = N'Transactional publication of primary ... exec sp_addpublication_snapshot @publication = ...
    (microsoft.public.sqlserver.replication)
  • Re: how to add table and all its index for replication
    ... > If you're talking about code as in stored procedure ... > publication and get EM to script out the publications. ... > Paul Ibison SQL Server MVP, ...
    (microsoft.public.sqlserver.replication)