================================ ****recreating password file**** ================================ check parameter remote_login_passwordfile SQL> show parameter remote_login_passwordfile /* NAME TYPE VALUE

------------------------------------ ----------- -----------------------------remote_login_passwordfile string EXCLUSIVE */ change parameter remote_login_passwordfile to disable remote login to database SQL> alter system set remote_login_passwordfile=none scope=spfile; disable operating system authentication 1)append sqlnet.ora file and the following entry SQLNET.AUTHENTICATION_SERVICES=(NONE) 2)restart listener --in case of password file loss 1)recreate oracle password file [oracle@station11 ~]$ orapwd file=$ORACLE_HOME/dbs/orapworcl password=oracle en tries=5; note:only sys schema is available 2)login as sys user 3)grant sysdba role to all other sysdba users ===================================== ****multiplexing archivelog file**** ===================================== default storage location for archivelog files flash_recovery_area storing archivelog file into different location SQL> alter system set log_archive_dest_1='location=/u01/app/oracle/backup/'; restore the storage location of archivelog file in flash_recovery_area SQL> alter system set log_archive_dest_1='location=use_db_recovery_file_dest'; multiplex archivelog file SQL> alter system set log_archive_dest_2='location=/u01/app/oracle/backup/' scop e=both; ========================================= ****datablock corruption and recovery**** ========================================= check db_block_checksum parameter /* NAME TYPE VALUE ------------------------------------ ----------- -----------------------------db_block_checksum string TRUE */ --block corruption tools analyze sqlstatements dbverify utility

logical check physical check

Production on Fri Jul 5 12:52:37 2013 Copyright (c) 1982.-----------------------------11 9 ORATBS */ 3)execute shell script to corrupt blocks [oracle@station11 ~]$ /home/oracle/Desktop/block_corrupt. DBVERIFY .dbf' /* DBVERIFY: Release 10. Oracle.dbf' 9 8192 4)use analyze to check logical corruption SQL> analyze table emp validate structure.2.ename.did)tablespace oratbs 2 as 3 select employee_id.000e7b18 seq: 0x2 flg: 0x04 spare1: 0x52 spare2: 0x52 spare3: 0x0 consistency value in tail: 0x7b182002 check value in block header: 0x59bb computed block checksum: 0xe7f9 Page 10 is marked corrupt Corrupt block relative dba: 0x02c0000a (file 11.sh '/u01/app/oracle/ora data/orcl/oratbs01.000e7b13 seq: 0x1 flg: 0x04 spare1: 0x52 spare2: 0x52 spare3: 0x0 .tablespace_name from dba_extents where segment_name ='EMP' 2 and owner='HR'.0.salary. 2005. dbf Page 9 is marked corrupt Corrupt block relative dba: 0x02c00009 (file 11. /* FILE_ID BLOCK_ID TABLESPACE_NAME ---------.block media recovery RMAN command recovery of corrupt blocks 1)create a table in HR schema SQL> create table emp(eid. block 9) Bad header found during dbv: Data in bad block: type: 67 format: 7 rdba: 0x0a545055 last change scn: 0x0000.esal.Verification starting : FILE = /u01/app/oracle/oradata/orcl/oratbs01.block_id.---------.0 . 2)check the starting block of the object in dba_extents SQL> select file_id.last_name.1. block 10) Bad header found during dbv: Data in bad block: type: 67 format: 7 rdba: 0x0a545055 last change scn: 0x0000.department_id 4 from employees 5 where department_id between 10 and 40. All rights reserved. 5)use dbverify utility to check physical corruption [oracle@station11 ~]$ dbv file='/u01/app/oracle/oradata/orcl/oratbs01.sh '<datafilepath>' <bl ock_id> <block_size> [oracle@station11 ~]$ /home/oracle/Desktop/block_corrupt.

000e7b1a seq: 0x1 flg: 0x04 spare1: 0x52 spare2: 0x52 spare3: 0x0 consistency value in tail: 0x7b1a2301 check value in block header: 0x650c computed block checksum: 0xe7f8 Page 12 is marked corrupt Corrupt block relative dba: 0x02c0000c (file 11.Verification complete Total Pages Examined : Total Pages Processed (Data) : Total Pages Failing (Data) : Total Pages Processed (Index): Total Pages Failing (Index): Total Pages Processed (Other): Total Pages Processed (Seg) : Total Pages Failing (Seg) : Total Pages Empty : Total Pages Marked Corrupt : Total Pages Influx : Highest block SCN : */ 1280 4 0 0 0 8 0 0 1264 4 0 949009 (0.000e7b18 seq: 0x2 flg: 0x04 spare1: 0x52 spare2: 0x52 spare3: 0x0 consistency value in tail: 0x7b180602 check value in block header: 0x9055 computed block checksum: 0xe7da DBVERIFY . block 11) Bad header found during dbv: Data in bad block: type: 67 format: 7 rdba: 0x0a545055 last change scn: 0x0000. .10.949009) RMAN> blockrecover datafile 11 block 9.12. block 12) Bad header found during dbv: Data in bad block: type: 67 format: 7 rdba: 0x0a545055 last change scn: 0x0000.consistency value in tail: 0x7b132101 check value in block header: 0x4b6f computed block checksum: 0xe7fb Page 11 is marked corrupt Corrupt block relative dba: 0x02c0000b (file 11.11.