Saturday, August 28, 2010

ORA-15018, ORA-15072 on 11gR2 grid node 2 when running root.sh

Problem Description
Observation 01:
During installation of Oracle 11gR2 Grid Infrastructure whenever you run root.sh script on second node it fails with error ORA-15018 and ORA-15072 like below.

DiskGroup DATA1 creation failed with the following message:
ORA-15018: diskgroup cannot be created
ORA-15072: command requires at least 1 regular failure groups, discovered only 0

But root.sh ran successfully on node 1.

Observation 02:
On 2nd node after throwing the error crs fails to start and if you look for logfile rootcrs_2ndnodename.log you will see an entry like,

2010-08-09 15:20:12: Configuring ASM via ASMCA
2010-08-09 15:20:12: Executing as oracle: /u01/app/1120/grid/bin/asmca -silent -diskGroupName DATA1 -diskList ORCL:DATA1 -redundancy EXTERNAL -configureLocalASM
2010-08-09 15:20:12: Running as user oracle: /u01/app/1120/grid/bin/asmca -silent -diskGroupName DATA1 -diskList ORCL:DATA1 -redundancy EXTERNAL -configureLocalASM
2010-08-09 15:20:12: Invoking "/u01/app/1120/grid/bin/asmca -silent -diskGroupName DATA1 -diskList ORCL:DATA1 -redundancy EXTERNAL -configureLocalASM" as user "oracle"
2010-08-09 13:20:16: Configuration of ASM failed, see logs for details

Observation 03:
If you look for /etc/oratab file on second node you will see an interesting observation. There is an entry about +ASM1 instead of +ASM2.

Observation 04:
The following commands on the 2nd node show the ASM disk information correctly.
# /etc/init.d/oracleasm listdisks
# /etc/init.d/oracleasm scandisks
# ls -ltr /dev/oracleasm/disks

Observation 05:
While installing Oracle 11gR2 Grid Infrastructure on ASM, it automatically shows all the disks and disk groups without needing to click on "Disk Discovery Path". It showed disk but it added ORCL in the disk name. Suppose, it was shown disk name as ORCL:DATA1, ORCL:DATA2 etc instead of showing as only DATA1, DATA2.

Cause of the Problem
This problem is actually due to oracle bug. All disks were configured properly but due to bug it could not detect the disk rightly and an ORCL is appended which later caused the problem. There is also possible problem if within /etc/sysconfig/oracleasm file, ORACLEASM_SCANORDER and ORACLEASM_SCANEXCLUDE attribute is configured improperly.

Solution of the Problem
Step 01: Deinstall the oracle clusterware installation.
To know how to deinstall oracle clusterware have a look at http://arjudba.blogspot.com/2010/03/what-to-do-after-failure-of-oracle.html

Step 02: While installation whenever it shows the ASM disk automatically, just click on "Disk discovery path" and type the path manually and let the installer to search path there.

However, if there were improper parameters set within /etc/sysconfig/oracleasm file then do the following:

1. In all RAC nodes modify the /etc/sysconfig/oracleasm with:

ORACLEASM_SCANORDER="dm"
ORACLEASM_SCANEXCLUDE="sd"


2. In all nodes restart the asmlib by,

# /etc/init.d/oracleasm restart

3. As root, run "$GRID_HOME/crs/install/rootcrs.pl -verbose -deconfig -force" on all nodes, except the last one. If you have two nodes cluster then only run at first node.
# $GRID_HOME/crs/install/rootcrs.pl -verbose -deconfig -force

$su
# $GRID_HOME/crs/install/rootcrs.pl -verbose -deconfig -force


4. As root, run "$GRID_HOME/crs/install/rootcrs.pl -verbose -deconfig -force -lastnode" on last node. This command will zero out OCR and VD disk also. If you have two nodes cluster then run on second node.

# $GRID_HOME/crs/install/rootcrs.pl -verbose -deconfig -force -lastnode

