Thursday, January 5, 2012

All services on node 2 down (10gRAC 2-node)

all service on node 2 were down:

---------------------------------

/oracle_crs/product/10.2.0/crs_1/bin

-> ./crs_stat -t

Name Type Target State Host

------------------------------------------------------------

ora....U1.inst application ONLINE ONLINE nc2s...db01

ora....U2.inst application ONLINE OFFLINE

ora....4U1.srv application ONLINE ONLINE nc2s...db01

ora....4U2.srv application ONLINE OFFLINE

ora....RV01.cs application ONLINE ONLINE nc2s...db01

ora.RMS4U.db application ONLINE ONLINE nc2s...db01

ora....SM1.asm application ONLINE ONLINE nc2s...db01

ora....01.lsnr application ONLINE ONLINE nc2s...db01

ora....b01.gsd application ONLINE ONLINE nc2s...db01

ora....b01.ons application ONLINE ONLINE nc2s...db01

ora....b01.vip application ONLINE ONLINE nc2s...db01

ora....SM2.asm application ONLINE OFFLINE

ora....02.lsnr application ONLINE OFFLINE

ora....b02.gsd application ONLINE OFFLINE

ora....b02.ons application ONLINE OFFLINE

ora....b02.vip application ONLINE ONLINE nc2s...db01

login as root and restart crs service:

-----------------------------------------

# cd /oracle_crs/product/10.2.0/crs_1/bin

# ./crsctl check crs

Failure 1 contacting CSS daemon

Cannot communicate with CRS

Cannot communicate with EVM

# ./crsctl start crs

Attempting to start CRS stack

The CRS stack will be started shortly

/oracle_crs/product/10.2.0/crs_1/bin

-> .//crs_stat -t

Name Type Target State Host

------------------------------------------------------------

ora....U1.inst application ONLINE ONLINE nc2s...db01

ora....U2.inst application ONLINE ONLINE nc2s...db02

ora....4U1.srv application ONLINE ONLINE nc2s...db01

ora....4U2.srv application ONLINE ONLINE nc2s...db02

ora....RV01.cs application ONLINE ONLINE nc2s...db01

ora.RMS4U.db application ONLINE ONLINE nc2s...db01

ora....SM1.asm application ONLINE ONLINE nc2s...db01

ora....01.lsnr application ONLINE ONLINE nc2s...db01

ora....b01.gsd application ONLINE ONLINE nc2s...db01

ora....b01.ons application ONLINE ONLINE nc2s...db01

ora....b01.vip application ONLINE ONLINE nc2s...db01

ora....SM2.asm application ONLINE ONLINE nc2s...db02

ora....02.lsnr application ONLINE ONLINE nc2s...db02

ora....b02.gsd application ONLINE ONLINE nc2s...db02

ora....b02.ons application ONLINE ONLINE nc2s...db02

ora....b02.vip application ONLINE ONLINE nc2s...db02

MOS IDs

Installs, Upgrades, Patches:
-----------------------------

Oracle Database on Unix AIX,HP-UX,Linux,Mac OS X,Solaris,Tru64 Unix Operating Systems Installation and Configuration Requirements Quick Reference (8.0.5 to 11.2) [ID 169706.1]

Friday, December 30, 2011

Troubleshooting 'enq: TX - index contention' Waits in a RAC Environment [Index block splits]

Refer below on MOS

Troubleshooting 'enq: TX - index contention' Waits in a RAC Environment. [ID 873243.1]

http://www.confio.com/English/Tips/Index_Block_Split.php

# Show all sessions waiting for any lock:

select event,p1,p2,p3 from v$session_wait where wait_time=0 and event='enqueue';

# From 10g a different more descriptive event name exists for the more frequent enqueues and you can query the TX wait event as follows:

select sid,p1raw, p2, p3 from v$session_wait

where wait_time=0 and event='enq: TX - row lock contention';

# Show sessions waiting for a TX lock:

select * from v$lock where type='TX' and request>0;

# Show sessions holding a TX lock:

select * from v$lock where type='TX' and lmode>0;

Monday, May 23, 2011

OS specific commands

To Find Swap, RAM, and OS Version

OS

SWAP

RAM

OS VERSION

AIX

/usr/sbin/lsps -a

/usr/sbin/lsattr -HE -l sys0 -a realmem

oslevel

HP PA-RISC

swapinfo -a

grep "Physical:" /var/adm/syslog/syslog.log

uname -a

HP Itanium

swapinfo -a

/usr/contrib/bin/machinfo | grep -i Memory

uname -a

Tru64

swapon -s

vmstat -P

/usr/sbin/sizer -v

Solaris

swap -s

/usr/sbin/prtconf | grep -i memory

uname -r

Linux

free

free

uname -a

Mac OS X

# df -h /

# /usr/sbin/system_profiler SPHardwareDataType | grep Memory

# sw_vers

To Determine the Unix Kernel Parameters

OS

LOCATION

COMMAND TO SEARCH

AIX

automatically configured

do 'env' for LINK_CNTRL,
To determine if AIX is 64 bit enabled do 'genkex | grep 64' or 'genkex | grep call' (see Note 1019106.102)

