Archive for 02/01/2013 - 03/01/2013

Delete Force Noprompt Backuppiece


In some cases you may not be able to delete the obsolete RMAN backup pieces that are visible with “report obsolete” command. In my case, after a switchover, i was getting the following error when my daily backup scripts tries to delete obsolete backups after the crosscheck:

RMAN-06216: WARNING: db_unique_name mismatch - 334 objects could not be updated
RMAN-06218: List of objects requiring same operation on database with db_unique_name XXX

And when i try to delete these object by connecting the standby (old primary) database as RMAN target, i get this error:

RMAN-06207: WARNING: 334 objects could not be deleted for DISK channel(s) due
RMAN-06208:          to mismatched status.  Use CROSSCHECK command to fix status
RMAN-06210: List of Mismatched objects
RMAN-06211: ==========================
....

Even i re-run the crosscheck, i wasn’t able to delete the obsolete backup pieces having the same error. So, i used “delete noprompt force backuppiece” command to get rid of these obsolete backup information. Below is the example of RMAN run block: (Tape channel is configured for TSM)


run
{
allocate channel c1 device type disk;
allocate channel c2 type 'sbt_tape' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)' connect='user/passwd@bckpsrv';
delete force noprompt backuppiece 'pamahdkt_1_1';
delete force noprompt backuppiece 'p9mahdkt_1_1';
delete force noprompt backuppiece 'p2mahdkr_1_1';
...
release channel c11;
}

Moving OCR & Voting Files In 11gR1 (Using Raw Devices)


-- Query current status of OCR and Voting Files:

oracle@server1:/> cat /etc/oracle/ocr.loc 
ocrconfig_loc=/dev/ocr1_test11g
ocrmirrorconfig_loc=/dev/ocr2_test11g
local_only=FALSE

oracle@server1:/> crsctl query css votedisk
 0.     0    /dev/voting1_test11g
 1.     0    /dev/voting2_test11g
 2.     0    /dev/voting3_test11g
Located 3 voting disk(s).


-- Check OCR integrity with either ocrcheck or “cluvfy comp ocr” command:

oracle@server1:/> ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          2
         Total space (kbytes)     :    1048300
         Used space (kbytes)      :       4656
         Available space (kbytes) :    1043644
         ID                       :  182479978
         Device/File Name         : /dev/ocr1_test11g
                                    Device/File integrity check succeeded
         Device/File Name         : /dev/ocr2_test11g
                                    Device/File integrity check succeeded
         Cluster registry integrity check succeeded
         Logical corruption check bypassed due to non-privileged user

oracle@server1:/> cluvfy comp ocr -n db1,db2,db3 -verbose
Verifying OCR integrity 
Checking OCR integrity...
Checking the absence of a non-clustered configuration...
All nodes free of non-clustered, local-only configurations.
Uniqueness check for OCR device passed.
Checking the version of OCR...
OCR of correct Version "2" exists.
Checking data integrity of OCR...
Data integrity check for OCR passed.
OCR integrity check passed.
Verification of OCR integrity was successful. 

Basic Oracle LogMiner Steps

This is a quick note about using LogMiner for mining archived redo logs on the database itself. (Source and mining databases are same)
- Specify a dictionary file with the following procedure:
EXECUTE DBMS_LOGMNR_D.BUILD('dictionary.ora','/oracle/acs/logmnr', OPTIONS => DBMS_LOGMNR_D.STORE_IN_FLAT_FILE);

- Determine the minimum and maximum archived log sequences that is in the mining scope.


- Specify one archived log file with DBMS_LOGMNR.ADD_LOGFILE procedure, dbms_logmnr.NEW option. Then we can add other archived log sequences with dbms_logmnr.ADDFILE option:

EXECUTE DBMS_LOGMNR.ADD_LOGFILE( LOGFILENAME => '+ARCH1/xx/archivelog/2013_01_28/thread_2_seq_31844.932.805914077', OPTIONS => dbms_logmnr.NEW); 
EXECUTE DBMS_LOGMNR.ADD_LOGFILE( LOGFILENAME => '+ARCH1/xxx/archivelog/2013_01_28/thread_2_seq_31844.932.805914077', OPTIONS => dbms_logmnr.ADDFILE); 
EXECUTE DBMS_LOGMNR.ADD_LOGFILE( LOGFILENAME => '+ARCH1/xxx/archivelog/2013_01_28/thread_2_seq_31845.1334.805914145', OPTIONS => dbms_logmnr.ADDFILE); 
EXECUTE DBMS_LOGMNR.ADD_LOGFILE( LOGFILENAME => '+ARCH1/xxx/archivelog/2013_01_28/thread_2_seq_31846.1062.805914271', OPTIONS => dbms_logmnr.ADDFILE);


Powered by Blogger.

Page Views

- Copyright © Emre Baransel - Oracle Blog -Metrominimalist- Powered by Blogger - Designed by Johanes Djogan -