February 10, 2009 at 11:31 am
I am trying to restore a database from a prod to a test server.
Prod SQL server is running under corp\domain_name1.
The test SQL server is running under test\domain_name2.
Now will this create issues??
I am trying to run this script as a job
RESTORE DATABASE [test_db_name]
FROM DISK = N'\\prod_server_name\drive$\sqldumps\prod_db_name.BAK' WITH FILE = 1, UNLOAD , STATS = 10, RECOVERY , REPLACE,
MOVE N'file_name' TO N'R:\SqlData\MSSQL\Data\test_db_name_data.mdf',
MOVE N'file_name_log' TO N'R:\SqlData\MSSQL\Data\test_db_name_log.ldf'
I am getting this error message.
BackupDiskFile::OpenMedia: Backup device '\\server_name\r$\sqldumps\prod_db_name.BAK' failed to open. Operating system error = 1326(Logon failure: unknown user name or bad password.).
Any ideas ??
February 10, 2009 at 11:38 am
Seems to be a permissions problem. You can run the following to validate that it has nothing to do with the restore;
RESTORE FILELISTONLY
FROM DISK = N'\\prod_server_name\drive$\sqldumps\prod_db_name.BAK'
If you can't run that it is definitely a permissions issue. Post back with your findings.
David
@SQLTentmaker“He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot
February 10, 2009 at 11:43 am
Yes I believe that is hte issue.
The mesage I got was
Server: Msg 3201, Level 16, State 2, Line 1
Cannot open backup device '\\prod_server_name\drive$\sqldumps\Prod_db.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 FILELIST is terminating abnormally.
The error log had this message.
BackupDiskFile::OpenMedia: Backup device '\\prod_server_name\drive$\sqldumps\Prod_db.BAK'failed to open. Operating system error = 1326(Logon failure: unknown user name or bad password.).
February 10, 2009 at 11:44 am
So this means that the issue is with server level permissions correct?
February 10, 2009 at 12:26 pm
Yes.
David
@SQLTentmaker“He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot
February 10, 2009 at 1:25 pm
Thank you very much David for the reply. I ended up writing a batch file to copy over the filefrom the Prod server and then doing the restore.
February 10, 2009 at 1:28 pm
Very glad that worked for you and thanks for following up on the post!
David
@SQLTentmaker“He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply