3 ms·
I did something similar about ~18 months ago; brought up the wrong window and I deleted a table at the bottom of the relationship hierarchy (via the SQL Server
by snake_plissken 4y ago
I did something similar about ~18 months ago; brought up the wrong window and I deleted a table at the bottom of the relationship hierarchy (via the SQL Server Management Studio GUI no less, so I had to click through). Half a second later I realized I was on the wrong server and I tried to cancel the operation. My stomach churned. It did take me a moment to snap out of things (this table had like 200 million rows of ephemeral data that was scraped from the web), but I came to the conclusion that the data is either completely gone forever, or I can talk to co-workers to see what can be done.
Someone suggested we restore the database from its last backup (which we do daily with a few weeks retention), then do a "SELECT INTO FROM" to re-fill the table. We lost a couple hours of data and were soon back online.
I am sure there are more nuggets to take away from this story, but I took: always maintain a robust set of backups and let people know about the problem so you can at least try to work out a solution.