all groups > sql server programming > october 2007 >
You're in the

sql server programming

group:

Database Script Does Not Account for Dependencies


Re: Database Script Does Not Account for Dependencies Jim Underwood
10/5/2007 2:17:31 PM
sql server programming: Usually, I put my scripts together manually, because this issue troubled me
and I never got around to trying to find a solution for it. I did try
checking off "Generate scripts for all dependent objects" and that did not
help at all, although it did change the order of the script, just in useless
ways.

If you do find an answer, please let us all know.

[quoted text, click to view]

Re: Database Script Does Not Account for Dependencies Quentin Ran
10/5/2007 5:34:49 PM
http://www.red-gate.com/products/sql_packager/index.htm?gclid=CO-Gz5nn-I4CFQGnPAodaUROEw

I never used it myself. If you google there are more (don't miss the
sponsored links).

hth

Quentin

[quoted text, click to view]

Database Script Does Not Account for Dependencies Charles Law
10/5/2007 6:55:22 PM
I don't know if I have missed something here, but I blindly thought that if
I used SSMS to script my database, I could run the script on a new instance
and get a database out of it.

The script fails, and I get an error saying that a stored procedure requires
an object that doesn't exist. That is because the object hasn't been created
yet. It appears later on in the script.

How can I get the database scripting wizard to script objects in the correct
order, that is in an order that takes account of dependencies?

Either that, or does anyone know of a tool/product that does do this?

TIA

Charles

RE: Database Script Does Not Account for Dependencies Mohit K. Gupta
10/5/2007 7:15:00 PM
I agree with Jim; do it manually. SQL Server scripting is nice *sometimes*
most of times it causes more problems. Besides nothing like doing it
yourself ;-) more fun, and you get to make sure everything is named how you
like it. Instead of using SQL naming convention for keys and such.

--
Mohit K. Gupta
B.Sc. CS, Minor Japanese
MCTS: SQL Server 2005


[quoted text, click to view]
Re: Database Script Does Not Account for Dependencies Charles Law
10/5/2007 7:33:07 PM
Hi Jim

Will do :-)

Charles


[quoted text, click to view]

Re: Database Script Does Not Account for Dependencies Alex Kuznetsov
10/5/2007 8:11:37 PM
[quoted text, click to view]

I regularly use Red Gate's SQL Compare for such tasks.
Re: Database Script Does Not Account for Dependencies Razvan Socol
10/5/2007 10:34:19 PM
[quoted text, click to view]

You can use the Database Publishing Wizard from
http://www.codeplex.com/sqlhost. It's made by Microsoft, it's free and
it takes care of the dependencies quite good (at least on SQL 2005).

--
Razvan Socol
AddThis Social Bookmark Button