all groups > sql server replication > september 2007 >
You're in the

sql server replication

group:

Changing the data type of a table that is a part of replication sc


Changing the data type of a table that is a part of replication sc Jack
9/27/2007 3:29:00 PM
sql server replication:
Hi,
I have a replication table. However one of the field's datatype needs to be
changed. The system does not allow me to do so. However I must change the
Re: Changing the data type of a table that is a part of replication sc Hilary Cotter
9/28/2007 9:27:37 PM
In sql 20000 - You must add a dummy column of the same size as the old
datatype - use sp_repladdcolumn for this. Then you must update this dummy
column to have the same values as the column you are changing. Then you drop
the the column you wish to change using sp_repldropcolumn. Then add this
column back with the correct data type using sp_repladdcolumn, and update it
with the values form the dummy column. Then drop the dummy column using
sp_repldropcolumn.

In SQL 2005 just use the plain alter table statements to do this.

--
RelevantNoise.com - dedicated to mining blogs for business intelligence.

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