########################################################
Description :
BIDTST database is accidently dropped before it's RMAN database backups on tapes are removed.
so we need to remove the backups without having BIDTST db mounted.
The doc retains the error messages which help troubleshooting...
Date : June 1, 2011
DBA : Jiulu Sun & Kevin Ma
########################################################
$ rman catalog rman/password@catalog target /
Recovery Manager: Release 10.2.0.4.0 - Production on Thu Jun 2 15:26:52 2011
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: DUMMY (not mounted)
connected to recovery catalog database
RMAN> @generic_config.rman
RMAN> configure channel device type sbt parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo_rman_agcoux043.opt)';
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of configure command at 06/02/2011 15:27:01
RMAN-06004: ORACLE error from recovery catalog database: RMAN-20001: target database not found in recovery catalog
RMAN> CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of configure command at 06/02/2011 15:27:01
RMAN-06004: ORACLE error from recovery catalog database: RMAN-20001: target database not found in recovery catalog
...
RMAN> set dbid=989504976
executing command: SET DBID
database name is "BIDTST" and DBID is 989504976
RMAN> @generic_config.rman
RMAN> configure channel device type sbt parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo_rman_agcoux043.opt)';
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of configure command at 06/02/2011 15:27:21
ORA-01507: database not mounted <-- you cannot configure anything if the db is not mounted.
...
RMAN> **end-of-file**
RMAN> list backup summary; <-- but you still can list backup
List of Backups
===============
Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
------- -- -- - ----------- --------------- ------- ------- ---------- ---
105378 B 0 A SBT_TAPE 20100819-21:54 1 1 YES TAG20100819T213534
254877 B F A SBT_TAPE 20110508-18:44 1 1 NO TAG20110508T184450
RMAN> restore controlfile; <-- now we are able to restore the controlfile.
Starting restore at 20110602-15:30
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=39 devtype=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 06/02/2011 15:30:12
RMAN-06026: some targets not found - aborting restore
RMAN-06101: no channel to restore a backup or copy of the control file
I shutdown the db and removed the controlfile, startup nomount the dummy db again, those output is not included here...
RMAN> run {
2> allocate channel t1 type 'sbt_tape' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo_rman_agcoux043.opt)';
3> restore controlfile; <-- we are able to restore control file
4> }
released channel: ORA_DISK_1
allocated channel: t1
channel t1: sid=39 devtype=SBT_TAPE
channel t1: Data Protection for Oracle: version 5.4.1.0
Starting restore at 20110602-15:31
channel t1: starting datafile backupset restore
channel t1: restoring control file
channel t1: reading from backup piece c-989504976-20110508-01
channel t1: restored backup piece 1
piece handle=c-989504976-20110508-01 tag=TAG20110508T184450
channel t1: restore complete, elapsed time: 00:00:03
output filename=/oracle/10.2.0/dbs/cntrlBIDTST.dbf
Finished restore at 20110602-15:32
released channel: t1
RMAN> shutdown immediate
Oracle instance shut down
RMAN> startup force nomount; <-- startup a dummy database without a spfile
startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/oracle/10.2.0/dbs/initBIDTST.ora'
starting Oracle instance without parameter file for retrival of spfile
Oracle instance started
Total System Global Area 159383552 bytes
Fixed Size 2082504 bytes
Variable Size 67111224 bytes
Database Buffers 83886080 bytes
Redo Buffers 6303744 bytes
RMAN> set dbid=989504976;
executing command: SET DBID
database name is "BIDTST" and DBID is 989504976
RMAN> run {
2> allocate channel t1 type 'sbt_tape' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo_rman_agcoux043.opt)';
3> crosscheck backup; <-- we are able to crosscheck backup with the dummy nomount database
4> }
allocated channel: t1
channel t1: sid=36 devtype=SBT_TAPE
channel t1: Data Protection for Oracle: version 5.4.1.0
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=v1llot17_1_1 recid=1105 stamp=727479335
crosschecked backup piece: found to be 'AVAILABLE'
...
Crosschecked 184 objects
released channel: t1
RMAN> drop database;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
ORA-01507: database not mounted <<-- however, we cannot drop database because it's not mounted
RMAN> run {
2> allocate channel t1 type 'sbt_tape' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo_rman_agcoux043.opt)';
3> delete backup; <-- now let's delete the tape backup with the nomount dummy db
4> }
allocated channel: t1
channel t1: sid=36 devtype=SBT_TAPE
channel t1: Data Protection for Oracle: version 5.4.1.0
List of Backup Pieces
BP Key BS Key Pc# Cp# Status Device Type Piece Name
------- ------- --- --- ----------- ----------- ----------
105387 105378 1 1 AVAILABLE SBT_TAPE v1llot17_1_1
105388 105379 1 1 AVAILABLE SBT_TAPE uullot17_1_1
...
254879 254877 1 1 AVAILABLE SBT_TAPE c-989504976-20110508-01
Do you really want to delete the above objects (enter YES or NO)? yes
\^Hdeleted backup piece
backup piece handle=v1llot17_1_1 recid=1105 stamp=727479335
...
Deleted 184 objects
released channel: t1
RMAN> list backup summary;
<-- nothing left
RMAN>
Description :
BIDTST database is accidently dropped before it's RMAN database backups on tapes are removed.
so we need to remove the backups without having BIDTST db mounted.
The doc retains the error messages which help troubleshooting...
Date : June 1, 2011
DBA : Jiulu Sun & Kevin Ma
########################################################
$ rman catalog rman/password@catalog target /
Recovery Manager: Release 10.2.0.4.0 - Production on Thu Jun 2 15:26:52 2011
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: DUMMY (not mounted)
connected to recovery catalog database
RMAN> @generic_config.rman
RMAN> configure channel device type sbt parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo_rman_agcoux043.opt)';
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of configure command at 06/02/2011 15:27:01
RMAN-06004: ORACLE error from recovery catalog database: RMAN-20001: target database not found in recovery catalog
RMAN> CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of configure command at 06/02/2011 15:27:01
RMAN-06004: ORACLE error from recovery catalog database: RMAN-20001: target database not found in recovery catalog
...
RMAN> set dbid=989504976
executing command: SET DBID
database name is "BIDTST" and DBID is 989504976
RMAN> @generic_config.rman
RMAN> configure channel device type sbt parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo_rman_agcoux043.opt)';
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of configure command at 06/02/2011 15:27:21
ORA-01507: database not mounted <-- you cannot configure anything if the db is not mounted.
...
RMAN> **end-of-file**
RMAN> list backup summary; <-- but you still can list backup
List of Backups
===============
Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
------- -- -- - ----------- --------------- ------- ------- ---------- ---
105378 B 0 A SBT_TAPE 20100819-21:54 1 1 YES TAG20100819T213534
254877 B F A SBT_TAPE 20110508-18:44 1 1 NO TAG20110508T184450
RMAN> restore controlfile; <-- now we are able to restore the controlfile.
Starting restore at 20110602-15:30
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=39 devtype=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 06/02/2011 15:30:12
RMAN-06026: some targets not found - aborting restore
RMAN-06101: no channel to restore a backup or copy of the control file
I shutdown the db and removed the controlfile, startup nomount the dummy db again, those output is not included here...
RMAN> run {
2> allocate channel t1 type 'sbt_tape' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo_rman_agcoux043.opt)';
3> restore controlfile; <-- we are able to restore control file
4> }
released channel: ORA_DISK_1
allocated channel: t1
channel t1: sid=39 devtype=SBT_TAPE
channel t1: Data Protection for Oracle: version 5.4.1.0
Starting restore at 20110602-15:31
channel t1: starting datafile backupset restore
channel t1: restoring control file
channel t1: reading from backup piece c-989504976-20110508-01
channel t1: restored backup piece 1
piece handle=c-989504976-20110508-01 tag=TAG20110508T184450
channel t1: restore complete, elapsed time: 00:00:03
output filename=/oracle/10.2.0/dbs/cntrlBIDTST.dbf
Finished restore at 20110602-15:32
released channel: t1
RMAN> shutdown immediate
Oracle instance shut down
RMAN> startup force nomount; <-- startup a dummy database without a spfile
startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/oracle/10.2.0/dbs/initBIDTST.ora'
starting Oracle instance without parameter file for retrival of spfile
Oracle instance started
Total System Global Area 159383552 bytes
Fixed Size 2082504 bytes
Variable Size 67111224 bytes
Database Buffers 83886080 bytes
Redo Buffers 6303744 bytes
RMAN> set dbid=989504976;
executing command: SET DBID
database name is "BIDTST" and DBID is 989504976
RMAN> run {
2> allocate channel t1 type 'sbt_tape' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo_rman_agcoux043.opt)';
3> crosscheck backup; <-- we are able to crosscheck backup with the dummy nomount database
4> }
allocated channel: t1
channel t1: sid=36 devtype=SBT_TAPE
channel t1: Data Protection for Oracle: version 5.4.1.0
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=v1llot17_1_1 recid=1105 stamp=727479335
crosschecked backup piece: found to be 'AVAILABLE'
...
Crosschecked 184 objects
released channel: t1
RMAN> drop database;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
ORA-01507: database not mounted <<-- however, we cannot drop database because it's not mounted
RMAN> run {
2> allocate channel t1 type 'sbt_tape' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo_rman_agcoux043.opt)';
3> delete backup; <-- now let's delete the tape backup with the nomount dummy db
4> }
allocated channel: t1
channel t1: sid=36 devtype=SBT_TAPE
channel t1: Data Protection for Oracle: version 5.4.1.0
List of Backup Pieces
BP Key BS Key Pc# Cp# Status Device Type Piece Name
------- ------- --- --- ----------- ----------- ----------
105387 105378 1 1 AVAILABLE SBT_TAPE v1llot17_1_1
105388 105379 1 1 AVAILABLE SBT_TAPE uullot17_1_1
...
254879 254877 1 1 AVAILABLE SBT_TAPE c-989504976-20110508-01
Do you really want to delete the above objects (enter YES or NO)? yes
\^Hdeleted backup piece
backup piece handle=v1llot17_1_1 recid=1105 stamp=727479335
...
Deleted 184 objects
released channel: t1
RMAN> list backup summary;
<-- nothing left
RMAN>
Comments
Post a Comment