Experience: is what you get soon after you need it.

Experience: is what you get soon after you need it.

Rasul Allah (sal Allahu alaihi wa sallam) said: "Restore the trusts of those who trust you, and deal not falsely with him who deals falsely with you." [Abu Dawud, Tirmidhi]

Search This Blog

Monday, July 26, 2010

Find Oracle Binaries PATH and Oracle bit version

If the below output shows 64-bit then the installed oracle bit version is 64 else it will say 32-bit for 32-bit install

Host>file $ORACLE_HOME/bin/oracl*
/adm02/u0001/oracle/product/10.1.4/apps_1/bin/oracle: ELF 64-bit MSB executable SPARCV9 Version 1, dynamically linked, not stripped


what if I don't know where oracle is installed
1)
>ps -aef| grep tns
this is will you the path from where listener is running
ex:
>ps -aef| grep tns
oracle 7932 1 0 Oct 30 ? 11795:52 /adm02/u0001/oracle/product/10.2.0/db_1/bin/tnslsnr adm1p -inherit

so my ORACLE_HOME is /adm02/u0001/oracle/product/10.2.0/db_1

2) SELECT substr(file_spec,1,instr(file_spec,'lib')-2) ORACLE_HOME FROM dba_libraries
WHERE library_name='DBMS_SUMADV_LIB';

ex:
SQL> SELECT substr(file_spec,1,instr(file_spec,'lib')-2) ORACLE_HOME FROM dba_libraries
WHERE library_name='DBMS_SUMADV_LIB';
2
ORACLE_HOME
--------------------------------------------------------------------------------
/adm02/u0001/oracle/product/10.2.0/db_1

No comments: