Kamran Agayev's Oracle Blog

Oracle Certified Master

Archive for March, 2011

TNS-04612: Null RHS for … while creating a database using dbca

Posted by Kamran Agayev A. on 31st March 2011

While creating a database I’ve got TNS-04414: File error caused by: TNS-04612: Null RHS for “….” error

Between quotation marks I’ve got a tns entry that was recently added. I tested it using tnsping utility and succeeded. However, the reason was that entry as it was added manually and it seems in this step somehow dbca can’t read or understand it :) Anyway, I took the backup of the tnsnames.ora file, deleted that entry and tried to create the database again, and it worked. After that, reverted the tnsnames back

Posted in Administration | 6 Comments »

Step by Step installing Oracle 11g R2 on Oracle Solaris 10

Posted by Kamran Agayev A. on 27th March 2011

In this step by step tutorial I’m going to show you the steps of installing Oracle 11gR2 on Oracle Solaris 10. For this, download Oracle 11gR2 and Oracle Solaris 10, create virtual machine and install Oracle Solaris 10 using my following step by step tutorial:


After installing the Solaris, login with root user. As a first step let’s install VMware tools. For this, disconnect the installation dvd and select “Install VMware tools” from the VM menu

After some seconds a new window will appear.

Get its address, copy the file from to the /tmp directory using a terminal window, unzip and install it

Get into the unzipped folder and run the installation file.


cd vmware-tools-distrib

After the installation completes, logout from the root user and login again

Now, let’s check the installed OS packages that are required for the Oracle installation. For this, run the following command:

[code]pkginfo -i SUNWarc SUNWbtool SUNWhea SUNWlibC SUNWlibms SUNWsprot SUNWtoo SUNWi1of SUNWi1cs SUNWi15cs SUNWxwfnt

You should miss two packages – 1) SUNWi1cs 2) SUNWi15cs

To install them, mount the Solaris installation dvd and run the following command:

[code]pkgadd -d /cdrom/sol_10_910_x86/Solaris_10/Product SUNWi1cs SUNWi15cs[/code]

If the mount point of the cdrom is different in your environment, specify the correct path to the dvd

After installation completed perform the following steps:

1) Create necessary groups and a user


groupadd oinstall
groupadd dba
useradd -g oinstall -G dba -d /export/home/oracle -s /usr/bin/bash oracle
passwd oracle


2) Create necessary folder for the installation

[code]mkdir -p /export/home/oracle/product/11.2.0/db_1
mkdir /export/home/oracle/tmp[/code]

[code]chown -R oracle:oinstall /export/home/oracle[/code]

3) Change kernel parameters


projadd -U oracle -K "project.max-shm-memory=(priv,4g,deny)" oracle
projmod -sK "project.max-sem-nsems=(priv,256,deny)" oracle
projmod -sK "project.max-sem-ids=(priv,100,deny)" oracle
projmod -sK "project.max-shm-ids=(priv,100,deny)" oracle
echo "set maxuprc=16384" >> /etc/system
echo "set max_nprocs=30000" >> /etc/system
echo "set shmsys:shminfo_shmmax=4294967295" >> /etc/system


Now reboot the machine and login with an oracle user. Let’s create a new swap file with 1Gb size, as it’s required for the Oracle installation


mkfile 1024m /export/home/oracle/orcl_swap
swap -a /export/home/oracle/orcl_swap

Now change the .profile file of the oracle user and set necessary environment variables:

gedit /export/home/oracle/.profile


export ORACLE_BASE=/export/home/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export TMP=/export/home/oracle/tmp
export TMPDIR=/export/home/oracle/tmp
export DISPLAY=:0.0


Now create an “installation” direcotry under /export/home/oracle

Then mout the cdrom device and copy the installation files to that directory

Extract both files uzing unzip utility, and start the installation


unzip your_file1.zip

unzip your_file2.zip

cd database



Uncheck the checkbox and click next. If you can’t see the Next button, use Alt+N combination :)

Select the first option and click next

Click Next

Defint the folder for Oracle installation, database name and passwords and click next

Click Next

Click Finish to start the installation.

After the installation of the software finishes, installer automatically runs the DBCA to create the database

After a while, installation finishes.

Click OK and you’ll be prompted to run orainstRoot.sh and root.sh

Switch to the previous Terminal, create new window, login with a root user and run both shell scripts

At last, you’ll get success message

Now let’s connect to the database from Sql*Plus

Posted in Administration | 75 Comments »

Step by Step installing Oracle 11g R2 on OEL 5.5

Posted by Kamran Agayev A. on 21st March 2011

In this step by step tutorial I’m going to show you the installation of Oracle 11gR2 on OEL 5.5

As in every my step by step and video tutorials, I use VMware virtual machine, so here also I start with creating a virtual machine

P.S. Actually I was preparing this tutorial for CentOS, but somehow mixed .iso images :) So the name of the virtual machine appears as “CentOS” but the installation is made on OEL. However, you can try the same tutorial for CentOS as well

Click Next

Select Typical and click Next

Select Linux and “Red Hat Enterprise Linux 5” as an OS version and click next

Provide the name of virtual machine and specify the location and click next

Select “Use bridged networking” and click Next

Specify the size of the virtual machine and click Finish

Delete Floppy, USB Controller and Sound Adapter devices, set Memory to 1024 Mb, mount ISO image of the OEL 5.5 OS and click OK

Click “Power on” button to start the virtual machine

Click enter

Select Skip button

Click Next

Select Installation language and click next

Select the keyboard and click next

Click on Yes

Click Next

Click on YES to remove the partition and click next

Click Next

Select the country and click next

Provide the password of the root user and click next

To install required packages for Oracle installation select “Customize now” and click Next

Desktop Environments

                                                  GNOME Desktop Environment  


                                                  Graphical Internet


                                                  Development Libraries

                                                  Development Tools

                                                  GNOME Software Development

                                                  Java Development

                                                  Legacy Software Development

                                                  X Software Development  (Select libxpdevel and openmotif)


                                                  Server Configuration Tools

                                                  Web Server

                                                  Windows File Server

Base System

                                                  Administration Tools



                                                  Legacy Software Support (select compat-db)

                                                  System Tools  (select sysstat)

                                                  X Window System

Click Next to start the installation

Click on Reboot button

Click Forward

Choose the first option and click Forward

As we use the virtual machine for testing purpose, disable the firewall and click Forward

Disable Selinux and click Forward

Click Forward

Specify the time and date and click Forward

We don’t need to create a user so click Forward

Click Finish button to finish the installation of OEL

Login with the root user

From VM menu, select Install VMWare tools

If the vmware installation cd doesn’t appear automatically, Eject the previous cd (installation of OEL), doublt click on Computer and double click on Cd-rom device. This will initialize the vmware tools cd

Double click on .rpm package

Click on Apply to start the installation

After you set all configurations, open new terminal and run vmware-config-tools executable and finish the installation of vmware tools

Now let’s create a user and groups for Oracle installation

[code]groupadd  oinstall
groupadd  dba
useradd -m -g oinstall -G dba -d /home/oracle -s /bin/bash -c "Oracle Software Owner" oracle
passwd oracle

Change the /etc/sysconfig.conf file to add (change) kernel parameters that are required for Oracle installation

The file should be as follows:


net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 2147483648
kernel.shmall = 2097152
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 1048576
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576

To make the active in the current session, run /sbin/sysctl -p command

Change /etc/pam.d/login file and add the followingn line:


session required pam_limits.so


Change /etc/security/limits.conf and add the following lines:


oracle              soft    nproc   2047
oracle              hard    nproc   16384
oracle              soft    nofile  1024
oracle              hard    nofile  65536

Create necessary directories for Oracle home

Change the entry of .bash_profile file of the oracle user and add following lines:

vi /home/oracle/.bash_profile


export ORACLE_HOME=/u01/home/oracle/product/11.2.0/db_1

Now copy downloaded oracle installation files to the /tmp directory

Switch to the /tmp directory and unzip both files with oracle user. This will create a new folder called “database”

Logout from root user, login with oracle, switch to the /tmp/database directory and run installation by running the following executable


cd /tmp/database



Select Create and configure a database and click next

Select the first option and click Next

Provide the name of the database and the password and click next

Specify the folder for the inventory directory and click Next

In the prerequisite check we was informed that we need to install three packages as well. So mount the .iso file of the OEL installation, switch to the Server folder

Install all three packages with rpm -Uvh command as it’s shown above

Click on Check Again button and you’ll see that those notifications are disappeared. Check “Ignore all” checkbox and click Next

Click Finish button to start the installation

DBCA tools automatically will start to create the database named mydb

After all, the installation finished successfully. Get the url of the database control

Open a web browser and paste that url to the address field. Click “or you can add an exception” link

Click on “Add Exception” button

Click Get Certificate and Confirm Security Exception buttons

