August 16, 2009 at 11:03 pm
Hi all,
I am getting following message when trying to restore a newly created database with existed backup file file. I am getting the follow in messages
RESTORE DATABASE TestDB
FROM DISK = '\\xyz\Databackups\ddd.BAK'
WITH MOVE 'ddd_Data' TO 'E:\Microsoft SQL Server\MSSQL\data\TestDB_Data.MDF',
MOVE 'ddd_Log' TO 'E:\Microsoft SQL Server\MSSQL\data\TestDB_Log.LDF'
GO
Server: Msg 3101, Level 16, State 2, Line 1
Exclusive access could not be obtained because the database is in use.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
Thanks in Advance
Regards
Durgesh
August 16, 2009 at 11:17 pm
Based on the error message, I'd say you have a user accessing the database. You may want to run an SP_WHO2 and see who is using the database.
August 16, 2009 at 11:28 pm
Hi,
I stopped the user who is accessing the database and now i am getting the following message
Server: Msg 3201, Level 16, State 2, Line 1
Cannot open backup device '\\xyz\Databackups\ddd.BAK'. Device error or device off-line. See the SQL Server error log for more details.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
August 17, 2009 at 3:40 am
The problem is with the backup set, either it is not available or your ID is not authorized to use that.
In place you can copy the backup to a local drive and then try to restore it.
Regards,
Sarabpreet Singh 😎
Sarabpreet.com
SQLChamp.com
Twitter: @Sarab_SQLGeek
August 17, 2009 at 3:12 pm
Restore doesn't run under a user ID. It runs under the service account. That account might not have rights to that path.
August 17, 2009 at 3:46 pm
Steve Jones - Editor (8/17/2009)
Restore doesn't run under a user ID. It runs under the service account. That account might not have rights to that path.
I have to agree with Steve, this is a permissions issue.
Check to be sure the service account has access to source share for the backup file.
December 10, 2013 at 10:41 pm
DURGESH-769360 (8/16/2009)
Hi,I stopped the user who is accessing the database and now i am getting the following message
Server: Msg 3201, Level 16, State 2, Line 1
[highlight=#ffff11]Cannot open backup device '\\xyz\Databackups\[/highlight]ddd.BAK'. Device error or device off-line. See the SQL Server error log for more details.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
You will most likely find that the account the SQL runs under doesn't have permissions on your backup folder.
Hope this helps...
Ford Fairlane
Rock and Roll Detective
December 11, 2013 at 12:01 am
Please note: 4 year old thread.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 11, 2013 at 4:53 pm
GilaMonster (12/11/2013)
Please note: 4 year old thread.
It was one of "those" days -- I missed the date all together... :ermm:
Hope this helps...
Ford Fairlane
Rock and Roll Detective
September 27, 2018 at 11:15 pm
This was removed by the editor as SPAM
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply