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 12»»

How to undo Drop Table Statement Expand / Collapse
Author
Message
Posted Friday, October 18, 2013 6:03 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Today @ 5:01 AM
Points: 187, Visits: 321
I’ve accidentally executed DROP TABLE statement tables and I lost all the data, is there a way I can retrieve my data back?
Post #1506106
Posted Friday, October 18, 2013 6:07 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 2:02 PM
Points: 13,539, Visits: 11,342
Restore a backup. I hope you have backups.



How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1506108
Posted Friday, October 18, 2013 6:13 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Today @ 7:47 AM
Points: 509, Visits: 1,882
There's no undo command unfortunately!

Post #1506110
Posted Friday, October 18, 2013 6:23 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 1:43 PM
Points: 40,411, Visits: 36,861
Fetch your latest backup, restore it as a new database, generate the table definition, execute it on the original database, copy the data over.


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1506114
Posted Friday, October 18, 2013 6:28 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Today @ 5:01 AM
Points: 187, Visits: 321
I don't have a backup
Post #1506116
Posted Friday, October 18, 2013 6:30 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 2:02 PM
Points: 13,539, Visits: 11,342
hoseam (10/18/2013)
I don't have a backup


Sorry to hear that.
Let this be an incentive to implement a backup plan.




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1506118
Posted Friday, October 18, 2013 6:56 AM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Friday, November 14, 2014 8:28 AM
Points: 301, Visits: 597
hoseam (10/18/2013)
I don't have a backup


Then you cannot get the table back. I hope this was not production...


MCSA SQL Server 2012
Post #1506135
Posted Friday, October 18, 2013 7:16 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 3:02 AM
Points: 2,200, Visits: 1,764
Alternatively, petition for the UNDROP TABLE command to be introduced in SQL Server 2016.

Hope you found a way to get the table recreated from somewhere.
Post #1506144
Posted Friday, October 18, 2013 4:11 PM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Friday, October 18, 2013 4:06 PM
Points: 471, Visits: 589
Richard Warr (10/18/2013)
Alternatively, petition for the UNDROP TABLE command to be introduced in SQL Server 2016.


UNDROP is not ISO compliant. PICKUP TABLE is what you want to lobby for.


---------------------------------------
elsasoft.org
Post #1506340
Posted Saturday, October 19, 2013 11:18 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Saturday, November 15, 2014 12:45 AM
Points: 328, Visits: 544
hoseam (10/18/2013)
I don't have a backup


Is it also safe to assume that you have no snapshots? Or a copy of the database somewhere else that you can copy the data from, maybe a test environment?
Post #1506408
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse