Search This Blog

Total Pageviews

Thursday, 14 July 2011

Clean Up After a Failed CRS Install

Clean fail CRS

Clean Up After a Failed CRS Install

Cleaning up failed CRS installation
===================================

rm -rf $ORACLE_HOME
rm -rf $ORA_CRS_HOME
rm -rf $ASM_HOME
rm -rf /etc/oracle
rm -rf /etc/oratab
rm -rf /etc/oraInst.loc
rm -rf /var/tmp/.oracle
rm -rf /tmp/.oracle
rm -rf /usr/tmp/.oracle
rm -rf $ORACLE_BASE/oraInventory

2. /usr/sbin/oracleasm listdisk


/usr/sbin/oracleasm createdisk VOTE01 /dev/sdd1
/usr/sbin/oracleasm createdisk OCR01 /dev/sdd1

Mapping the raw devices



/bin/raw /dev/raw/raw1 /dev/sdb1
/bin/raw /dev/raw/raw3 /dev/sdd1



# chown root:oinstall /dev/raw/raw1
# chown oracle:oinstall /dev/raw/raw3

Setting the Permissions

# chmod 640 /dev/raw/raw1
# chmod 640 /dev/raw/raw3

libclntsh.so.10.1: cannot open shared object file: No such file or directory

sqlplus: error while loading shared libraries: libclntsh.so.10.1: cannot open shared object file: No such file or directory

error

One moment please...
err: ERROR Unable to check database.
err: Error description: Database access error. Reason Loading shared object failed. First tried to load library clntsh and failed because of error: [clntsh: cannot open shared object file: No such file or directory]. Second tried to load library libclntsh.so and failed because of error: [libclntsh.so: cannot open shared object file: No such file or directory].
Please press Enter to continue...




===
# .bash_profile


export ORACLE_HOME=/opt/app/oracle/product/10.2
export LANG=en_US.utf8
export LC_ALL=en_US.utf8


export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib:$ORACLE_HOME/lib:

# or 32bit lib path
# export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib:$ORACLE_HOME/lib32:

# LD_LIBRARY_PATH=$ORACLE_HOME/lib

#Get the aliases and functions

if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

#PATH=$PATH:$HOME/bin

#export PATH

export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/lib:$PATH:$HOME/bin

===

Try to connect sqlplus from different user

[bobjxi@apt-jtime-01 ~]$ sqlplus
sqlplus: error while loading shared libraries: libclntsh.so.10.1: cannot open shared object file: No such file or directory


ldd /home/oracle/oracle/product/10.2.0/lib32/libclntsh.so.10.1



[bobjxi@apt-jtime-01 lib]$




-rwxr-x--- 1 oracle dba 18451220 Jul 13 16:18 libclntsh.so.10.1
-rw-r----- 1 oracle dba 3093860 Jul 13 16:18 clntsh.map
lrwxrwxrwx 1 oracle dba 50 Jul 13 16:18 libclntsh.so -> /opt/app/oracle/product/10.2/lib/libclntsh.so.10.1
[bobjxi@apt-jtime-01 lib]$ ldd libclntsh.so
ldd: error: you do not have read permission for `./libclntsh.so'

[bobjxi@apt-jtime-01 lib]$ ldd libclntsh.so
ldd: error: you do not have read permission for `./libclntsh.so'


permission problem

-rw-r----- 1 oracle oinstall 3104536 Jul 13 16:18 libn10.a
-rwxr-x--- 1 oracle dba 18451220 Jul 13 16:18 libclntsh.so.10.1 <<<<<<< change the group dba to oinstall
-rw-r----- 1 oracle dba 3093860 Jul 13 16:18 clntsh.map
lrwxrwxrwx 1 oracle dba 50 Jul 13 16:18 libclntsh.so -> /opt/app/oracle/product/10.2/lib/libclntsh.so.10.1 <<<<<<< change the group dba to oinstall


because my user id is oinstall

[bobjxi@apt-jtime-01 ~]$ id
uid=7020(bobjxi) gid=1020(bobjxi) groups=1004(oinstall),1020(bobjxi)

to change the link group ...

chgrp -h oinstall libclntsh.so

Oracle DBA

anuj blog Archive