Failed Restore - Failed to disconnect existing connections

Compresses, encrypts, secures and monitors SQL Server backups.

Moderators: JonathanWatts, Chris Auckland, eddie davis, Colin Millerchip, Brian Harris, james.billings, RBA, petey

Failed Restore - Failed to disconnect existing connections

Postby JoshDBGuy » Fri Jan 04, 2013 7:04 pm

Hello,

A restore last night failed with an error message that contained the following information,

\"Failed to disconnect existing connections to database.\"

This is the first of this failure I have seen. I am using the \"DISCONNECT_EXISTING\" command and from what I can tell there was no connection to that specific database at the time the restore ran. Subsequent restores of different databases worked fine after this restore failed. Any ideas?


Thanks,

J
JoshDBGuy
 
Posts: 8
Joined: Fri Jan 04, 2013 7:00 pm

Postby petey » Mon Jan 07, 2013 1:27 am

Could you please post the contents of the SQL Backup log for the restore process that failed?

The default folder where the logs are stored is C:\\Documents and Settings\\All Users\\Application Data\\Red Gate\\SQL Backup\\Log\\<instance name> on Windows 2003 and older, and C:\\ProgramData\\Red Gate\\SQL Backup\\Log\\<instance name> on Windows Vista and newer.
Peter Yeoh
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 7
petey
 
Posts: 2226
Joined: Sun Apr 24, 2005 12:34 pm

Postby JoshDBGuy » Mon Jan 07, 2013 7:25 pm

I took care of that issue but maybe you can look at this one? Another failure, different DB (failed after 20 seconds), this restore does have kill connections enabled and it looks like this was set up with another script that runs prior to the restore that also kills connections,


----------------------------- ERRORS AND WARNINGS -----------------------------


1/5/2013 10:00:01 PM: Restoring XXXX_XXXX (database) from:
1/5/2013 10:00:01 PM: \\\\XXXX\\XXXX.sqb

1/5/2013 10:00:05 PM: ALTER DATABASE [XXXX] SET ONLINE RESTORE DATABASE [XXXX] FROM VIRTUAL_DEVICE = 'SQLBACKUP_XXXXX', VIRTUAL_DEVICE = 'SQLBACKUP_XXXXX',
VIRTUAL_DEVICE = 'SQLBACKUP_XXXXX', VIRTUAL_DEVICE = 'SQLBACKUP_XXXXX', VIRTUAL_DEVICE = 'SQLBACKUP_XXXXX', VIRTUAL_DEVICE = 'SQLBACKUP_XXXXX', VIRTUAL_DEVICE = 'SQLBACKUP_XXXXX' WITH BUFFERCOUNT = 28, BLOCKSIZE = 65536, MAXTRANSFERSIZE = 1048576 , RECOVERY, MOVE 'XXXXX' TO 'D:\\XXXXX\\XXXXX', MOVE 'XXXXX_log' TO
'D:\\XXXXX_log', REPLACE

1/5/2013 10:00:38 PM: Thread 0 error:
Process terminated unexpectedly. Error code: -2139684860 (An abort request is preventing anything except termination actions.)
1/5/2013 10:00:38 PM:
1/5/2013 10:00:38 PM: Thread 1 error:
Process terminated unexpectedly. Error code: -2139684860 (An abort request is preventing anything except termination actions.)
1/5/2013 10:00:38 PM:
1/5/2013 10:00:38 PM: Thread 2 error:
Process terminated unexpectedly. Error code: -2139684860 (An abort request is preventing anything except termination actions.)
1/5/2013 10:00:38 PM:
1/5/2013 10:00:38 PM: Thread 3 error:
Process terminated unexpectedly. Error code: -2139684860 (An abort request is preventing anything except termination actions.)
1/5/2013 10:00:38 PM:
1/5/2013 10:00:38 PM: Thread 4 error:
Process terminated unexpectedly. Error code: -2139684860 (An abort request is preventing anything except termination actions.)
1/5/2013 10:00:38 PM:
1/5/2013 10:00:38 PM: Thread 5 error:
Process terminated unexpectedly. Error code: -2139684860 (An abort request is preventing anything except termination actions.)
1/5/2013 10:00:38 PM:
1/5/2013 10:00:38 PM: Thread 6 error:
Process terminated unexpectedly. Error code: -2139684860 (An abort request is preventing anything except termination actions.)
1/5/2013 10:00:38 PM:
1/5/2013 10:00:39 PM: SQL error 3013: SQL error 3013: RESTORE DATABASE is terminating abnormally.
1/5/2013 10:00:39 PM: SQL error 3101: SQL error 3101: Exclusive access could not be obtained because the database is in use.
JoshDBGuy
 
Posts: 8
Joined: Fri Jan 04, 2013 7:00 pm

Postby ChrisAVWood » Mon Jan 07, 2013 10:48 pm

JoshDBGuy,

We have used SQLBackup for a number of years but don't use the DISCONNECT_EXISTING because it might take longer than 20 seconds to rollbackup any active transactions. We try an ALTER DATABASE xxxx SET SINGLE_USER with ROLLBACK IMMEDIATE and wait for this to finish. Most servers now run with multiple CPU's but rollback is single threaded. So if you try and rollback a transaction that has run for 5 minutes on say 4 CPU's in parallel it could take 20 minutes to rollback.

My 2 cents

Chris
English DBA living in CANADA
ChrisAVWood
 
Posts: 308
Joined: Tue Dec 18, 2007 6:18 pm
Location: Edmonton, Alberta, CANADA

Postby ChrisAVWood » Tue Jan 08, 2013 6:32 pm

Actually just had this problem happen. My alter database set single_user had not finished in over 6 minutes so I cancelled it and tried it again. I am not sure what was holding the database but it can take time under some circumstances.

Chris
English DBA living in CANADA
ChrisAVWood
 
Posts: 308
Joined: Tue Dec 18, 2007 6:18 pm
Location: Edmonton, Alberta, CANADA

Postby JoshDBGuy » Wed Jan 09, 2013 3:37 pm

I'm guessing I might just have to accept this as a possible issue with restores?
JoshDBGuy
 
Posts: 8
Joined: Fri Jan 04, 2013 7:00 pm

Postby zeeshan » Mon Jan 14, 2013 6:50 am

I suggest you restore all settings,and use by default.
zeeshan
 
Posts: 1
Joined: Thu Nov 29, 2012 5:22 am


Return to SQL Backup 7

Who is online

Users browsing this forum: No registered users and 0 guests