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
 General SQL Server Forums
 New to SQL Server Programming
 stored procedure

Author  Topic 

gayoosoftware
Starting Member

8 Posts

Posted - 2008-04-21 : 12:10:23
How do backup/restore only 'stored procedure' of one database? we may use this query for another database with little changes.

nr
SQLTeam MVY

12543 Posts

Posted - 2008-04-21 : 12:15:20
You would script them rather than back them up.
Here's some SP's that will script SPs and other things from one or many databases
http://www.nigelrivett.net/DMO/DMOScripting.html

There's other info here
http://www.nigelrivett.net/#DMO

This is something really simple that you can schedule from the client or server as a command line
http://www.nigelrivett.net/DMO/ScriptFromCMDLine.html
That's for tables but SPs should be similar.


==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-04-22 : 03:31:11
Also refer http://sqlblogcasts.com/blogs/madhivanan/archive/2007/12/13/script-out-procedures-and-functions-part-2.aspx

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -