| Author |
Message |
JoshDBGuy
Joined: 04 Jan 2013 Posts: 8
|
Posted: Fri Jan 04, 2013 7:04 pm Post subject: Failed Restore - Failed to disconnect existing connections |
|
|
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 |
|
| Back to top |
|
 |
petey
Joined: 24 Apr 2005 Posts: 2218
|
Posted: Mon Jan 07, 2013 1:27 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
JoshDBGuy
Joined: 04 Jan 2013 Posts: 8
|
Posted: Mon Jan 07, 2013 7:25 pm Post subject: |
|
|
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. |
|
| Back to top |
|
 |
ChrisAVWood
Joined: 18 Dec 2007 Posts: 308 Location: Edmonton, Alberta, CANADA
|
Posted: Mon Jan 07, 2013 10:48 pm Post subject: |
|
|
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 |
|
| Back to top |
|
 |
ChrisAVWood
Joined: 18 Dec 2007 Posts: 308 Location: Edmonton, Alberta, CANADA
|
Posted: Tue Jan 08, 2013 6:32 pm Post subject: |
|
|
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 |
|
| Back to top |
|
 |
JoshDBGuy
Joined: 04 Jan 2013 Posts: 8
|
Posted: Wed Jan 09, 2013 3:37 pm Post subject: |
|
|
| I'm guessing I might just have to accept this as a possible issue with restores? |
|
| Back to top |
|
 |
zeeshan
Joined: 29 Nov 2012 Posts: 1
|
Posted: Mon Jan 14, 2013 6:50 am Post subject: |
|
|
I suggest you restore all settings,and use by default. _________________ www.eattolivedietplan.com |
|
| Back to top |
|
 |
|