5. As root, run $GRID_HOME/root.sh on all nodes.
# $GRID_HOME/root.sh
Related Documents
In 11gR2 RAC after server reboot crsd fails to startup on 2nd node
PRKP-1001, CRS-0215 while starting instance using srvctl
NTP and csstd time synchronization option to install Oracle Clusterware 11gR2
cluvfy fails with PRVF-5436 PRVF-9652 Cluster Time Synchronization Services check failed
In 11gR2 Grid root.sh fails with CRS-2674: Start of 'ora.cssd' failed
What to do after failure of Oracle 11gR2 Grid Infrastructure (CRS) Installation
Enable Archive log Mode for RAC database
List of Parameters that must have identical in RAC database
CRS Stack Fails to Start After Reboot ORA-29702 CRS-0184

Wednesday, August 25, 2010

In 11gR2 RAC after server reboot crsd fails to startup on 2nd node

Problem Description
Oracle Grid Infrastructure, Oracle software Installation went successfully and so creation of oracle database. After installation it is checked CRS daemon on both domains and it is shown all services are online like below.

# crsctl check crs
CRS-4638: Oracle High Availability Services is online
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
However, after both server rebooted cluster ready service on second node does not start, but on first node it works fine.

Some output from second node,
# crs_stat -t
CRS-0184: Cannot communicate with the CRS daemon.
# crsctl check crs
CRS-4638: Oracle High Availability Services is online
CRS-4535: Cannot communicate with Cluster Ready Services
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
If you look for the Grid alert log on second node it shows,
[crsd(26294)]CRS-1013:The OCR location in an ASM disk group is inaccessible. Details in /u01/app/11.2.0/grid/log/dc-db-02/crsd/crsd.log.
2010-08-25 12:06:55.475
[ohasd(25303)]CRS-2765:Resource 'ora.crsd' has failed on server 'dc-db-02'.
2010-08-25 12:06:56.553
[crsd(26305)]CRS-1013:The OCR location in an ASM disk group is inaccessible. Details in /u01/app/11.2.0/grid/log/dc-db-02/crsd/crsd.log.
2010-08-25 12:06:57.499
[ohasd(25303)]CRS-2765:Resource 'ora.crsd' has failed on server 'dc-db-02'.
2010-08-25 12:06:57.499
[ohasd(25303)]CRS-2771:Maximum restart attempts reached for resource 'ora.crsd'; will not restart.
If you look for crsd.log file, it will show
2010-08-25 12:06:56.552: [  OCRASM][1855820272]proprasmo: Error in open/create file in dg [DATA]
[ OCRASM][1855820272]SLOS : SLOS: cat=7, opn=kgfoAl06, dep=15077, loc=kgfokge
ORA-15077: could not locate ASM instance serving a required diskgroup

2010-08-25 12:06:56.553: [ OCRASM][1855820272]proprasmo: kgfoCheckMount returned [7]
2010-08-25 12:06:56.553: [ OCRASM][1855820272]proprasmo: The ASM instance is down
2010-08-25 12:06:56.553: [ OCRRAW][1855820272]proprioo: Failed to open [+DATA]. Returned proprasmo() with [26]. Marking location as UNAVAILABLE.
2010-08-25 12:06:56.553: [ OCRRAW][1855820272]proprioo: No OCR/OLR devices are usable
2010-08-25 12:06:56.554: [ OCRASM][1855820272]proprasmcl: asmhandle is NULL
2010-08-25 12:06:56.554: [ OCRRAW][1855820272]proprinit: Could not open raw device
2010-08-25 12:06:56.554: [ OCRASM][1855820272]proprasmcl: asmhandle is NULL
2010-08-25 12:06:56.554: [ OCRAPI][1855820272]a_init:16!: Backend init unsuccessful : [26]
2010-08-25 12:06:56.554: [ CRSOCR][1855820272] OCR context init failure. Error: PROC-26: Error while accessing the physical storage ASM error [SLOS: cat=7, opn=kgfoAl06, dep=15077, loc=kgfokge
ORA-15077: could not locate ASM instance serving a required diskgroup
] [7]
2010-08-25 12:06:56.554: [ CRSD][1855820272][PANIC] CRSD exiting: Could not init OCR, code: 26
2010-08-25 12:06:56.554: [ CRSD][1855820272] Done.
Cause of the Problem
Whenever you look for "CRS-4535: Cannot communicate with Cluster Ready Services" error immediate investigate in the grid alert log as well as crsd.log file. There you would get more information regarding CRS-4535 error. From the crsd.log file we see the oracle error message
ORA-15077: could not locate ASM instance serving a required diskgroup

