Friday, March 9, 2012

recover a stored procedure

If I can't connect to my database and my test server requires a reinstall of SQL Server 2005, how can I get my one stored proc out of there and back it up if I can't even connect to my database? Is there a file that is created that may have this? I know it's probably stored in master or something but not sure if it can be recovered.Before reinstalling the SQL Server, make a copy of the database files (.MDF and .LDF) in which you created your stored proc. When the new instance is installed, attach the DB and retrieve your stored proc from there.

No comments:

Post a Comment