all groups > sql server new users > september 2006 >
You're in the

sql server new users

group:

scripting all stored procs in db?


Re: scripting all stored procs in db? Warren Brunk
9/19/2006 3:31:33 PM
sql server new users: 1.Open Enterprise manager
2.Right Click on teh database name and say generate script.
3.Click Show All
4. Choose All Stored Procedures
5. On the formatting table make sure both Generate the Create and Drop are
both selected
6.Click OK and name the file and save it to a location that you can
remember.
7. Execute the .sql file on your second server is Query Analyzer making sure
you have the proper db selected.


There are some 3rd party tools by a company called www.Red-Gate.com that
allow you to do complex compare scenarios as well and make life a little
easier.

thanks,

--
/*
Warren Brunk - MCITP - SQL 2005, MCDBA
www.techintsolutions.com
*/


[quoted text, click to view]

scripting all stored procs in db? Daves
9/19/2006 9:12:07 PM
hi,
I need to synchronise local and remote database but only the stored
procedures...

Any ideas on how to collect all local ones and then create these on remote
db?

Re: scripting all stored procs in db? Warren Brunk
9/20/2006 4:30:36 PM
It should delete and recreate the Procedures on the remote server. As long
as you include the drop statement.

thanks,

--
/*
Warren Brunk - MCITP - SQL 2005, MCDBA
www.techintsolutions.com
*/


[quoted text, click to view]

Re: scripting all stored procs in db? Daves
9/20/2006 10:45:03 PM
hi,
thank you very much for detailed help.

I have "Sql admin studio" which does exactly this, the thing is it scripts
every object in database, not only stored procs. Even though I'd manage to
cut out only the sp scripts I don't know how to delete only stored procs on
the remote server... any suggestions?

[quoted text, click to view]

AddThis Social Bookmark Button