Search code examples
sql-serverdatabaserecovery

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


Solution

  • 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.