SQL 2000; Restore Database device error

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.
yanci1179Asked:
Who is Participating?
 
rboyd56Connect With a Mentor Commented:
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
 
SireesCommented:
Copy the backup to the local machine/server and then do the restore.
0
 
yanci1179Author Commented:
hi rboyd56,
I tried this but I am still getting the same error
0
 
rboyd56Commented:
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
 
yanci1179Author Commented:
Hi rboyd56,
your solution worked.  I had the wrong file. :-)

Thanks for your help!!
0
All Courses

From novice to tech pro — start learning today.