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

  • Jeffrey Williams-493691 (4/5/2011)


    Grant Fritchey (4/5/2011)


    Can you try using restricted user instead of single user? I've seen applications that constantly refresh their connection so they can squeek in before you start the restore.

    If this doesn't work, then you have some process refreshing its connection and is using a privileged account.

    I prefer taking the database offline myself - this insures that nobody can access that database and allows the restore to proceed with no problems.

    True, but I prefer to not let anyone have privileged access to the server except other DBAs.

    "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