Exclusive access could not be obtained (database in use?)
SQL Backup 3.1.0, (c) Red Gate Software Ltd 2004 - 2005
Serial number: 010-005-021891-E64D
Restoring database Tango_Reporting from "H:\Backup\TangoPart1.sqb"
VDI error 1010: Failed to get configuration from server. Check that the SQL Server instance is running, and that you have the S
Msg 3101, Level 16, State 2, Server AQUARIUS, Line 1
Exclusive access could not be obtained because the database is in use.
Msg 3013, Level 16, State 1, Server AQUARIUS, Line 1
RESTORE DATABASE is terminating abnormally.
I verified all 3 of our servers are running SQL Server with SP3 on Windows 2000.
I am running the following SQL from SQL Query Analyzer (with passwords changed of course) against the master database. From everything I have read and done in the psat, when I have performed native SQL Server restores, the ALTER DATABASE command has always killed any existing connections to a database allowing the restore to continue.
ALTER DATABASE Tango_Reporting SET SINGLE_USER WITH ROLLBACK IMMEDIATE GO exec master..sqlbackup '-SQL "RESTORE DATABASE [Tango_Reporting] FROM DISK = ''H:\Backup\TangoPart1.sqb'', DISK = ''H:\Backup\TangoPart2.sqb'' WITH RECOVERY, MOVE ''Tango_Data'' TO ''G:\SQLData\MSSQL\Data\Tango_Data.MDF'', MOVE ''Tango_Log'' TO ''G:\SQLData\MSSQL\Data\Tango_Log.LDF'', PASSWORD = ''<ENCRYPTEDPASSWORD>password</ENCRYPTEDPASSWORD>''" -U sa -P password GO
I also get the same error from the SQL Backup GUI AND running from the command-line.
Using both the SQL Backup and SQL Server process viewers, I can't find any processes using the database I'm trying to restore to.
Any ideas? Thanks!