Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Strored procedure contents deleted

Author  Topic 

rookie_sql
Constraint Violating Yak Guru

443 Posts

Posted - 2007-07-11 : 11:01:03
Hi i made a change to my SP and when i went back into it , all the code was removed what happened ?

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2007-07-11 : 11:08:37
You messed it up.

This is a good illustration of why you should never edit stored procedures in Enterprise Manager. Always do stored procedure work from a script in Query Analyzer.

If you don’t have the script used to create the procedure, you can recover the old version by restoring your most recent database backup to a new database, scripting out the procedure, and applying that script to your current database.



CODO ERGO SUM
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2007-07-12 : 10:26:00
Got a backup of the database?

Meh



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2007-07-12 : 11:58:56
you should keep your scripts for each object in a source control system.


elsasoft.org
Go to Top of Page
   

- Advertisement -