Groups | Blog | Home
all groups > sql server (alternate) > december 2006 >

sql server (alternate) : SQL 2005, "build" scripts?


Eric J. Holtman
12/19/2006 1:45:16 PM

Am I missing something obvious in the 2005 Visual Studio
portion of SQL Server?

I have a database design, with a bunch of tables, views,
stored procedures, etc, etc. I want to store each object
in a separate file, so I can keep them in Source Safe.

Is there a command that will "rebuild" the database,
issuing the CREATE TABLE, VIEW and PROCEDURE statements
in the "right" order, such that foreign keys, and procedures
that call procedures get built in the right order?

I know that for tables/views, I could put every in a
CREATE SCHEMA, but then everything's in one file.

I've done this the hard way before (isql to get sysdepend
information, pipe through tsort, build the tables that way),
but was hoping for a more integrated solution.


Thanks,


Eric.
Erland Sommarskog
12/19/2006 4:32:37 PM
Eric J. Holtman (ejh@ericholtman.com) writes:
[quoted text, click to view]

There isn't any Visual Studio portion of SQL Server. Well, there is
the Business Intelligence Development Studio, but that for developing
reports and packages for Reporting Services and Integration Services.

[quoted text, click to view]

Are you using the new member in the Team System family for database
professionals, commonly known as DataDude? It seems to be that stuff you are
looking for.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
Malcolm
12/20/2006 3:19:20 AM
Hi Eric,

Unfortunately there is no support in SQL Server for rebuilding from a
set of source scripts but there is a tool which can do exactly what you
want called DB Ghost (www.dbghost.com).

Not only can it build databases from individual object CREATE scripts
but it can also compare and synchronize a target database perfectly.

Even better it has the same core functionality of "DataDude"
(Microsofts latest addition to Team System) but at one twentieth of the
price! ($350 for DB Ghost versus $7,000 in order to use DataDude).
Also, we have been refining DB Ghost for four years whereas DataDude is
a "version 1" product that has still yet to be tested in agner by the
wider market.

Kind regards,

Malcolm
Andrea Montanari
12/20/2006 12:11:02 PM
hi Eric,
[quoted text, click to view]

try having a look at my free amScript at
http://www.asql.biz/en/Download2005.aspx
regards
--
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz http://italy.mvps.org
DbaMgr2k ver 0.20.0 - DbaMgr ver 0.64.0 and further SQL Tools
--------- remove DMO to reply

AddThis Social Bookmark Button