June 13, 2006 at 8:04 am
Does anyone know where stored procedures are physically stored so that directory can be backed up for disaster recovery?
June 13, 2006 at 8:06 am
Stored procedures are physically stored in the database itself. Therefore, wherever your database files are, there, too. You can find the location of these files by using sp_helpdb if you don't have direct access to the directories. For instance:
EXEC sp_helpdb Northwind
K. Brian Kelley
@kbriankelley
June 13, 2006 at 8:14 am
So they are part of the MDF file and would be saved in a normal backup routine?
June 13, 2006 at 8:36 am
Yes.
K. Brian Kelley
@kbriankelley
June 13, 2006 at 8:45 am
Thank you. I appreciate your quick responses.
June 14, 2006 at 6:17 am
If you're interested in only backing up the Procs (and/or functions) I'd recommend generating a script and putting that file aside. The full backup of the DB will certainly work, but in the event that you need to "restore" just one proc, you can't do so from a backup. If you have the script, it's quite simple to just reapply the SQL to recreate it.
Also, look into a code version management repository like PVCS to control your code and serve as a backup.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply