Adding a column to a Replicated Table

January 19, 2010

Adding a column to a table being replicated can be a pain. Here’s a better way…

exec sp_repladdcolumn '[dbo].[table_name]','column_name',[varchar(200)], '%', '1'

to delete...
exec sp_repldropcolumn '[dbo].[survey]','sr_english_sur_id'

Just rebuild your snapshots and you're all set.
Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.