The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

Looking for generation of sql script

Hi,
I want to generate sql script for my database including tables,stored procedures and triggers.I dont want to use enterprise manager,as i want to automate the process of generation of script,and put it under source control.
thanks
sammo
Saturday, December 15, 2007
 
 
dmo
PV
Saturday, December 15, 2007
 
 
There are lots of tools tha do this. I've been happy with http://xsqlsoftware.com/Product/Sql_Schema_Compare.aspx
Albert Send private email
Saturday, December 15, 2007
 
 
We wrote a library of VBScripts using both SQLDMO (MS SQL Server) and COM automation for VSS (MS Visual Source Safe) that worked out pretty darned well for us. Would automatically check out objects from the repository, look at your development DB, script objects, run a diff report, check 'em in. On the flip side, we could point the scripts at a VSS repository that was ready to go (passed TEST and QA, and automatically apply the scripts to wherever (TEST, QA, PROD).

Sorry, can't post 'em here 'cause a Client owns the source code.

Just a couple of days work is all it takes.

One of my projects for 2008 is to write a similar series of scripts for PowerShell using <whatever the replacement for SQLDMO is in SQL 2005/2008> and checking-in/out to what we use internally: Subversion.

When I get those done, may post a link back here but I don't have time to work on 'em 'til at least 2nd qtr next year (2008).
Sgt.Sausage
Sunday, December 16, 2007
 
 
Just a word of warning - the DMO script utility depends on sp_depends to produce a "clean" script (one that will run on a clean database, without errors) and it is VERY easy to confuse sp_depends when you have a "work in progress" database, which is getting changed regularly.
Syd Send private email
Monday, December 17, 2007
 
 
==> ... VERY easy to confuse sp_depends

Have they still not fixed this? I still do most of my work in SQL 2000. It's broken in a major way in 2000 (and SQL 7.0 ... and SQL 6.5 ... -- hell as long as I've been using the product the dependencies go all squirrelly). I would think that w/ 2005 they would have fixed it, and certainly with the new upcoming 2008 version.

They've had a good 9 years to work on the problem. You'd think it would be corrected by now!
Sgt.Sausage
Monday, December 17, 2007
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz