x
login about faq Site discussion (meta-askssc)

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 TableProcedure 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 adddrop subcription, article.

At present the SQL server doesnt provide any way to generate ALTER tableprocedure script Along with Replication script. If you try to get the SQL script for a tableprocedure, the SQL server gives you Alter tableprocedure script without adddrop subcriptionarticle script. (there is no option such as "generate script with replication").

Please let us know the simpler way to generate script with replication, to altercreate any sql server 2000 object.

Thanks,

Vijendra

more ▼

asked Aug 12 '10 at 06:25 AM in Default

vijendra_cs gravatar image

vijendra_cs
1 1 1 1

(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

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.

more ▼

answered Aug 12 '10 at 06:29 AM

TimothyAWiseman gravatar image

TimothyAWiseman
14.3k 17 20 29

+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.

Aug 12 '10 at 06:49 AM WilliamD

Another reason to stay current... or at least N-1.

Aug 12 '10 at 07:03 AM Blackhawk-17

Good thing to add, thanks WilliamD.

Aug 12 '10 at 07:03 AM TimothyAWiseman
(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments



Facebook logo Follow Ask SSC on Facebook
Find Ask SSC on Google+
linkedin logo Find us on LinkedIn

Topics:

x454
x237

asked: Aug 12 '10 at 06:25 AM

Seen: 949 times

Last Updated: Aug 12 '10 at 07:00 AM

Copyright © 2002-2012 Simple Talk Publishing. All Rights Reserved. If you have any queries, please contact the site administrators.
Ask SQL Server Central is a community service provided by Red Gate.