question

vijendra_cs avatar image
vijendra_cs asked

Schema changes in Replicated environment SQL server 2000

Hi, Everytime we need to alter any schema, we need to generate the entire schema change script along with replication script. We follow following steps. 1> Script to Drop subscription 2> Script to Drop article 3> Script to Alter the schema (write Alter Table\Procedure script) 4> Script to Add article 5> Script to add subcription So even a simple alter table script becomes very big due to the extra script we write for add\drop subcription, article. At present the SQL server doesnt provide any way to generate ALTER table\procedure script Along with Replication script. If you try to get the SQL script for a table\procedure, the SQL server gives you Alter table\procedure script without add\drop subcription\article script. (there is no option such as "generate script with replication"). Please let us know the simpler way to generate script with replication, to alter\create any sql server 2000 object. Thanks, Vijendra
sql-server-2000replication
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
TimothyAWiseman avatar image
TimothyAWiseman answered
What you describe is the proper and appropriate way to handle a schema change (though if you have certain 3rd party software like Red Gates SQL Compare you at least have choices on how do step 3.) Of course, the other thing to consider is that you probably do not want a large number of schema changes in production whether or not it is replicated.
3 comments
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Another reason to stay current... or at least N-1.
3 Likes 3 ·
+1. Just as a note: SQL 2005+ allows for replication of schema changes. We use it on 2008 and it is very effective when rolling out table design changes.
2 Likes 2 ·
Good thing to add, thanks WilliamD.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.