SQL Restore Database Fail

  • I'm a newbie so please be gentle.

    I get error when I want to delete or override on exist restore database.

    How to see who using that database currently ?

    for restore I use Sql Server Management Studio.

    Tnx!!

  • You could run a query using sp_who2 to see who's connected. You can also click on the Activity Monitor icon, which will open the activity monitor and show who's connected.

    You might want to look up the method for setting a database to be restricted using the WITH ROLLBACK_IMMEDIATE clause. That will allow you to kick users off & perform a restore.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • If You are using management studio just right click your database select detele, watch for a checkbox at end of this popup saying "Close exixsting connections" just select it and you should be good to go.

  • Tnx.....very much for help

  • have you renamed you mdf and ldf files from the database you are trying to restore? Are you using sql backup restore or redgate?

    leisha

    MCSE SQL Server 2012\2014\2016

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

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