Wednesday, June 14, 2017

RMAN Reset a parameter

In order to reset the parameter user keyword clear


CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';


RMAN> CONFIGURE DEFAULT DEVICE TYPE clear;

old RMAN configuration parameters:
CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
RMAN configuration parameters are successfully reset to default value

RMAN> 


New value is 

CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default

RMAN get DB ID

Simple command to get the DB ID or database

RMAN> list db_unique_name of database QA1TST;


List of Databases
DB Key  DB Name  DB ID            Database Role    Db_unique_name
------- ------- ----------------- ---------------  ------------------
8320622 QA1TST   4251438513       PRIMARY          QA1TSTP            
8320622 QA1TST   4251438513       STANDBY          QA1TSTD            

RMAN> 

RMAN-06729: no backup of the SPFILE found to restore

Trying to restore controlfile and getting the error.

RMAN> run {
2> allocate channel c1 type 'sbt_tape' PARMS="SBT_LIBRARY=/opt/simpana/Base/libobk.so,BLKSIZE=262144" TRACE 0;
3> restore spfile to '+DATA/qa1tstp/spfileqa1tstp.ora';
4> }

allocated channel: c1
channel c1: SID=7 device type=SBT_TAPE
channel c1: CommVault Systems for Oracle: Version 10.0.0(BUILD116)

Starting restore at 14-JUN-17

released channel: c1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 06/14/2017 09:57:42
RMAN-06026: some targets not found - aborting restore
RMAN-06729: no backup of the SPFILE found to restore

RMAN>


Fixed it by specifying restore spfile from autoback. It actually went through every day and tried to restore the spfile.

RMAN> run {
2> allocate channel c1 type 'sbt_tape' PARMS="SBT_LIBRARY=/opt/simpana/Base/libobk.so,BLKSIZE=262144" TRACE 0;
3> restore spfile from autobackup;
4> }

allocated channel: c1
channel c1: SID=7 device type=SBT_TAPE
channel c1: CommVault Systems for Oracle: Version 10.0.0(BUILD116)

Starting restore at 14-JUN-17

channel c1: looking for AUTOBACKUP on day: 20170614
channel c1: looking for AUTOBACKUP on day: 20170613
channel c1: looking for AUTOBACKUP on day: 20170612
channel c1: looking for AUTOBACKUP on day: 20170611
channel c1: looking for AUTOBACKUP on day: 20170610
channel c1: looking for AUTOBACKUP on day: 20170609
channel c1: AUTOBACKUP found: c-4251738512-20170609-03
channel c1: restoring spfile from AUTOBACKUP c-4251738512-20170609-03
channel c1: SPFILE restore from AUTOBACKUP complete
Finished restore at 14-JUN-17
released channel: c1

RMAN>