If we try to run ls command after inside amdcmd it fails with ASMCMD-08102
$ export ORACLE_SID=+ASM2
$ amdcmd
ASMCMD> ls
ASMCMD-08102: no connection to ASM; command requires ASM to run"
Whenever it is tried to start ASM instance manually on the second node you get error message like below.
amdcmd> startup;
ORA-27154: post/wait create failed
ORA-27300: OS system dependent operation:semget failed with status: 28
ORA-27301: OS failure message: No space left on device
ORA-27302: failure occurred at: sskgpsemsper
This error message may mislead you because there is sufficient space in your disk. df -h command proves that. This error entirely related to kernel parameter settings. If you check your semaphores setting you see there does not have enough semaphores allowed for creating more processes.

Solution of the problem
As this problem is lower settings of semaphores value so solution is to increase the semaphores value.

- Check your current semapores settings by looking for value of the parameter "kernel.sem" inside the file /etc/sysctl.conf
# cat /etc/sysctl.conf

or issue,
# /sbin/sysctl -a | grep sem

- Modify SEMMNI value in the /etc/sysctl.conf like below.
# vi /etc/sysctl.conf
kernel.sem = 250 32000 100 200
On Red Hat Linux system, in order the affect the setting of the value immediately use,
# /sbin/sysctl -p

Now starting up the asm instance is just fine and also CRS daemon is ok. Restart the node to make sure everything is working perfect.
Related Documents
ORA-15018, ORA-15072 on 11gR2 grid node 2 when running root.sh
PRKP-1001, CRS-0215 while starting instance using srvctl
NTP and csstd time synchronization option to install Oracle Clusterware 11gR2
cluvfy fails with PRVF-5436 PRVF-9652 Cluster Time Synchronization Services check failed
In 11gR2 Grid root.sh fails with CRS-2674: Start of 'ora.cssd' failed
What to do after failure of Oracle 11gR2 Grid Infrastructure (CRS) Installation
Enable Archive log Mode for RAC database
List of Parameters that must have identical in RAC database
CRS Stack Fails to Start After Reboot ORA-29702 CRS-0184

Sunday, August 8, 2010

Help to the flood affected people in Pakistan

Assalamalaikum,
Dear all,

How are you.

Please pray for the victims of the flood in pakistan, and try helping them or atleast we can pray for them.
May Allah forgive us all for not being thankful for what we have and how we are.


Also, if you have ability, please donate for them.






It is only the start of the monsoon season, but already Pakistan is experiencing some of the worst flooding it has seen in over 80 years. Entire villages have been washed away, an early estimate of over 1,600 deaths so far and over 2 million displaced or otherwise affected. Not only is the immediate water damage causing havoc, the floods have inundated crop-producing areas, dealing a crippling blow to the agricultural-based economy and threatening a food crisis. The Pakistani government now struggles to rescue and provide aid to millions - while still fighting with militant Islamist forces in many of the hardest-hit regions. With even more heavy rains predicted in the coming days, here are a handful of recent photographs of Pakistanis as they cope with this latest disaster.

A boy hangs on to the front of a cargo truck while passing through a flooded road in Risalpur, located in Nowshera District in Pakistan's Northwest Frontier Province July 30, 2010.










2
Men take refuge on a boat during heavy rain in Pakistan's Nowshera District on July 29, 2010.










3
Residents watch water pour through a street on the outskirts of Peshawar, Pakistan on July 28, 2010.








4
Pakistani villagers move to high ground escaping a flood-hit village near Nowshera, Pakistan on Thursday, July 29, 2010.








5
Nimra, a three-year-old girl, who was rescued along with her family from Kaalam in the northern area, kisses the window glass of an army helicopter after their arrival at Khuazakhela in Swat district located in Pakistan's northwest Khyber-Pakhtunkhwa Province on August 1, 2010.








6
Residents watch from a nearby hill as army helicopters rescued trapped residents from Nowshera, Pakistan on July 31, 2010.








7
Residents stand by flood water that entered a residential area of Muzaffarabad, Pakistan on July 30, 2010.








8
An aerial view of a man and his animals surrounded by floodwater in Taunsa near Multan, Pakistan, flooded on Sunday, Aug. 1, 2010.








9
A Pakistani villager struggles to reach his village through a fast-moving flood water caused by heavy monsoon rain in Bakhtiarabad, 250 km (155 mi) north of Quetta, Pakistan on Friday, July 23, 2010.








10
An aerial view shows Nowshera city submerged in flooding caused by heavy monsoon rains in Pakistan on Friday, July 30, 2010.








11
A Pakistani volunteer uses a small boat to evacuate locals in a flood-hit area of Nowshera on July 30, 2010.








12
Pakistani flood survivors cross a bridge near a damaged home in Medain, a town of Swat valley on August 2, 2010.








13
Pakistan army soldiers pass a baby across a channel in the floodwater as they help people flee from their flooded village following heavy monsoon rains in Taunsa, Pakistan on Sunday, Aug. 1, 2010.








14
Villagers try to catch trees floating in the flooded Nelum river in Muzaffarabad, the capital of Pakistani Kashmir on Friday, July 30, 2010.








15
Residents help a man untie a chicken from his neck after he evacuated his flooded home with the fowl by swimming to higher grounds in Nowshera, Pakistan on August 1, 2010.








16
A family being rescued by army soldiers passes a cargo truck with men on top taking shelter from heavy floods in Nowshera, Pakistan on July 31, 2010.









17
A soldier evacuating residents carries a flood victim to a helicopter in Sanawa, Pakistan's on August 5, 2010.









18
A Pakistani boy named Jeeshan stands outside his tent in a camp set up by the Pakistani army inside a college on the outskirts of Nowshera on August 2, 2010.










19
Pakistani flood survivors line up beside a damaged bridge in Medain, a town of Swat Valley on August 2, 2010.









20
A boy is flung back by the force of a Pakistan Air Force helicopter rotors as it drops water supplies to residents on August 2, 2010 in Nowshera, Pakistan.









21
Evacuees wade through a flooded area following heavy monsoon rains in Peshawar on Saturday, July 31, 2010.








22
People wait to cross a flooded road in Bannu, northwestern Pakistan on Tuesday, Aug. 3, 2010.








23
A boy walks through flood destroyed homes on August 4, 2010 in Pabbi, near Nowshera, Pakistan.









24
A family portrait is seen, attached to a bookcase buried in mud on August 4, 2010 in Pabbi, Pakistan.








25
An aerial view of floodwater covering the land as far as the eye can see, around Taunsa near Multan, Pakistan, Sunday, Aug. 1, 2010.









26
A flood survivor carries a soaked mat in a flooded area of Nowshera on August 3, 2010.









27
A man gathers up some of his belongings outside his flooded house in Nowshera, Pakistan on August 2, 2010.








28
Pakistani women pray at sunset by the Ravi river in Lahore on August 2, 2010.









29
A boy sits on a bed as his family members salvage belongings from their destroyed house in Pabbi, Pakistan on August 5, 2010.










30
Flood victims line up to collect relief supplies from the Army in Nowshera, Pakistan on August 2, 2010. Islamist charities, some with suspected ties to militants, stepped in on Monday to provide aid for Pakistanis hit by the worst flooding in memory, piling pressure on a government criticized for its response to the disaster that has so far killed more than 1,000 people.










31
Flood-affected people jostle for food relief in Nowshera in northwest Pakistan on Friday, Aug. 6, 2010.











32
A Pakistani worker pushes back flood-stricken women who are trying to enter a relief center to get food supplies on the outskirts of Peshawar, Pakistan, Wednesday, Aug. 4, 2010.








