navigation
 Friday, November 30, 2007

If you want to change a column in a table that is used for replication, you used to have to break replication to make the change, then re-enable it. Not any more. Schema changes are now replicated too. But if you make the change in SQL Server Management Studio, the generated change script drops and recreates the table, which wont work: you will need to alter the columns manually in SQL. Here is an example, where I change the nullability of a column from NOT NULL to NULL:

ALTER TABLE RA_Actual ALTER COLUMN WetDate smalldatetime NULL 
This change will be automatically replicated!

Hopefully this will save you some time next time you need to make a minor modification to a replicated table.