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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Restoring Oracle Database with Clones

Status
Not open for further replies.

jouell

MIS
Nov 19, 2002
304
0
0
US
Hi.


We duplicate our Oracle Databases to test restores and it works great. How do I make NW use my clones volumes instead? I'd prefer not to mark all volumes "suspect".


I tried :

run {

allocate auxiliary channel a1 type 'sbt_tape' parms 'ENV=(NSR_SERVER=XXX,NSR_CLIENT=YYY,NSR_DATA_VOLUME_POOL=Offsite Oracle)';

allocate channel t1 type 'sbt_tape' parms 'ENV=(NSR_SERVER=XXX,NSR_CLIENT=YYY,NSR_DATA_VOLUME_POOL=Offsite Oracle)';

set until sequence 85413 thread 2;
duplicate target database to mydb nofilenamecheck;

}

This seems to still pull from the main oracle pool and not the offsite one in the allocate command.

Do I need to do anything else?

Anyone else succeed in this?

-john













 
I am in doubt that this works at all although i have to admit that the RMAN script syntax allows a recovery from any pool.

By default, NW looks for the first instance (the original) of a saveset. To recover from a clone, you have these choices:
- set the original save set to "suspect" (what you did)
- you can recover from a clone by specifying the cloneid
recover -S ssid/cloneid

On the other hand, the NMO manual states that NW will use the clone "if the original media is unavailable". For more details, please read chapter 5 (nsrnmoinfo).

 
605,

Thanks for the info. I'll do some more looking into this.
I'll post back what I find , if it differs from what we know now.

-john
 
OK. So, I worked around the networker limitations as you and support suggested.

I am submitting the following script to tek-tips if others would like to pursue this:

(You'll need to grep out the name of your offsite pool in the script....see "Offsite POOL" below)

Regards,
-john


Code:
#!/bin/ksh

if [ -z "$5" ];then
  echo syntax $0 client dayofweek  month date db \(yes|no\)
  exit
fi


#Short name
client=$1

#Day
DAY=$2

#Month
MONTH=$3

#Date
DATE=$4

#Database
DB=$5

#State
STATE=$6


case $STATE in
            yes)   STATE=suspect;;
             no)   STATE=notsuspect;;
              *)   echo yes or no - exiting ; exit 1;;
esac

echo
echo
echo Current suspect savesets
echo
echo

#############################################
mminfo -r "ssid,client,cloneid,name,savetime,volume,pool" -q "suspect" | sort -r  -k 5
#############################################

echo
echo
echo Changing status of savesets 
echo
echo

for EVERY in $(

for EACH  in  $(nsrinfo -n oracle $client | grep -i "$DAY $MONTH $DATE" | grep -i $DB | cut -d "=" -f2 | cut -d " " -f1 ); do    

        mminfo -a -v -q "client=$client,savetime=$EACH" -r "client,ssid,savetime,cloneid,volume,pool" | grep -v -i "Offsite POOL" | grep [0-9] | sort; 

done | awk '{ print $2,$4; }' | sed s#' '#/#g

);do

nsrmm -o $STATE -S "$EVERY"  -y;


done

echo
echo
echo New status of savesets 
echo
echo

############################################
mminfo -r "ssid,client,cloneid,name,savetime,volume,pool" -q "suspect" | sort -r  -k 5
############################################

Disclaimer:
Don't hit enter unless you know what you're doing!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top