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)
 Export/Backing up SP's

Author  Topic 

dnf999
Constraint Violating Yak Guru

253 Posts

Posted - 2007-06-04 : 05:26:54
Hi

I regularly need to amend my SP's in the database, and often can have various different versions. Is there a way where I can back up my SP's? or possibly, copy my redundant SP's to a back database?

Many thanks

nr
SQLTeam MVY

12543 Posts

Posted - 2007-06-04 : 08:59:46
See
http://www.nigelrivett.net/DMO/DMOScriptAllDatabases.html
You can set to only script SPs.
and
http://www.nigelrivett.net/DMO/AddToSourceSafe.html
will add the updates to sourcesafe.

I always update SPs from scripts which are held in sourcesafe - if you do this then you won't have this problem (but scripting and schecking is always a good idea).

==========================================
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

Kristen
Test

22859 Posts

Posted - 2007-06-05 : 04:34:09
Store each Sproc in a separate file, and use a Version Control system to manage them. You can then easily revert back to see what the exact content of an SProc was in a given version, or date.

Speaking from experience it makes a HUGE difference when you have different versions deployed in different installations.

See also: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=55210&SearchTerms=Version+Control

Kristen
Go to Top of Page
   

- Advertisement -