33
Families set in for the evening in their makeshift tent homes located on a median strip after having abandoned their flood-destroyed homes, on August 3, 2010 in Pabi, Pakistan.









34
Children, whose families have declined to be rescued, wade in rising flood waters on August 6, 2010 in the village of Panu Akil, near Sukkur, Pakistan. Rescue workers and armed forces continued rescue operations evacuating thousands in Pakistan's heartland province of Sindh.









35
Residents evacuate to safety in a flood-hit area of Nowshera, Pakistan on July 30, 2010.









36
Onlookers perched on a damaged bridge watch a flood survivor use a rope to cross the river in Chakdara in Pakistan's Swat Valley on August 3, 2010.









37
A young flood survivor cools herself with water at a makeshift camp in Nowshera, Pakistan on August 5, 2010.









38
A man tries to cross a makeshift bridge to escape his flooded home in Nowshera, Pakistan on July 31, 2010.









39
A Pakistan army helicopter evacuates stranded villagers in Nowshera, Pakistan on Friday, July 30, 2010.








40
A family takes refuge on top of a mosque while awaiting rescue from flood waters in Sanawa, a town located in the Muzaffar Ghar district of Pakistan's Punjab province on August 5, 2010.










41
A woman yells as her child is evacuated from the roof of a mosque where residents were taking refuge from flood waters in Sanawa, Pakistan on August 5, 2010.







Friday, August 6, 2010

Huge number of oracle processes and oracle is not releasing process

Problem Symptoms
In the database there is huge number of Oracle database processes and within several hours the processes reached the max limit of PROCESSES parameter. No one then can connect to database and therefore it is needed to restart the Server or need to kill the oracle process from operating system.

Recent changes are the,
1)Enable DCD.
2)SQLNET.EXPIRE_TIME is set to 1 or more.

Cause of the Problem
This problem is specific with Oracle Database release 10.2.0.3 and on Windows Platform. It is due to the the DCD (dead connection detection) mechanism. The orphaned processes are not being cleaned up even though DCD is enabled and SQLNET.EXPIRE_TIME is set to 1 or more.

Also the number of processes exceeds too much than the number of sessions.
SQL> select count(*) from v$session;

COUNT(*)
----------
55

SQL> select count(*) from v$process;

COUNT(*)
----------
600
In this case, the orphaned resources are not released if only the client application is terminated. After only the client computer has been rebooted, the DCD releases those resources. For example, a Windows application is killed but Windows machine remains running, the probe packet may be received and discarded as if the connection is still active. As it currently stands, it appears that DCD detects dead client machines, but not dead client processes.

Solution of the Problem
1. Comment the SQLNET.EXPIRE_TIME parameter in your sqlnet.ora file.
2. Reboot the server. Server reboot is funny thing to solve the problem.
3. Set KeepAlive mechanism in Windows 2000/NT.
To do so,
- Start > Run > Regedit.exe
- In the Registry, navigate to:
HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Tcpip/Parameters

- Edit - Add value: KeepAliveTime (REG_DWORD)
Decimal -> 180000 (for example = 3 minutes)

- The parameter will not be present the first time you modify the parameter, so you will need to add it. The default value is 2 hours.
4. Watch to see if there are any check if orphaned SHAD processes that exist.

Monday, August 2, 2010

ORA-28056: Writing audit records to Windows Event Log failed

Problem Description
Connecting as sysdba fails with ORA-28056.

$ sqlplus / as sysdba
ORA-28056: Writing audit records to Windows Event Log failed.

Cause of the Problem
The problem happened because Event Viewer log is full and not able to log anymore events.

Solution of the Problem
You need to free an event log.

- Log in as a administrator or a member of the Administrators group in order to free an event log.

- Open Event Viewer. To do so click on Start Menu, click Control Panel, click Performance and Maintenance, click Administrative Tools, and then double-click Event Viewer.

Or, click on Start Menu, click Control Panel, click Administrative Tools, and then double-click Event Viewer.

- Now you can follow any of the following steps.

1) When a log is full, it stops recording new events. Clearing the log is one way to free the log and start recording new events. To do so, on the Action menu (left click)or on the left side Application/System/Security (as available) right click and select Clear All events.

