Rac Cache Fusion Flow
http://www.datadisk.co.uk/html_docs/rac/cache_fusion.htm
http://www.datadisk.co.uk/html_docs/rac/cache_fusion.htm
$ rman target / RMAN> SHOW ALL; CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 4 DAYS;
RMAN> LIST BACKUP SUMMARY; List of Backups =============== Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag ------- -- -- - ----------- --------------- ------- ------- ---------- --- 624 B F A DISK 06-JUN-14 1 1 YES TAG20140606T220138 625 B F A DISK 06-JUN-14 1 1 YES TAG20140606T220138 626 B F A DISK 06-JUN-14 1 1 NO TAG20140606T221610 627 B F A DISK 13-JUN-14 1 1 YES TAG20140613T220147 .. .. 666 B F A DISK 05-SEP-14 1 1 YES TAG20140905T220151 667 B F A DISK 12-SEP-14 1 1 YES TAG20140912T220151 668 B F A DISK 19-SEP-14 1 1 YES TAG20140919T220152 669 B F A DISK 26-SEP-14 1 1 YES TAG20140926T220206
RMAN> CROSSCHECK BACKUP; allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=37 device type=DISK allocated channel: ORA_DISK_2 channel ORA_DISK_2: SID=22 device type=DISK crosschecked backup piece: found to be 'AVAILABLE' backup piece handle=/rman-backups/dev-db/full_okpa6ke3_788_1 RECID=642 STAMP=849564099 crosschecked backup piece: found to be 'AVAILABLE' .. .. backup piece handle=/rman-backups/dev-db/full_qvpiu46h_863_1 RECID=686 STAMP=858722513 crosschecked backup piece: found to be 'AVAILABLE' backup piece handle=/rman-backups/dev-db/full_r4pjgir0_868_1 RECID=687 STAMP=859327328 Crosschecked 46 objects
RMAN> DELETE OBSOLETE; RMAN retention policy will be applied to the command RMAN retention policy is set to recovery window of 4 days using channel ORA_DISK_1 using channel ORA_DISK_2 Deleting the following obsolete backups and copies: Type Key Completion Time Filename/Handle -------------------- ------ ------------------ -------------------- Backup Set 625 06-JUN-14 Backup Piece 643 06-JUN-14 /rman-backups/dev-db/full_ojpa6ke3_787_1 Backup Set 624 06-JUN-14 Backup Piece 642 06-JUN-14 /rman-backups/dev-db/full_okpa6ke3_788_1 .. .. Backup Set 664 05-SEP-14 Backup Piece 682 05-SEP-14 /rman-backups/dev-db/full_qjphp6ug_851_1 Backup Set 667 12-SEP-14 Backup Piece 685 12-SEP-14 /rman-backups/dev-db/full_qqpiblig_858_1 Do you really want to delete the above objects (enter YES or NO)? YES
backup piece handle=/rman-backups/dev-db/full_ojpa6ke3_787_1 RECID=643 STAMP=849564099 deleted backup piece backup piece handle=/rman-backups/dev-db/full_okpa6ke3_788_1 RECID=642 STAMP=849564099 deleted backup piece .. .. backup piece handle=/rman-backups/dev-db/full_qjphp6ug_851_1 RECID=682 STAMP=857512912 deleted backup piece backup piece handle=/rman-backups/dev-db/full_qqpiblig_858_1 RECID=685 STAMP=858117712 Deleted 40 objects
RMAN> DELETE NOPROMPT OBSOLETE;
RMAN> DELETE OBSOLETE RECOVERY WINDOW OF 10 DAYS;
RMAN> LIST BACKUP SUMMARY; List of Backups =============== Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag ------- -- -- - ----------- --------------- ------- ------- ---------- --- 661 B F A DISK 29-AUG-14 1 1 YES TAG20140829T220152 663 B F A DISK 29-AUG-14 1 1 NO TAG20140829T221624 665 B F A DISK 05-SEP-14 1 1 YES TAG20140905T220151 666 B F A DISK 05-SEP-14 1 1 YES TAG20140905T220151 668 B F A DISK 19-SEP-14 1 1 YES TAG20140919T220152 669 B F A DISK 26-SEP-14 1 1 YES TAG20140926T220206
RMAN-06207: WARNING: 20036 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: ========================== RMAN-06212: Object Type Filename/Handle RMAN-06213: --------------- --------------------------------------------------- RMAN-06214: Backup Piece /rman-backup/sales-db/full_52ob26cd_149666_1 RMAN-06214: Backup Piece /rman-backup/sales-db/full_50ob26cd_149664_1
RMAN> CROSSCHECK BACKUP; allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=453 devtype=DISK allocated channel: ORA_DISK_2 channel ORA_DISK_2: sid=435 devtype=DISK crosschecked backup piece: found to be 'AVAILABLE' backup piece handle=/rman-backup/sales-db/full_4cpqjjca_196748_1 recid=217396 stamp=866766218 crosschecked backup piece: found to be 'AVAILABLE' backup piece handle=/rman-backup/sales-db/full_4epqjjca_196750_1 recid=217397 stamp=866766218 .. .. crosschecked backup piece: found to be 'EXPIRED' backup piece handle=/rman-backup/sales-db/ctl_c-863661937-20141013-19 recid=211590 stamp=860879752 crosschecked backup piece: found to be 'EXPIRED' backup piece handle=/rman-backup/sales-db/ctl_c-863661937-20141013-1a recid=211591 stamp=860879769 Crosschecked 1253 objects
RMAN> LIST BACKUP SUMMARY; List of Backups =============== Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag ------- -- -- - ----------- --------------- ------- ------- ---------- --- 728642 B A X DISK 29-SEP-14 1 1 YES DBARCHLOGS_20140929 728643 B A X DISK 29-SEP-14 1 1 YES DBARCHLOGS_20140929 .. .. 819598 B A A DISK 29-DEC-14 1 1 YES DBARCHLOGS_20141229 819607 B F A DISK 29-DEC-14 1 1 NO TAG20141229T161328
RMAN> DELETE EXPIRED BACKUP; using channel ORA_DISK_1 using channel ORA_DISK_2 List of Backup Pieces BP Key BS Key Pc# Cp# Status Device Type Piece Name ------- ------- --- --- ----------- ----------- ---------- 728642 728712 1 1 EXPIRED DISK /rman-backup/sales-db/full_52ob26cd_149666_1 728643 728713 1 1 EXPIRED DISK /rman-backup/sales-db/full_50ob26cd_149664_1 .. .. Do you really want to delete the above objects (enter YES or NO)?
backup piece handle=/rman-backup/sales-db/full_52ob26cd_149666_1 RECID=591 STAMP=840751343 deleted backup piece backup piece handle=/rman-backup/sales-db/full_50ob26cd_149664_1 RECID=592 STAMP=840752380 deleted backup piece .. Deleted 107 EXPIRED objects
RMAN> LIST BACKUP SUMMARY; List of Backups =============== Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag ------- -- -- - ----------- --------------- ------- ------- ---------- --- 809652 B F A DISK 20-DEC-14 1 1 YES DBFULLFILE_20141220 809653 B F A DISK 20-DEC-14 1 1 YES DBFULLFILE_20141220 809654 B F A DISK 20-DEC-14 1 1 YES DBFULLFILE_20141220 809655 B F A DISK 20-DEC-14 1 1 YES DBFULLFILE_20141220 809656 B F A DISK 20-DEC-14 1 1 YES DBFULLFILE_20141220 .. .. 819598 B A A DISK 29-DEC-14 1 1 YES DBARCHLOGS_20141229 819607 B F A DISK 29-DEC-14 1 1 NO TAG20141229T161328
select 'You may need to increase the SHARED_POOL_RESERVED_SIZE' Description,
'Request Failures = '||REQUEST_FAILURES Logic
from v$shared_pool_reserved
where REQUEST_FAILURES > 0
and 0 != (
select to_number(VALUE)
from v$parameter
where NAME = 'shared_pool_reserved_size')
union
select 'You may be able to decrease the SHARED_POOL_RESERVED_SIZE' Description,
'Request Failures = '||REQUEST_FAILURES Logic
from v$shared_pool_reserved
where REQUEST_FAILURES < 5
and 0 != (
select to_number(VALUE)
from v$parameter
where NAME = 'shared_pool_reserved_size')
select OWNER,
NAME||' - '||TYPE object,
SHARABLE_MEM
from v$db_object_cache
where SHARABLE_MEM > 10000
and type in ('PACKAGE','PACKAGE BODY','FUNCTION','PROCEDURE')
order by SHARABLE_MEM desc
select OWNER,
NAME||' - '||TYPE object,
LOADS
from v$db_object_cache
where LOADS > 3
and type in ('PACKAGE','PACKAGE BODY','FUNCTION','PROCEDURE')
order by LOADS desc
select OWNER,
NAME||' - '||TYPE object,
EXECUTIONS
from v$db_object_cache
where EXECUTIONS > 100
and type in ('PACKAGE','PACKAGE BODY','FUNCTION','PROCEDURE')
order by EXECUTIONS desc
select OWNER,
NAME,
DB_LINK,
NAMESPACE,
TYPE,
SHARABLE_MEM,
LOADS,
EXECUTIONS,
LOCKS,
PINS
from v$db_object_cache
order by OWNER, NAME
select NAMESPACE,
GETS,
GETHITS,
round(GETHITRATIO*100,2) gethit_ratio,
PINS,
PINHITS,
round(PINHITRATIO*100,2) pinhit_ratio,
RELOADS,
INVALIDATIONS
from v$librarycache
select NAME,
VALUE
from v$parameter
where NAME like '%reser%'
select NAME,
TYPE,
KEPT
from v$db_object_cache
where KEPT = 'YES'