SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Script procedures in different files
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

karthik_padbanaban
Constraint Violating Yak Guru

India
263 Posts

Posted - 12/06/2010 :  01:42:47  Show Profile  Reply with Quote
I have 500 stored procedures in a database.
I need to script all those in 500 different files.
what is the best way to do it..?



Karthik
http://karthik4identity.blogspot.com/

Sachin.Nand
Flowing Fount of Yak Knowledge

2937 Posts

Posted - 12/06/2010 :  01:46:18  Show Profile  Reply with Quote
You want to do it through SSMS or you have the DB in source control like TFS?

PBUH

Go to Top of Page

karthik_padbanaban
Constraint Violating Yak Guru

India
263 Posts

Posted - 12/06/2010 :  01:48:45  Show Profile  Reply with Quote
I have SSMS

Karthik
http://karthik4identity.blogspot.com/
Go to Top of Page

Sachin.Nand
Flowing Fount of Yak Knowledge

2937 Posts

Posted - 12/06/2010 :  02:48:56  Show Profile  Reply with Quote
Right click the database>>Tasks>>GenerateScripts>>Choose Objects(In your case select stored procedure)>>Click Next>>Set Scripting Options(There will be a radio button Single File and Single file per object).
Check Single file per object which will generated SP files for each sp in the DB in the specified directory.

PBUH

Go to Top of Page

karthik_padbanaban
Constraint Violating Yak Guru

India
263 Posts

Posted - 12/06/2010 :  04:35:29  Show Profile  Reply with Quote
after select GenerateScripts it leads me to Script Wizard.. and from there I am not getting the radio button..
I am using SQL server 2005


Karthik
http://karthik4identity.blogspot.com/
Go to Top of Page

Sachin.Nand
Flowing Fount of Yak Knowledge

2937 Posts

Posted - 12/06/2010 :  06:12:01  Show Profile  Reply with Quote
You need to select the database object you want to script.In your case select the stored procedure.

PBUH

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000