Restore Database

  • Hi All,

    I need a help on below problem.

    I wanted to restore a database and by mistake i specified the wrong database name in restore script and executed the query ,then i stopped the execution of the query. But the database state is in restoring mode.i want revert the database to normal state. is there any solution for this?

    Thanks In Advance.

    Regards,

    Vijay

  • You can try the following:

    RESTORE DATABASE <DB Name> WITH RECOVERY

    That may fail and, if it does, you will have to find a backup for the DB you overwrote and restore that.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    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
  • Hope you have the backups for the two databases involved.

    Pradeep Adiga
    Blog: sqldbadiaries.com
    Twitter: @pradeepadiga

  • Adiga (11/17/2010)


    Hope you have the backups for the two databases involved.

    Ya i have the DB backup for both the database.

  • Like Gail mentioned try RESTORE DATABASE .... WITH RECOVERY. If it fails, then you can always RESTORE those databases from the Backups that you have.

    Pradeep Adiga
    Blog: sqldbadiaries.com
    Twitter: @pradeepadiga

Viewing 5 posts - 1 through 4 (of 4 total)

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