HP

/stand/system or use SAM -->Kernel Configuration

/etc/sysdef, /usr/sbin/kmtune (kmtune desupported in 11.31, use /usr/sbin/kctune -v), or /usr/sbin/kcweb -F

Tru64

/etc/sysconfigtab

/sbin/sysconfig -q ipc or /sbin/sysconfig -q vm or /sbin/sysconfig -q proc

Solaris

/etc/system

"/etc/sysdef | grep SHM" or "/etc/sysdef | grep SEM"

Linux

/usr/src/linux/include/asm/shmparam.h
/usr/src/linux/include/linux/sem.h
/proc/sys/kernel/sem
/proc/sys/kernel/shmall
/proc/sys/kernel/shmmax
/proc/sys/kernel/shmmni

ipcs -lms

Mac OS X

/etc/sysctl.conf

"# /usr/sbin/sysctl -a | grep "

O/S Software Installed Packages and Patches

OS

COMMAND FOR PACKAGES

COMMAND FOR PATCHES

AIX

lslpp -w | grep -i "software title" (applies to APARs and PTFs)

/usr/sbin/instfix -ik patch number

HP

Prior to 11: /usr/sbin/swlist -lproduct PH\* hp-ux 11 and after: * /usr/sbin/swlist -l patch \*\.*,c=patch * /usr/contrib/bin/show_patches (from patch PHCO_19550)

/usr/sbin/swlist -l fileset | grep -i

Solaris

/bin/pkginfo -l | grep -i "software title"

/bin/showrev -p

Tru64

/usr/sbin/setld -i | grep -i "software title"

/usr/sbin/setld -i | more
For patchkits:
/usr/sbin/dupatch -track -type kit

Linux


To see if a particular RPM is installed (without the architectur):
$ rpm -qa | grep "package name"

To see if a particular RPM is installed (with the architectur):
$ rpm -qa --qf "%{NAME}-%{VERSION}-%{RELEASE}_%{ARCH}\\n" | grep "package name"

To see what RPM provided a particular object/library:
$ rpm -q --whatprovides --qf "%{NAME}-%{VERSION}-%{RELEASE}_%{ARCH}\\n" "full path/library name"

To see the contents listing of an RPM:
$ rpm -ql "RPM name"
For example: $ rpm -ql compat-libstdc++-33-3.2.3-47.3.ppc
/usr/lib/libstdc++.so.5
/usr/lib/libstdc++.so.5.0.7


Mac OS X

to be supplied later

to be supplied later

To Check if an OS is 64 bit Capable or not

OS

COMMAND

RESULTS

Aix

lslpp -L | grep 64bit

It should return "bos.64bit"

HP

getconf KERNEL_BITS

It should return "64"

Solaris

/bin/isainfo -kv

If the isainfo command does not exist it is not 64-bit. It should return "64-bit sparcv9 kernel modules"

To Check version of Compiler

COMPILER

COMMAND

C/C++

do a "which cc", then cd to the directory it is in, then do a "what cc"
except for Linux, on Linux do a "rpm -qa | grep egcs

COBOL

cd $COBDIR and do "more cobver"

Fortran

do a "which f77", then cd to directory it is in, then do a "what f77"

Sunday, May 8, 2011

ORA-00354: corrupt redo log block header - online redo logfile - INACTIVE file corrupted

Data migration from one database to another database, importing the data & creating the 22000 indexes (login as sys user) on database.

Suddenly session was hanged & indexes also not created. Logging using my account into database throws below error:

ORA-00257:
Archiver error. Connect internal only, until freed.

I was surprised...Because whenever I used huge data import on non production database, I put the shell script to remove the old archive files every 10 minutes. This script keeps last 10 archive log files.
I verified the shell script & it was running fine and also archive log file system have enough space to keep 50 GB archive.

Finally I checked the alertlog file. It contains enough information & helped to identify the issue.

Alert Log Error:

ORA-00353: log corruption near block 655832 change 10092289716415 time 04/27/2011 22:58:57
ORA-00312: online log 5 thread 1: '/app/oracle/dbdata/data01/test1/otest1RD05.log'
Errors in file /app/oracle/admin/test1/diag/rdbms/test/test1/trace/test1_arc1_3950.trc:
ORA-00354: corrupt redo log block header
ORA-00353: log corruption near block 655832 change 10092289716415 time 04/27/2011 22:58:57
ORA-00312: online log 5 thread 1: '/app/oracle/dbdata/data01/test1/otest1RD05.log'
ARC1: All Archive destinations made inactive due to error 354
Sweep Incident[65571]: completed
Thu Apr 28 02:50:55 2011
ARCH: Archival stopped, error occurred. Will continue retrying
ORACLE Instance test1 - Archival Error
ORA-16014: log 5 sequence# 228 not archived, no available destinations
ORA-00312: online log 5 thread 1: '/app/oracle/dbdata/data01/test1/otest1RD05.log'
Errors in file /app/oracle/admin/test1/diag/rdbms/test/test1/trace/test1_arc1_3950.trc:
ORA-16014: log 5 sequence# 228 not archived, no available destinations
ORA-00312: online log 5 thread 1: '/app/oracle/dbdata/data01/test1/otest1RD05.log'
Thu Apr 28 02:56:23 2011
ARCH: Archival stopped, error occurred. Will continue retrying
ORACLE Instance test1 - Archival Error
ORA-16038: log 5 sequence# 228 cannot be archived
ORA-00001: unique constraint (.) violated
Errors in file /app/oracle/admin/test1/diag/rdbms/test/test1/trace/test1_arc2_3955.trc:
ORA-16038: log 5 sequence# 228 cannot be archived
ORA-00001: unique constraint (.) violated
ARC1: Log corruption near block 655832 change 10092289716415 time ?

ISSUE:
Redo log group 5 was corrupted & redo log group 5 status also INACTIVE status
.
SQL> ALTER DATABASE CLEAR UNARCHIVED LOGFILE GROUP 5;

Database altered.

SQL> alter system switch logfile;

System altered.

SQL> /

System altered.

SQL> /

System altered.


SQL> select * from v$log;

GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIME
------------- ----------
5 1 236 536870912 1 YES INACTIVE
1.0092E+13 2011-04-28

6 1 238 536870912 1 NO CURRENT
1.0092E+13 2011-04-28

7 1 235 536870912 1 YES INACTIVE
1.0092E+13 2011-04-28


GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIME
------------- ----------
8 1 237 536870912 1 YES INACTIVE
1.0092E+13 2011-04-28

SQL> alter system switch logfile;

System altered.

SQL> /

System altered.

SQL> /

System altered.

SQL> select * from v$logfile where group#=5;

GROUP# STATUS TYPE
---------- ------- -------
MEMBER
--------------------------------------------------------------------------------
IS_
---
5 ONLINE
/app/oracle/dbdata/data01/test1/oTEST1RD05.log
NO

While unarchived the logfile group, below information were registered in alert log.
ALTER DATABASE CLEAR UNARCHIVED LOGFILE GROUP 5
Thu Apr 28 03:02:13 2011
Beginning global checkpoint up to RBA [0xe7.df308.10], SCN: 10092289771542
Completed checkpoint up to RBA [0xe7.df308.10], SCN: 10092289771542
WARNING! CLEARING REDO LOG WHICH HAS NOT BEEN ARCHIVED. BACKUPS TAKEN
BEFORE 04/27/2011 23:41:29 (CHANGE 10092289717904) CANNOT BE USED FOR RECOVERY.
Clearing online log 5 of thread 1 sequence number 228
Thu Apr 28 03:02:15 2011
ORACLE Instance test1 - Can not allocate log, log 5 still clearing
Thread 1 cannot allocate new log, sequence 232
Thu Apr 28 03:02:15 2011
Archiver process freed from errors. No longer stopped
Online log 5 still clearing
Current log# 7 seq# 231 mem# 0: /app/oracle/dbdata/sys03/test1/oTEST1RD07.log
Thu Apr 28 03:02:39 2011
Beginning log switch checkpoint up to RBA [0xe8.2.10], SCN: 10092289771557
Thread 1 advanced to log sequence 232 (LGWR switch)
Current log# 5 seq# 232 mem# 0: /app/oracle/dbdata/sys01/test1/oTEST1RD05.log
Thu Apr 28 03:02:39 2011
Completed: ALTER DATABASE CLEAR UNARCHIVED LOGFILE GROUP 5
Thu Apr 28 03:02:40 2011
Clearing Resource Manager plan via parameter
Thu Apr 28 03:02:50 2011
Archived Log entry 7292 added for thread 1 sequence 230 ID 0xffffffffd697c6bc dest 1:
Thu Apr 28 03:02:55 2011
Archived Log entry 7293 added for thread 1 sequence 229 ID 0xffffffffd697c6bc dest 1:
Thu Apr 28 03:03:19 2011
Archived Log entry 7294 added for thread 1 sequence 231 ID 0xffffffffd697c6bc dest 1:
Thu Apr 28 03:04:43 2011

Reference: http://feedproxy.google.com/~r/blogspot/fnOMR/~3/_qx3Wa1BcAg/ora-00354-corrupt-redo-log-block-header.html?utm_source=feedburner&utm_medium=email

Sunday, April 3, 2011

Thread 1 cannot allocate new log, sequence 124825, All online logs needed archiving

ARCH: Connecting to console port…
Thread 1 cannot allocate new log, sequence 124825
All online logs needed archiving


In database, log_archive_max_processes value is 2 & redo log file size is 250 MB (3 Groups only).

Why it’s happened?

Due to huge transactions (lot of DML operations – happened unexpectedly in database), archiver not able to archive the online redo log files.

Solution:


1.Increase the log_archive_max_processes from 2 to 5.
2.Add the new online redo log groups (3 groups to 5 groups).
3.Increase the online redo log file size from 250MB TO 500MB

Reference: http://dbarajabaskar.blogspot.com/2011/04/thread-1-cannot-allocate-new-log.html