Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Problem in database restore Expand / Collapse
Author
Message
Posted Sunday, August 16, 2009 11:03 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, February 20, 2014 3:06 AM
Points: 110, Visits: 319
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
Post #771702
Posted Sunday, August 16, 2009 11:17 PM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Yesterday @ 8:41 PM
Points: 22,491, Visits: 30,185
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.



Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Post #771708
Posted Sunday, August 16, 2009 11:28 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, February 20, 2014 3:06 AM
Points: 110, Visits: 319
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.
Post #771712
Posted Monday, August 17, 2009 3:40 AM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Thursday, April 03, 2014 10:57 AM
Points: 368, Visits: 540
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
SQLServerGeeks.com/blogs/sarab
www.Sarabpreet.com
Twitter: @Sarab_SQLGeek
Post #771766
Posted Monday, August 17, 2009 3:12 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Yesterday @ 4:56 PM
Points: 32,771, Visits: 14,935
Restore doesn't run under a user ID. It runs under the service account. That account might not have rights to that path.






Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #772307
Posted Monday, August 17, 2009 3:46 PM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Yesterday @ 8:41 PM
Points: 22,491, Visits: 30,185
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.



Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Post #772332
Posted Tuesday, December 10, 2013 10:41 PM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: 2 days ago @ 9:57 PM
Points: 1,571, Visits: 690
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





Post #1521740
Posted Wednesday, December 11, 2013 12:01 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Yesterday @ 11:47 AM
Points: 41,525, Visits: 34,442
Please note: 4 year old thread.


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1521753
Posted Wednesday, December 11, 2013 4:53 PM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: 2 days ago @ 9:57 PM
Points: 1,571, Visits: 690
GilaMonster (12/11/2013)
Please note: 4 year old thread.


It was one of "those" days -- I missed the date all together...


Hope this helps...

Ford Fairlane
Rock and Roll Detective





Post #1522098
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse