cancel
Showing results for 
Search instead for 
Did you mean: 

failed to restore a SQL db to another location

DanielYan
Level 3

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/how-backup-and-restore-microsoft-sql-server-backup-netbackup

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

1 ACCEPTED SOLUTION

Accepted Solutions

Mark_Solutions
Level 6
Partner Accredited Certified

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

View solution in original post

3 REPLIES 3

Mark_Solutions
Level 6
Partner Accredited Certified

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

Sagar_Kolhe
Level 6

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

DanielYan
Level 3

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

follow up: succeeded! thanks again