all groups > sql server replication > august 2006 >
You're in the

sql server replication

group:

How to add 2 columns of a table to replication job?



How to add 2 columns of a table to replication job? Rich
8/7/2006 4:03:01 PM
sql server replication: Hello,

I appologize in advance if this question is way too lame, but I have this
transactional snapshot respication job, and here are a few lines of the sql
from the generate sql window from the properties of the replication job
---------------------------------------------------------------------------------------
-- Enabling the replication database
use master
GO

exec sp_replicationdboption @dbname = N'Subscriber', @optname = N'publish',
@value = N'true'
GO

use [Subscriber]
GO

-- Adding the transactional publication
....
--------------------------------------------------------------------------------------

I need to add 2 columns to the table that is under replication at the
publishing end and at the subscriber end. That's easy. So the generate sql
window shows all the current columns of the replicated table. Can I modify
that sql from the properties window to include the 2 new columns? I am
guessing probably not.

May I ask the procedures to perform this operation? Do I need to disable
replication, add the columns to the article and then re-enable replication?

I can post the sql code for this job if required (about 2 pages worth of sql).

Any suggestions greatly appreciated.

Thanks,
Rich
Re: How to add 2 columns of a table to replication job? Rich
8/7/2006 7:49:02 PM
Thanks very much.

Rich

[quoted text, click to view]
Re: How to add 2 columns of a table to replication job? Hilary Cotter
8/7/2006 9:12:32 PM
Try sp_repladdcolumn

--
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.

This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.

Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com



[quoted text, click to view]

AddThis Social Bookmark Button