Home Forums SQL Server 2005 Administering Restore Database Failed: 'Exclusive access could not be obtained because the database is in use.' RE: Restore Database Failed: 'Exclusive access could not be obtained because the database is in use.'

  • Dennis Post (9/27/2012)


    ...

    If you have multiple tabs open, make sure they are not pointing to the DB in question...

    This helped and fixed the problem, thank you

    (Using... MSSQL 2012 DEV EDT)

    Msg 3101, Level 16, State 1, Line 2

    Exclusive access could not be obtained because the database is in use.

    Msg 3013, Level 16, State 1, Line 2

    RESTORE DATABASE is terminating abnormally.

    (after logs growth due to uncommitted transaction and also data was being inserted at the same time.. the log is in a huge size and adding additional log then backup-ing the log and restoring the database full backup and restoring the recent log..... all things came to normal)

    ww; Raghu
    --
    The first and the hardest SQL statement I have wrote- "select * from customers" - and I was happy and felt smart.