?
Solved

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

Posted on 2009-04-03
3
Medium Priority
?
192 Views
Last Modified: 2012-05-06
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
Comment
Question by:NTSS
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 13

Accepted Solution

by:
St3veMax earned 1000 total points
ID: 24058120
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
 
LVL 12

Assisted Solution

by:udaya kumar laligondla
udaya kumar laligondla earned 1000 total points
ID: 24058227
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
 

Author Closing Comment

by:NTSS
ID: 31566164
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

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

So every once in a while at work I am asked to export data from one table and insert it into another on a different server.  I hate doing this.  There's so many different tables and data types.  Some column data needs quoted and some doesn't.  What …
INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question