• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 203
  • Last Modified:

Hi help nedeed does any know if SQL2005 keeps a tempory copy of a strored procedure that has just been changed with an alter commnd

I have accidently overwritten a stroed procedure I was developing with an alter command. Does SQL 2005 keep a tempory copy or backup of the original stored procedure anywhere.
2 Solutions
Sadly not.

Your best bet would be if you have a recent full backup that you can restore as another database; i.e. "YourDatabase_RESTORE"

udaya kumar laligondlaTechnical LeadCommented:
you can use the backup copy of the database then restore the same separately and extract the SP code. re run on the actual DB.
one more dirty way is to open the log file of the DB in a text editor and look for stored proc name. if lucky you may get the create statement in the log file
NTSSAuthor Commented:
Many thanks for your help, unfortunatley I had been working on the stored proc for a couple of hours this morning and had not yet backed up the DB (my own stupid fault). The database is only for development and is set to simple logging. I just wander if sql happen to keep a temp copy of the alter stored proc is some un documented location.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now