Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any way to undelete a SQL server database and stored procedures?

Is there any way to undelete a SQL server database and stored procedures?

Edit:

No I don't have a backup. That is the reason I need help

like image 771
Josh Avatar asked Dec 14 '22 04:12

Josh


1 Answers

Restore from backup.

You do have a backup, right?

Edit: I'm assuming you probably did a right-click, "Delete" from SQL Management Studio? If so, that actually does a "drop" of the database, which literally removes the files from the hard drive. If this is the case, you'll have to restore from your latest backup (if you have one).

If you just did a "detach", then the MDF and LDF files are still on the hard drive, and you can simply attach them.

like image 131
BradC Avatar answered Dec 15 '22 17:12

BradC