Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Keith Holme
Starting Member
1 Post |
Posted - 2005-01-08 : 04:38:42
|
| Apologies I am not a database guru but as a developer I have been asked to look into updating live SQLServer 2000 databases based on schema changes to a development database. Is there an easy way to accomplish this or do I have to graunch my way through the sysObject table looking for differences between the tables on both servers. If this is the way to approach this task can I add/modify rows of the sysObject table to reflect changes to table columns or is this a complete no no.Appreciate any comments/help |
|
|
nr
SQLTeam MVY
12543 Posts |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-01-08 : 06:39:23
|
| We script ALL changes we make in Development, using a filename system like "PATCH_01.SQL", "PATCH_02.SQL" ...We add an INSERT command at the top which adds the version number to a "script changes" table - thus we can see, for a given customer, which Patch script we last run,a dn then run everything that has changed since then.We keep all Stored Procedures / Triggers etc. in separate files. We then run everything that has a file modified date after the last script run on the client's server.If you make your changes in Enterprise Manager (Table : Design) and then use the "Save Change Script" Icon you get the chance to save the script which EM will use to make the change (there's a checkbox at the bottom to make sure it always comes up, even if you just press SAVE by accident!).However, we never let EM make the changes itself, but run the PATCH_nn.SQL scripts in Query Analyser - thus making sure that they work OK etc.Kristen |
 |
|
|
|
|
|