Provide the password for sys user and password, select SYSDBA and click Login button

Switch to the installation page and run both shell scripts with root user

Open a new terminal, export ORACLE_SID variable and connect to the database

I hope by following my step by step instruction, you’ll also install Oracle 11gR2 on OEL successfully

Tags: , , , ,
Posted in Administration | 111 Comments »

ORA-00600: internal error code, arguments: [12840] while compiling a package

Posted by Kamran Agayev A. on 18th March 2011

While compiling a pacakge on 9i db , I’ve encountered the following error:


ORA-00600: internal error code, arguments: [12840], [], [], [], [], [], [], []


There’s was a public synonym on 9i side which was referred to the table on the remote database that is running on 10gR2

After a little research I’ve found out that it’s a bug and I need to create a view and call that public synonym from that view. Fortunately, by creating a view, I was able compile a package successfully :)

For more information, check the following metalink note:


Posted in Administration | No Comments »

error while loading shared libraries: libpthread.so.0: cannot open shared object file

Posted by Kamran Agayev A. on 17th March 2011

And the third and latest issue we got today with RAC installation was the following error while running rootdelete.sh which is used to disable clusterware applications :


[root@node1 install]# srvctl
/u01/oracle/product/10.2.0/crs_1/jdk/jre/bin/java: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory
[root@node1 install]# ./rootdelete.sh
/u01/oracle/product/10.2.0/crs_1/jdk/jre/bin/java: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

Then we got the same error while using srvctl utility to manage configuration information.

After a little investigation, we’ve found that we need to edit two executables 1. srvctl and vipca (as it’s called when running rootdelete.sh) and comment the line where LD_ASSUME_KERNEL parameter is set


          #  export LD_ASSUME_KERNEL

After commenting the line, we were able to bypass the above mentioned error

You can refer the following metalink note for more information:

Executing Applypreferences.sh Fails With “Error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory” [ID 729952.1]


[root@node1 install]# ./rootdelete.sh
Shutting down Oracle Cluster Ready Services (CRS):
Stopping resources.
Error while stopping resources. Possible cause: CRSD is down.
Stopping CSSD.
Unable to communicate with the CSS daemon.
Shutdown has begun. The daemons should exit soon.
Checking to see if Oracle CRS stack is down…
Oracle CRS stack is not running.
Oracle CRS stack is down now.
Removing script for Oracle Cluster Ready services
Updating ocr file for downgrade
Cleaning up SCR settings in ‘/etc/oracle/scls_scr’
[root@node1 install]#


Posted in Administration, RAC issues | 1 Comment »

clssgsGroupJoin: CSS has not reached fatal mode.Registration is not yet safe. Retrying

Posted by Kamran Agayev A. on 17th March 2011

I would like to talk about the second problem we got during RAC installation. Again, after clusterware installation while running root.sh on the first node, we got some delay and the script were going to keeping running. While checking css.log file under $ORA_CRS_HOME/log/<HOSTNAME>/client/css.log file we got the following error:


[ CSSCLNT][9553600]clssgsGroupJoin: CSS has not reached fatal mode.Registration is not yet safe. Retrying

[ CSSCLNT][9553600]clssgsGroupJoin: CSS has not reached fatal mode.Registration is not yet safe. Retrying


However, we were able to run the same shell script (root.sh) on the second node successfully.

After a little investigation in the metalink, we’ve foud that it’s a bug – Bug 6353645: ROOT.SH FAILED TO STARTUP CLUSTERWARE

Although there were no any workaround, we’ve found a suggestion in the end of the note that after running root.sh on the second node, the message in the first node should disappear

It was true :)


[root@FIRSTNODE client]# crsctl check crs
CSS appears healthy
CRS appears healthy
EVM appears healthy

Posted in Administration, RAC issues | No Comments »

Failure while formatting raw device for RAC installation

Posted by Kamran Agayev A. on 17th March 2011

Today, while configuring 2 node RAC on VMware ESX server, I got the following error afer clusterware installation:


Creating OCR keys for user ‘root’, privgrp ‘root’..
Operation successful.
Now formatting voting device: /dev/raw/raw3
Failure writing offset 1766400 in voting device (raw3)
Failed to initialize Oracle Cluster Registry for cluster

After some investigation, we’ve found that the problem is caused by dividing a raw device into two different partitions and the failure occurs after formatting the device. So we deleted those partitions and combined them into one partition and the error fixed.

Posted in Administration, RAC issues | 2 Comments »