Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

SQL 2000; Restore Database device error

Posted on 2007-03-27
5
Medium Priority
?
413 Views
Last Modified: 2012-06-27
ALTER DATABASE DatabaseName
SET SINGLE_USER WITH ROLLBACK IMMEDIATE
GO
RESTORE DATABASE DatabaseName
   FROM DISK = 'F:\Nightly_Backups\DtabaseName.BAK'---> this disk on a network (don't know if that makes a difference)

I tried the above and I am getting this error:

Msg 3201, Level 16, State 2, Line 1
Cannot open backup device 'F:\Nightly_Backups\DtabaseName.BAK'. Device error or device off-line. See the SQL Server error log for more details.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.

Any ideas.  Thanks.
0
Comment
Question by:yanci1179
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 20

Expert Comment

by:Sirees
ID: 18801015
Copy the backup to the local machine/server and then do the restore.
0
 
LVL 16

Accepted Solution

by:
rboyd56 earned 2000 total points
ID: 18801408
You cannot restore from a mapped drive.

Create a share to the F drive on the remote machine and use a UNC connection:

ALTER DATABASE DatabaseName
SET SINGLE_USER WITH ROLLBACK IMMEDIATE
GO
RESTORE DATABASE DatabaseName
   FROM DISK = '\\servername\F\Nightly_Backups\DtabaseName.BAK'

The SQL Server service account must have access to the share on the remote machine.
0
 

Author Comment

by:yanci1179
ID: 18802693
hi rboyd56,
I tried this but I am still getting the same error
0
 
LVL 16

Expert Comment

by:rboyd56
ID: 18802776
Log onto the SQL Server machine as the SQL Server service account and see if you can access the share on the remote machine where you are trying to restore the database from. From the error it appears that this account does not have access to the share.

0
 

Author Comment

by:yanci1179
ID: 18815838
Hi rboyd56,
your solution worked.  I had the wrong file. :-)

Thanks for your help!!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question