Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: RMAN -Help

RE: RMAN -Help

From: <Stephen.Lee_at_DTAG.Com>
Date: Thu, 10 Jun 2004 12:12:35 -0500
Message-ID: <D6339830FC73944E889CC3CEADDB205B07909458@bu-dtagpo1.tracs.com>

I don't think you can write a single rman restore script that will work in all situations.
Below is a rather old list of stuff I keep to serve as a reminder. I pick what I need from the list. As you might notice, the list still has svrmgrl in it.

svrmgrl <<-XXX

   connect internal
   startup nomount
   exit
XXX rman <<-XXX

   connect target sys/viper@$ORACLE_SID
   connect rcvcat rman/rman_at_catp4

   run {

      allocate channel ch1 type 'SBT_TAPE'
      parms

'ENV=(NSR_COMPRESSION=TRUE,NSR_GROUP=oracle,NSR_DATA_VOLUME_POOL=oracle,NSR_ SERVER=billybob.tireiron.com)';
      allocate channel ch2 type 'SBT_TAPE'
      parms

'ENV=(NSR_COMPRESSION=TRUE,NSR_GROUP=oracle,NSR_DATA_VOLUME_POOL=oracle,NSR_ SERVER=billybob.tireiron.com)';
      allocate channel ch3 type 'SBT_TAPE'
      parms

'ENV=(NSR_COMPRESSION=TRUE,NSR_GROUP=oracle,NSR_DATA_VOLUME_POOL=oracle,NSR_ SERVER=billybob.tireiron.com)';
      allocate channel ch4 type 'SBT_TAPE'
      parms

'ENV=(NSR_COMPRESSION=TRUE,NSR_GROUP=oracle,NSR_DATA_VOLUME_POOL=oracle,NSR_ SERVER=billybob.tireiron.com)';

### When you want to restore up to, but not including, a specific log
sequence number
### For example, the database wants log 275, but all you have in rman
catalog are 273 and 274
# set until logseq=275 thread=1;

### When you want to restore to a specific time.
# set until time "to_date('2001-02-09 02:00:00','YYYY-MM-DD HH24:MI:SS')";

### Various syntax possibilities for restoring control files

#     restore controlfile to '/u01/oradata/ORACLE_SID/control_01.ctl';
#     restore controlfile to '/u02/oradata/ORACLE_SID/control_02.ctl';
#     restore controlfile to '/u06/oradata/ORACLE_SID/control_03.ctl';
#     replicate controlfile from '/u01/oradata/ORACLE_SID/control_01.ctl';

### The following just restores them all.
### DO NOT restore controlfile when doing a point in time recovery.
# restore controlfile;
      sql 'ALTER DATABASE MOUNT';
      restore database;

### Uncomment the following if you need to have the archive already
present on disk
### restore archivelog all;
      recover database;
      sql 'ALTER DATABASE OPEN RESETLOGS';

      release channel ch1;
      release channel ch2;
      release channel ch3;
      release channel ch4;
      }

XXX
### Various other possibilties below ....

##svrmgrl <<-XXX
## connect internal
## alter database recover using backup controlfile until cancel;
## alter database recover using backup controlfile;
## alter database recover until cancel;
## alter database recover;
## alter database open;
## alter database open resetlogs;
##XXX

echo ""
echo " ------ DON'T FORGET ------ DON'T FORGET ------"
echo "Don't forget to RESET DATABASE in RMAN catalog."
echo " ------ DON'T FORGET ------ DON'T FORGET ------"
echo ""
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Thu Jun 10 2004 - 12:09:40 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US