November 3, 2005 at 2:57 pm
Okay, so I'm doing a lot of SQL Server development on my local machine. When my changes are done for the day, I want to "upload" or move my new/changed objects to the production machine. I do this now by generating the SQL script in EM, and then I execute it in QA against the prod box. I am finding that this doesn't work very well. The script lists objects in an order that doesn't satisfy the dependencies among the different objects. For example, the script will try to create a view that depends on another view that doesn't appear until later in the script. I spend a lot of time eyeballing the generated script and executing parts of it in dependency order. Not fun. There has to be a better way (such as a tool you can buy), but I don't know where to look. Any help much appreciated.
November 3, 2005 at 3:16 pm
DBArtisan and RapidSQL from Embarcadero both analyse dependencies when creating scripts. They're nice tools, but pretty pricey.
November 3, 2005 at 11:42 pm
try DB Ghost (http://www.dbghost.com) - it's cheap and it works.
regards,
Mark Baekdal
+44 (0)141 416 1490
+44 (0)208 241 1762
Build, Comparison and Synchronization from Source Control = Database change management for SQL Server
November 4, 2005 at 7:54 am
When scripts are generated using EM the first thing generated are the IF EXISTS... DROP [object] commands for the objects that need to be recreated.
If you execute your script once in QA, then delete, or comment out the DROPS, you can then execute your script over and over until no errors (due to dependencies) are left.
This solution is not elegant, but it doesn't cost anything.
November 4, 2005 at 10:48 am
You might want to search this site for chNge management and migration processes. There are quite a few great threads on what you want to do.
RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."
November 4, 2005 at 1:58 pm
the scptxfr tool comes with sql server and generates the objects in a runnable order...
C:\>scptxfr /s <serverName>\<instance> /I /d <databaseName> /f <scriptOutputFile.sql>
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply