Está en la página 1de 3

================================ ****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

block media recovery

RMAN command

recovery of corrupt blocks

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

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, block 11) Bad header found during dbv: Data in bad block: type: 67 format: 7 rdba: 0x0a545055 last change scn: 0x0000.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, block 12) Bad header found during dbv: Data in bad block: type: 67 format: 7 rdba: 0x0a545055 last change scn: 0x0000.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 - 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.949009)

RMAN> blockrecover datafile 11 block 9,10,11,12;

También podría gustarte