• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 220
  • 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.
0
NTSS
Asked:
NTSS
2 Solutions
 
St3veMaxCommented:
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"

HTH
0
 
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
0
 
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.
0
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

Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

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