In case any corruption errors found out in alert log file , DBA need to use dbv utlity to find out corruption level issues. Dba can run DBV utlity while database is up and running.
In case of Database located in cooked file system
Below script will provide dbv o/p file for all datafiles located
sqlplus /nolog
connect / as sysdba
set feedback off
set head off
set echo off
set linesize 200
set pagesize 2500
spool /tmp/dbvchk.sh
select 'dbv file=' name ' blocksize=' block_size ' logfile='
substr(name, instr(name, '/', -1, 1) +1)
'.' file# '.log' from v$datafile
/
spool off
Example
dbv file=/u01/oradata/test011.dbf blocksize=2048 logfile=test01_dbv.log feedback=100
RAW Devices
should use the END parameter to avoid running off the end of the Oracle file space.
eg: "dbv FILE=/dev/rdsk/r1.dbf END=
sqlplus /nolog
connect / as sysdba
set feedback off
set head off
set echo off
set linesize 200
set pagesize 2500
spool /tmp/dbvchk.sh
select 'dbv file=' name ' blocksize=' block_size ' end=' (bytes/block_size) ' logfile=' substr(name, instr(name, '/', -1, 1) +1) '.' file# '.log' from v$datafile
/
spool off
Example
dbv file=/dev/mappers/rv4000p1 blocksize=2048 END=5120 log=rv4000p1.log
ASM files
If ASM storage being used, we need to specify USERID to get authenticated on ASM Instance.You can use following query if you are running in ASM storage.
sqlplus /nolog
connect / as sysdba
set feedback off
set head off
set echo off
set linesize 200
set pagesize 2500
select 'dbv file=' name ' blocksize=' block_size ' USERID=sys/&SYS_PASSWORD logfile='
substr(name, instr(name, '/', -1, 1) +1) '.' file# '.log' from v$datafile
/
spool off
Example
dbv file=+DG_TS1TEST_DT03/oradata/undo_ts3_50.dbf blocksize=8192 USERID=sys/xxxxxx logfile=undo_ts3_50.dbf.7416.log
No comments:
Post a Comment