Sunday 20 April 2014

How catalog / re-catalog expired/deleted backups information

You may need  to catalog backup pieces in the following situations:
  • You copy or move a backup piece with an operating system utility and want it to be usable by RMAN.
  • The RMAN metadata for the backup piece was removed, but the backup piece still exists. This situation can occur if you ran the DELETE command on a backup piece that was only temporarily unavailable.
  • You make a NOCATALOG backup on one database host in a Data Guard environment and move the backup piece to the same location on a different database host. In this case, the recovery catalog has no record of the original backup piece.
  • You do not use a recovery catalog and must re-create the control file, thereby losing all RMAN repository data. Cataloging your backups makes them available again.
  • When control file autobackup is disabled, you back up the control file and then back up the archived redo logs. You can restore and mount the control file, but must catalog the backup pieces containing the archived redo logs backed up after the control file.
But it's not possible to use the CATALOG command for backup pieces stored in TAPE.  This note explains how to add backuppieces stored in TAPE to the repository




TSM Server  :  Storage Management Server for AIX - Version 6, Release 3, Level 3.200

TSM client  :  Client Version 6, Release 2, Level 1.0

TDP Client  :  Data Protection for Oracle Version 6, Release 3, Level 0.0



Query used to  find the data on tape 

tsm: TSMPRD1>select object_id from backups where node_name='ORA_MONTHLY' and ll_name like 'c-2934614354-20130201-%'

            OBJECT_ID
---------------------
            212535474
            212535498

tsm: TSMPRD1>show bfo 212535498

Bitfile Object: 212535498
  Active
**Archival Bitfile Entry
  Bitfile Type: PRIMARY  Storage Format: 22
  Bitfile Size: 67117613  Number of Segments: 1, flags: 0
  Storage Pool ID: 12  Volume ID: 5893  Volume Name: AHB044L4
**Archival Bitfile Entry
  Bitfile Type: COPY  Storage Format: 22
  Bitfile Size: 67117613  Number of Segments: 1, flags: 0
  Storage Pool ID: -8  Volume ID: 29076  Volume Name: AHB063L5

tsm: TSMPRD1>



tsm: TSMPRD1>q cont AHB044L4

Node Name           Type     Filespace      FSID     Client's Name for File
                             Name
---------------     ----     ----------     ----     --------------------------------------
_ORA_MONTHLY Bkup /adsmorc 1 //67o0qnjt_1_1
_ORA_MONTHLY Bkup /adsmorc 1 //6bo0qnoi_1_1
_ORA_MONTHLY Bkup /adsmorc 1 //6co0qnr7_1_1
_ORA_MONTHLY Bkup /adsmorc 1 //6do0qnts_1_1
_ORA_MONTHLY Bkup /adsmorc 1 //6eo0qo0r_1_1
_ORA_MONTHLY Bkup /adsmorc 1 //6fo0qo3q_1_1
_ORA_MONTHLY Bkup /adsmorc 1 //6go0qo6g_1_1
_ORA_MONTHLY Bkup /adsmorc 1 //6ho0qo9f_1_1
_ORA_MONTHLY Bkup /adsmorc 1 //6io0qoc4_1_1
_ORA_MONTHLY Bkup /adsmorc 1 //6jo0qoep_1_1
_ORA_MONTHLY Bkup /adsmorc 1 //6ko0qohe_1_1
_ORA_MONTHLY Bkup /adsmorc 1 //6lo0qokd_1_1
_ORA_MONTHLY Bkup /adsmorc 1 //6mo0qonc_1_1
_ORA_MONTHLY Bkup /adsmorc 1 //6no0qopd_1_1
_ORA_MONTHLY Bkup /adsmorc 1 //6oo0qoqr_1_1
_ORA_MONTHLY Bkup /adsmorc 1 //6po0qosi_1_1
_ORA_MONTHLY Bkup /adsmorc 1 //6qo0qotl_1_1
_ORA_MONTHLY Bkup /adsmorc 1 //6ro0qoue_1_1
_ORA_MONTHLY Bkup /adsmorc 1 //6so0qout_1_1
_ORA_MONTHLY Bkup /adsmorc 1 //6to0qovc_1_1
_ORA_MONTHLY Bkup /adsmorc 1 //6uo0qovj_1_1
_ORA_MONTHLY Bkup /adsmorc 1 //6vo0qovr_1_1
_ORA_MONTHLY Bkup /adsmorc 1 //70o0qovu_1_1
_ORA_MONTHLY Bkup /adsmorc 1 //c-2934614354-20130131-02
_ORA_MONTHLY Bkup /adsmorc 1 //72o0qp67_1_1
_ORA_MONTHLY Bkup /adsmorc 1 //73o0qp6o_1_1
_ORA_MONTHLY Bkup /adsmorc 1 //74o0qp78_1_1
_ORA_MONTHLY Bkup /adsmorc 1 //75o0qp7o_1_1


RMAN>CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE'
     parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/takaful_tdpo.opt)';
RMAN> CATALOG DEVICE TYPE 'SBT_TAPE' BACKUPPIECE '75o0qp7o_1_1';



Monday 7 April 2014

ORA-29280: invalid directory path

Solution: Write the directory name in capital letter

Sunday 6 April 2014

ORA-01102: cannot mount database in EXCLUSIVE mode

SQL> startup
ORACLE instance started.
 
Total System Global Area  835104768 bytes
Fixed Size                  2232960 bytes
Variable Size             285216128 bytes
Database Buffers          541065216 bytes
Redo Buffers                6590464 bytes
ORA-01102: cannot mount database in EXCLUSIVE mode
Database alert log might show following error.
Wed Sep 04 05:35:30 2013
ALTER DATABASE   MOUNT
sculkget: failed to lock /oranfs1/RHAP1/oracle/product/11.2/dbs/lkBRTEST1 exclusive
sculkget: lock held by PID: 64
ORA-09968: unable to lock file
Linux-x86_64 Error: 11: Resource temporarily unavailable
You might have already ensured that no other instances of this Oracle database is running on this server.
[oracle@RHAP1 ~]$ ps -ef | grep pmon
grid     26377     1  0 Sep03 ?        00:00:00 asm_pmon_+ASM
oracle   28239 26946  0 06:04 pts/0    00:00:00 grep pmon
[oracle@RHAP1 ~]$
Solution
Check for the file pointed by alert log. In my case it was $ORACLE_HOME/dbs/lkBRTEST1 i.e lk. Delete this file and starup the instance.
[oracle@RHAP1 ~]$ cd /oranfs1/RHAP1/oracle/product/11.2/dbs
[oracle@RHAP1 dbs]$ ls -ltr lkBRTEST1
-rw-r----- 1 oracle oinstall 24 Aug 26 07:07 lkBRTEST1
[oracle@RHAP1 dbs]$ rm -rf lkBRTEST1
SQL> startup
ORACLE instance started.
 
Total System Global Area  835104768 bytes
Fixed Size                  2232960 bytes
Variable Size             285216128 bytes
Database Buffers          541065216 bytes
Redo Buffers                6590464 bytes
Database mounted.
Database opened.
In some cases sgadef.dbf file under $ORACLE_HOME/dbs can also cause the issue. You can delete this file as well and try to startup the instance.
This issue is more likely to happen when ORACLE_HOME & database files resides on NFS. NFS should be configured properly to release any locks after a server or database crash.

Number of Visitors