2) You can also free a log and start recording new events by overwriting old events. To overwrite events, on the Action menu, or on the left side Application/System/Security (as available) click Properties, and then click Overwrite events as needed. This ensures that all new events are written to the log, even when the log is full.

3) You can also start logging new events by increasing the maximum log size. To increase the log size, on the Action menu or on the left side Application/System/Security (as available) click Properties, and then increase the Maximum log size by typing a bigger value.

Sunday, August 1, 2010

ORA-12640, ORA-21561: OID generation failed

Problem Description
In the sqlnet.ora file there is an entry SQLNET.AUTHENTICATION_SERVICES=NONE and now whenever you connect to database using RMAN it fails with following error.
ORA-21561: OID generation failed

Whenever you change the sqlnet.ora entry to SQLNET.AUTHENTICATION_SERVICES=NTS, it fails with error ORA-12640: Authentication adapter initialization failed.

Cause of the Problem
The problem happened due to lower value of Windows SharedSection heap size.

Solution of the Problem
1. Click on start menu on your windows machine and then go to Run.

2. Type regedit in the Run box and press Enter.

3. In the Registry Editor window navigate to
\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\SubSystems\
You will see key name Windows.

4. Right click on windows name and select modify. You should see value data field containing an entry like below.

%SystemRoot%\system32\csrss.exe ObjectDirectory=\Windows SharedSection=1024,3072,512 Windows=On SubSystemType=Windows ServerDll=basesrv,1 ServerDll=winsrv:UserServerDllInitialization,3 ServerDll=winsrv:ConServerDllInitialization,2 ProfileControl=Off MaxRequestThreads=16

From the field value data the parameter SharedSection's third value (512) is the size of the desktop heap for each desktop that is associated with a "noninteractive" window station.

Increase the desktop heap size that is modify the third value to 1024, so the values are now listed as 1024, 3072, 1024.

After you modify the entry try to connect to database using RMAN and it should resolve the problem.

General Solutions of ORA-12547: TNS: lost contact

In the post Troubleshoot ORA-12547: TNS: lost contact it is already discussed about the specific causes and solutions of ORA-12547: TNS: lost contact. If you don't have those specific scenarios then this post will provide you general solutions for error ORA-12547 which might help you to avoid this error.

1. Verify that environmental variable ORACLE_HOME, ORACLE_SID, PATH, LD_LIBRARY_PATH are correct.

$ echo $ORACLE_HOME
$ echo $ORACLE_SID
$ echo $LD_LIBRARY_PATH
$ echo $PATH


2. On AIX, HP-UX, Linux, MacOSX, Solaris, Tru64 system make sure kernel parameters settings are ok. To set, check and modify your kernel parameters have a look at the post How to check and modify Kernel Parameters in Linux
and Install Oracle on Linux.

3. There may have incorrect permissions on the ORACLE.exe
The 'ls' command should show permissions 6751 (as follows)

$ cd $ORACLE_HOME/bin
$ ls -l oracle


The output should be
-rwsr-s--x 1 oracle dba

If not then please execute the following
$ chmod 6751 oracle

4. Check whether current ulimit settings is ok.
$ ulimit -a

A sample output is,
$ ulimit -a 
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
open files (-n) 256
pipe size (512 bytes, -p) 10
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 29995
virtual memory (kbytes, -v) unlimited
If open files (-n) is set to lower then make it unlimited or set it to a higher value, for example:
$ulimit -n 4096

5. Check the permission on the library files under $ORACLE_HOME/lib and $ORACLE_HOME/lib32 are ok. Since since sqlplus and other binaries require these libraries so if sqlplus does not have permission on these file it may throw ORA-12517: TNS: lost contact. It should have 755 on unix system.

You can give 755 permissions to $ORACLE_HOME/lib and $ORACLE_HOME/lib32
$ chmod -R 755 $ORACLE_HOME/lib
$ chmod -R 755 $ORACLE_HOME/lib32
$ cd $ORACLE_HOME/bin
$ relink all