Solved

SQL 2000; Restore Database device error

Posted on 2007-03-27
5
410 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 500 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

623 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