Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Restore Oracle DB from online backup 1

Status
Not open for further replies.

JtheRipper

IS-IT--Management
Oct 4, 2002
274
0
0
GB
Hi there,

I recently started using Veritas Netbackup to backup our database online using the build-in RMAN scripts. The backup works fine, and I can restore the database BUT only if the database is in a mounted state, i.e. so I can only perform a restore if I lost a data file or something, but cannot restore the database to another server for example.

Does anyone have an idea on what I might be doing wrong here?

Thanks,
J.
 
Hi,

Yes. It is possible to restore to an alternate host with RMAN & NBU. You have to allow NBU to restore that backup to the other host (alternate client restore), but the restore itself is more an Oracle then Veritas procedure. Anyway, check the link at It has a lot of useful information on this subject.
I have done it a couple of times with help from a DBA, but it was about 1 year ago... I migth have some info documented somewere... Please let me know if you need more help.

Regards,
MrLula
 
It's also been some ime since I was involved in doing this. I do seem to remember that I had to make a change inside the image database in order for the client to search the correct client directory. Sorry. I'm not much help on this one.

Bob Stump
Just because the VERITAS documentation states a certain thing does not make it a fact and thats the truth
 
Hi,

Thanks for the feedback guys.

I restored a full copy of the database, but only when initialized from the actual client using Rman, not from Netbackup. Starting to get a bit of a "disliking" in Netbackup...

J.
 
Have you not looked into doing RMAN Duplicate, ie you backup the database in hot backup mode and you can restore the entire database to another server, and fromm there even configure the DB to have a different name etc. We have been doing this for years to refresh test databases from our Production boxes. The Duplicate process is very straightforward (i'm no DBA but i know how it hangs together), so if this is what you want let me know and i'll dig out the scripts etc
 
Hi,

Thanks for that creakyjoe. I'll have a look at the command and when stuck let you know for those scripts.

Thanks,
J.
 
Script for the RMAN Duplicate, which calls an input file, detailed below -->

#!/bin/ksh

BACKUP_DIR=/home/oracle;export BACKUP_DIR
NB_ORA_CLASS=CL_PRODDB_s1;export NB_ORA_CLASS
NB_ORA_SCHED=SCH_PRODDB;export NB_ORA_SCHED
NB_ORA_SERV=vtnthnbkup-bkp;export NB_ORA_SERV

<lots of Oracle params snipped for brevity>
export NSR_CLIENT=vtnthe450
export NSR_SERVER=vtnthnbkup-bkp

/u01/app/oracle/product/8.1.7/bin/rman catalog=username/password@ANGELINA.JOLIE.WORLD target=username/password@NATASHA.HENSTRIDGE.WORLD auxiliary=username/password@JENNIFER.LOVE.HEWITT.WORLD log=/home/oracle/duplicate_train.log cmdfile=/home/oracle/duplicate_train.rcv



Input RCV file (/home/oracle/duplicate_train.rcv) -->

run {

allocate auxiliary channel aux1 type 'sbt_tape' PARMS 'ENV=(NB_ORA_SERV=vtnthnbkup, NB_ORA_CLIENT=vtnthsun01)';
allocate auxiliary channel aux2 type 'sbt_tape' PARMS 'ENV=(NB_ORA_SERV=vtnthnbkup, NB_ORA_CLIENT=vtnthsun01)';
allocate auxiliary channel aux3 type 'sbt_tape' PARMS 'ENV=(NB_ORA_SERV=vtnthnbkup, NB_ORA_CLIENT=vtnthsun01)';

set newname for datafile 1 to '/u02/oradata/TRAIN/systemTRAIN01.dbf';
<blah blah remove other lines for brevity>
set newname for datafile 47 to '/u05/oradata/TRAIN/vartec_austrianTRAIN01.dbf';

duplicate target database to 'TRAIN'
logfile GROUP 1 ('/u02/oradata/TRAIN/redoTRAIN01a.log','/u04/oradata/TRAIN/redoTRAIN01b.log') SIZE 500M,
GROUP 2 ('/u03/oradata/TRAIN/redoTRAIN02a.log','/u02/oradata/TRAIN/redoTRAIN02b.log') SIZE 500M,
GROUP 3 ('/u04/oradata/TRAIN/redoTRAIN03a.log','/u03/oradata/TRAIN/redoTRAIN03b.log') SIZE 500M,
GROUP 4 ('/u06/oradata/TRAIN/redoTRAIN04a.log','/u07/oradata/TRAIN/redoTRAIN04b.log') SIZE 500M;

release channel aux1;
release channel aux2;
release channel aux3;
}




In the rcv file -->
'NB_ORA_CLIENT' is where the ORIGINAL data came from, ie the source database.
'NSR_SERVER' is the backup server.
'NSR_CLIENT' is the server where data is going TO.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top