David Todd
asked on
Restore can't access backup file
Hi Experts,
A third party vendor was given a database backup, did some work on it, and returned the updated backup.
Running
restore filelistonly
from disk = N'Somelocaldiskpaththatisr eallyasanb ecausemach ineisvm'
returned
Msg 3201, Level 16, State 2, Line 1
Cannot open backup device 'Somelocaldiskpaththatisre allyasanbe causemachi neisvm'. Operating system error 2(error not found).
Msg 3013, Level 16, State 1, Line 1
RESTORE FILELIST is terminating abnormally.
Occasionally the Operating system error 3 appeared.
Research shows that this is a permissions issue, that the sql service account doesn't have rights on the file.
But it DID have rights to the file and the folder. In fact, I copied the file into the backup folder for the originating database and still nothing.
Having figured out that it was a rights issue, I copied the backup file to a test server, checked the rights and the restore filelistonly worked.
Meanwhile, the vendor talked me through restoring the backup using the SSMS gui. (I was using SSMS 2008R2 from a test server.) The gui worked!
So, my question is, why would the gui work and the script NOT work?
Regards
David
PS Further Details
Server SQL 2005 sp3
Windows 2003 sp2
Backup size is around 1.5GB
A third party vendor was given a database backup, did some work on it, and returned the updated backup.
Running
restore filelistonly
from disk = N'Somelocaldiskpaththatisr
returned
Msg 3201, Level 16, State 2, Line 1
Cannot open backup device 'Somelocaldiskpaththatisre
Msg 3013, Level 16, State 1, Line 1
RESTORE FILELIST is terminating abnormally.
Occasionally the Operating system error 3 appeared.
Research shows that this is a permissions issue, that the sql service account doesn't have rights on the file.
But it DID have rights to the file and the folder. In fact, I copied the file into the backup folder for the originating database and still nothing.
Having figured out that it was a rights issue, I copied the backup file to a test server, checked the rights and the restore filelistonly worked.
Meanwhile, the vendor talked me through restoring the backup using the SSMS gui. (I was using SSMS 2008R2 from a test server.) The gui worked!
So, my question is, why would the gui work and the script NOT work?
Regards
David
PS Further Details
Server SQL 2005 sp3
Windows 2003 sp2
Backup size is around 1.5GB
Operating system error 3 is "The system cannot find the path specific" and operating system error 2 is "The system cannot find the file specific". If it were a permissions issue you would get an operating system error 5.
You can resolve operating system errors by running the following from cmd...
Based on your error codes you are either typing the path wrong or the file name wrong. From SSMS get to the point where you are about to hit the restore button and then script it to a query window and compare with the statement you have written.
You can resolve operating system errors by running the following from cmd...
net helpmsg 2
Based on your error codes you are either typing the path wrong or the file name wrong. From SSMS get to the point where you are about to hit the restore button and then script it to a query window and compare with the statement you have written.
Do you require further assistance?
ASKER
Hi Folks,
Thanks for your interest, but you haven't answered my question.
Given I went over and over the path and filename, copying from Explorer, the chance I got them wrong is pretty small.
Yes I was dealing with the correct service user accounts - I was also cribbing off the backup files from the server, and comparing their rights to the file I was trying to restore.
On some modem systems there is a block attribute/flag on downloaded files, but I couldn't find that to turn it off.
While there is no immediate pressure or constraint to solve this issue currently, restoring a vendors backup is part of what a DBA does, so I want to know for next time. I still have the file, and its relatively small, so I can practice.
Regards
David
Thanks for your interest, but you haven't answered my question.
Given I went over and over the path and filename, copying from Explorer, the chance I got them wrong is pretty small.
Yes I was dealing with the correct service user accounts - I was also cribbing off the backup files from the server, and comparing their rights to the file I was trying to restore.
On some modem systems there is a block attribute/flag on downloaded files, but I couldn't find that to turn it off.
While there is no immediate pressure or constraint to solve this issue currently, restoring a vendors backup is part of what a DBA does, so I want to know for next time. I still have the file, and its relatively small, so I can practice.
Regards
David
Are you not getting operating system error 2 or 3 any more then as the error would be different were it a permissions issue?
ASKER
Hi
Still getting that error for SQL script.
Regards
David
Still getting that error for SQL script.
Regards
David
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks!
Despite all the care in the world I managed to muddle the path and filename enough that my translation of the actual error is file not found.
The original file - as I guessed - was from a more recent version of SQL and when I got the path correct got the more expected error
"The media family on device 'D:\MSSQL2005X64\MEX_PROD\ MSSQL.1\MS SQL\Restor e\New Folder\MEXDB_After_Import_ 28062013.b ak' is incorrectly formed. SQL Server cannot process this media family."
Reason for the grade of A was the prompt to let the GUI script things out. Doing so showed where I had gone adrift. Many thanks.
Regards
David
Despite all the care in the world I managed to muddle the path and filename enough that my translation of the actual error is file not found.
The original file - as I guessed - was from a more recent version of SQL and when I got the path correct got the more expected error
"The media family on device 'D:\MSSQL2005X64\MEX_PROD\
Reason for the grade of A was the prompt to let the GUI script things out. Doing so showed where I had gone adrift. Many thanks.
Regards
David
No probs. You would not believe the amount of times I do exactly the same thing so your not alone!
ASKER
Thanks for the encouragement!
1. You sure you have the correct SQL Service Account?
> Getting the SQL Service Account:
> Start > Run > services.msc
> Locate SQL Server service > Right Click > Properties > Log on tab
> Here you will see what the SQL Service Account is.
2. How do you execute the script? From the same machine? How do you connect?