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
186 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 250 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 250 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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL Agent Timeout 5 73
Why is the output of this function is like this? 4 47
Need help with a query 6 82
T-SQL: How to append a column for serialized JSON data? 2 49
I've encountered valid database schemas that do not have a primary key.  For example, I use LogParser from Microsoft to push IIS logs into a SQL database table for processing and analysis.  However, occasionally due to user error or a scheduled task…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

739 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