Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EM Script Possibility ??

Status
Not open for further replies.

oj75

MIS
Aug 7, 2002
53
US
Is there any option within Enterprise Manager that will automate scripting of the changes made to the db structure during a given session? I would like to make structure changes through EM, and was hoping the EM had some way of tracking the changes I have made so that I don't have to do it manually. I have to make the same changes on multiple databases. Any thoughts??
 
Neither EM nor SQL Server track schema changes. The best way to perform that kind of tracking is to utilize a Change Control System. SQL Server and Visual Source Safe integrate fairly well. Terry L. Broadbent - DBA
Computing Links:
faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions.
 
Terry--
I found an option within the EM Database diagramming tool that will save a change script for any changes that are made to the database schema within the diagramming tool and are saved to the database. It also provided an option to ask me if I want a change script generated on each Save within the EM. Unfortunately it doesn't look like the change script option works when working with views. However, this option will help me out a great deal. Anything pertinent I should know about this option?

Oscar
 
You might want to look at a product called sql compare from Redgate.


it compares databases, and writes update scripts. It is fairly inexpensive and save me a ton of time. I could not work without it.

there is another product product from embarcadero software that is about 10 times as expensive, but does work a bit better, however I find that I can live with the few bugs in the red-gate product.

They also have a product that does sql data compare, great for updating those pesky code and lookup tables between databases.
 
Agree with fluteplr - this is a wonderful product, I couldn't live without it and it is not expensive! You do have to be careful what order you run the scripts. If you put them all in one change script and run it, it may fail if you have a stored procedure that uses a table change that is also in the same script. I usually do all the table changes, then all the views, then all the stored procedures. And the nice thing is you can pick which items you want to script, so that you don't have to move items you know production doesn't need (such as procedures that are in the process of being modified or which relate to parts of the user interface you are not ready to move to prodcution). ALso, if you mess up something in development it is easy to move the old version back from production too.
It will show you which items are the same which items are in one database but not the other and which are different beteween the two databases. ANd you can view the changes to see if you really want to script them at this time. Often, I find at least one item that surprises me and then I check the change to make sure it is appropriate to move at this time.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top