Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

How to get backup of Accidentel Executed procedure script Expand / Collapse
Author
Message
Posted Monday, October 15, 2012 12:38 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, September 2, 2014 5:17 AM
Points: 34, Visits: 163
Hello,
someone executed accidentally old script in a database , have any way to get back date procedure script .
if have, please reply me.


Thanks
Post #1372569
Posted Monday, October 15, 2012 2:21 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 7:03 AM
Points: 5,019, Visits: 10,559
Restore a backup copy of the database and extract the correct procedure from that copy.
You could set up a DDL trigger to capture this kind of changes into a table.
Unfortunately, setting it up now that the damage is done won't help, but will save the pain next time it happens.


--
Gianluca Sartori

Get your two-cent-answer quickly
spaghettidba.com
@spaghettidba
Post #1372590
Posted Tuesday, October 16, 2012 9:19 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, December 6, 2012 7:47 AM
Points: 9, Visits: 37
Restore the database to a test server (not to the same server that the database already exists); extract the stored procedure code and permissions on the stored procedure; put the restored database offline or detach; run the extracted scripts on the required database and grant require permissions.
Post #1373607
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse