Oracle: info about the corrupted block
Monday, February 25th, 2008SELECT * FROM dba_extents
WHERE file_id = &file_id
AND &block_id BETWEEN block_id AND block_id + blocks - 1;
Oracle: PERFSTAT.STATS$MUTEX_SLEEP_PK violated
Saturday, November 3rd, 2007There is a known problem with Oracle statspack report in 10g, which could cost You at least one lost statspack snapshot.
The following message is written into the alert log:
ORA-00001: unique constraint (PERFSTAT.STATS$MUTEX_SLEEP_PK) violated
ORA-06512: at “PERFSTAT.STATSPACK”, line 5264
ORA-06512: at “PERFSTAT.STATSPACK”, line 104
ORA-06512: at line 1
There is a Note 382993.1 in Metalink, which describes this bug.
The workaround [...]
Oracle: read the entries from alert log
Saturday, November 3rd, 2007Sometimes it’s necessary to read the information from the alert log together with the timestamp of the error.
The very simple Unix-shell script helps to do this:
echo
echo ‘Enter # of lines:’
read NUM
tail -$NUM alert_${ORACLE_SID}.log | awk ‘
BEGIN {prev=”" ; ret=1 }
/^(…-|Error)/ { if ( prev !~ /^(…-|Error)/ ) { print “” ; print prev;} [...]
Search for Oracle errors in the alert log
Friday, February 3rd, 2006Search for Oracle errors in the last $NUM lines.
NUM=1000
SIGNAL_LIST=’^(…-|Error|Starting.*instance)|terminating instance’
tail -$NUM alert_${ORACLE_SID}.log | awk ‘
BEGIN {prev=”" ; ret=1 }
/’”$SIGNAL_LIST”‘/ { if ( prev !~ /’”$SIGNAL_LIST”‘/ ) { print “” ; print prev;} print $0;ret=0}
{prev=$0}
END { exit ret } ‘
On Unix Oracle alert log is normally located in bdump/alert_${ORACLE_SID}.log