Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 view, sp

Author  Topic 

doran_doran
Posting Yak Master

179 Posts

Posted - 2009-06-19 : 13:45:53
How to I DDL all the view and Stored Proc (about 60 objects) all at once instead of one by one? (I was working on a project on dev box and ready to move them to prod). Please suggest.

jimf
Master Smack Fu Yak Hacker

2875 Posts

Posted - 2009-06-19 : 13:48:54
In SSMS open a query window and hit the F7 key. A summary tab should appear, there you can click on the objects and right-click to get the script object options you want.

Jim
Go to Top of Page

RoLYroLLs
Constraint Violating Yak Guru

255 Posts

Posted - 2009-06-19 : 13:58:26
The way I do it:

1 - In SSMS right-click on your database object.
2 - Go to Tasks-->Generate Scripts...

It will then ask you a series of questions, u can do this for tables too. If you want/need the data, make sure you select the option "SCRIPT DATA in the "CHOOSE SCRIPT OPTIONS" section

EDIT:
BTW: I just realized this is 2005...I use 2008, not sure if it'll work for you

Hope this helps


- RoLY roLLs

http://www.buysellmotors.com
http://www.tikiloveroom.com
http://www.rolyrolls.com
http://iphone.rolyrolls.com
Go to Top of Page

doran_doran
Posting Yak Master

179 Posts

Posted - 2009-06-19 : 14:00:11
THANKS GUYS. THAT WAS FAAASSSSTTTT.
Go to Top of Page
   

- Advertisement -