How to recover a user database from disk failure without restarting SQL Service?

  • One of the databases is missing because of disk failure. When the data/log file is back, is there a way to bring back this database on line without restarting SQL Service? Restarting SQL Service will bring back that database, but what if I do not want to restart SQL as this will affect the other user databases/applications.

    Any better way to do this?

  • Yes. All you'll need to do is attach the DB to the instance. You do not need to restart the service. You can do this through the GUI by right-clicking on the databases container or by using sp_attach_db.

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • Than you John.

    I figured out why. I right clicked on the missing database to attach. The missing database still shows up under the “databases” container but no plus sign with it. I got exception…error: 947.

    The right way is to right click on the “databases” container to attach. Tricky!

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply