Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Backing up multiple stored procedures into individual text files Expand / Collapse
Author
Message
Posted Wednesday, December 12, 2007 10:14 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, June 8, 2011 5:32 AM
Points: 6, Visits: 21
I'm using sql server 2005 and I need a way to back-up 200+ stored procedures into individual files with the same names as the stored procedures (basically a back-up of all stored procedures individually) at the same time and not one by one.

Please help.
Post #432433
Posted Friday, December 14, 2007 6:25 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Monday, May 28, 2012 2:36 AM
Points: 303, Visits: 112
Right click on the database in SSMS. Go to Tasks->Generate Scripts.

Go with the defaults in the wizard till you come to the page to select object types. Select Stored Procedures. In the next screen, select Script to File -> File Per Object.

Hopefully this is what you needed!
Post #433302
Posted Friday, December 14, 2007 6:43 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Yesterday @ 8:53 PM
Points: 33,204, Visits: 15,353
I'd use Karthik's solution and then be sure you get them into a version control system. Ideally you are checking them out of some SCC and then editing them before checking them back in.

If you don't have some SCC, you should get one, but at the least, zip up the procs into a file with a timestamp so you know which versions are available.







Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #433314
Posted Friday, December 14, 2007 9:40 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, June 8, 2011 5:32 AM
Points: 6, Visits: 21
Karthik (12/14/2007)
Right click on the database in SSMS. Go to Tasks->Generate Scripts.

Go with the defaults in the wizard till you come to the page to select object types. Select Stored Procedures. In the next screen, select Script to File -> File Per Object.

Hopefully this is what you needed!


SWEET! This is exactly what I was looking for. My only problem was that I was trying it from my client machine and I couldn't find the 'File per Object' option. Then I logged into the DB server and there it was...

Muchas Gracias Senor!
Post #433452
Posted Friday, December 14, 2007 9:54 AM
SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Thursday, August 7, 2014 2:08 AM
Points: 4,432, Visits: 4,171
Noman Salim (12/14/2007)
Karthik (12/14/2007)
Right click on the database in SSMS. Go to Tasks->Generate Scripts.

Go with the defaults in the wizard till you come to the page to select object types. Select Stored Procedures. In the next screen, select Script to File -> File Per Object.

Hopefully this is what you needed!


SWEET! This is exactly what I was looking for. My only problem was that I was trying it from my client machine and I couldn't find the 'File per Object' option. Then I logged into the DB server and there it was...

Muchas Gracias Senor!

This option was added with SP2 if I remember correctly. Most likely SP2 has been installed on the server but the client tools on your machine aren't updated. Run the service pack opn your client and you should have this option there too.


Markus Bohse
Post #433459
Posted Friday, January 18, 2008 11:32 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, January 18, 2008 11:25 PM
Points: 1, Visits: 0
Hi ,

Very Cool, i got the answer.

Thanks:)
Post #445194
Posted Friday, May 17, 2013 4:53 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, July 31, 2014 11:04 PM
Points: 1, Visits: 47
Hi

Is there anyway to do this via TSQL?
Post #1453932
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse