Video Screencast Help
Search Video Help Close Back
to help
Not able to make it to Vision this year? Get a sampling in the Best of Vision on Demand group.

failed to restore a SQL db to another location

Updated: 10 Feb 2012 | 3 comments
DanielYan's picture
0 0 Votes
Login to vote
This issue has been solved. See solution.

Hi gurus,

I have two SQL 2005 DB servers, PROD and DEV. Both have stripped database, which means the test DB is stored on the different volumes, i.e. testDB_Data1.mdf is on F, testDB_Data2.ndf is on G, testDB_Data3.ndf is on H, testDB_Data4.ndf is on I and testDB_log is on E. I take a full backup of testDB on PROD and would like to restore it from tape onto DEV where testDB doesn't exist.

As the 1st try, I got the link below.

https://www-secure.symantec.com/connect/articles/h...

This is a very good article to address the issue though it more likely moves a db from one server to another. During the practice, I found there's not C:\Program Files\Veritas\NetBackup\db folder. I have to create ..\db\altnames folder and create No.Restrictions. After finish the Prerequesite for redirected restore, in NetBackup SQL Client on DEV, I set DEV as the SQL Host and PROD as the Source Client, but I still get "Error encountered trying to read database images".

Below is the script.

OPERATION RESTORE
OBJECTTYPE DATABASE
RESTORETYPE MOVE
 
DATABASE "testDB"

MOVE  "testDB_Data1"
TO  "F:\testDB_Data1.mdf"

MOVE  "testDB_Data2"
TO  "G:\testDB_Data2.ndf"

MOVE  "testDB_Data3"
TO  "H:\testDB_Data3.ndf"

MOVE  "testDB_Data4"
TO  "I:\testDB_Data4.ndf"

MOVE  "testDB_log"
TO  "E:\testDB_log.ldf"

NBIMAGE "PROD.MSSQL7.PROD.db.testDB.~.0.001of001.20120208211734..C"
SQLHOST "DEV"
NBSERVER "mainBackupSRV"
MAXTRANSFERSIZE 6
BLOCKSIZE 0
RESTOREOPTION REPLACE
RECOVEREDSTATE RECOVERED
NUMBUFS 2
ENDOPER TRUE

Can you please point out if I did something wrong or miss steps?

Furthermore, I'd like to restore testDB from tape straightly. Let's say if PROD is offline or dead, what should I do to restore testDB to DEV?

The enviornment: both PROD and DEV are Windows 2k3 EE w/ sp2, SQL 2005, NetBackup SQL Client 6.5. The main backup server is Veritas NetBackup 6.5.6. Please note both servers are stand alone. Logon the server with local administrator account and password is same. Plus, the backup of both servers is encrypted.

Thank you for any inputs/suggestion/help.

Daniel

Comments

Mark_Solutions's picture
10
Feb
2012
0 Votes 0
Login to vote

The db folder refers to the

The db folder refers to the Master Server (which always has this folder) - this is where the No.Restrictions file must be created.

Sounds like you have done this on the client so try on the Master and try again

Authorised Symantec Consultant

Don't forget to give a "Thumbs Up" or mark as "Solution" if someones advice has helped you.

DanielYan's picture
10
Feb
2012
0 Votes 0
Login to vote

thank you for help

revise the input and will update here with result soon. Thanks a lot!

follow up: succeeded! thanks again

Sagar_Kolhe's picture
10
Feb
2012
0 Votes 0
Login to vote

kindly make the script again

kindly make the script again at the poing of MOVE. there has to be drive name.