Home » RDBMS Server » Server Administration » SQL Plus no access
SQL Plus no access [message #504765] Wed, 27 April 2011 11:43 Go to next message
juniorpeardba
Messages: 31
Registered: April 2011
Location: London
Member
Hi,

I have installed the oracle 11 binaries without any database install. However when I execute sqlplus - I receive this error message

"./sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file:

a) Not sure if I need to relink or install a package
b) Do I just set my environment variables

I have a oracle/product/11.1.0/db_1 as install location

What do I set the following variables to or do I relink/install?

$ ORACLE_BASE=xxx/xxx/xxx/xxx
$ export ORACLE_BASE
$ ORACLE_HOME=$ORACLE_BASE/xxx/xxx
$ export ORACLE_HOME

After I have done this will I be able to issue sqlplus and get SQLPLUS> even though there is no database installed as yet ?

Thanks again
Re: SQL Plus no access [message #504769 is a reply to message #504765] Wed, 27 April 2011 11:45 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
OS?
Post "env | sort"

Regards
Michel
Re: SQL Plus no access [message #504770 is a reply to message #504765] Wed, 27 April 2011 11:47 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
It would be helpful if you followed Posting Guidelines - http://www.orafaq.com/forum/t/88153/0/

post results of following OS commands

id
env | sort
Re: SQL Plus no access [message #504771 is a reply to message #504769] Wed, 27 April 2011 11:47 Go to previous messageGo to next message
juniorpeardba
Messages: 31
Registered: April 2011
Location: London
Member
OS is Linux Redhat 5.5 - Oracle Database is 11.2.0.2

[oracle@UKEDXDTMDCS01 client_1]$ env|sort
_=/bin/env
CVS_RSH=ssh
DISPLAY=localhost:10.0
G_BROKEN_FILENAMES=1
HISTSIZE=1000
HOME=/home/oracle
HOSTNAME=UKEDXDTMDCS01.peroot.com
INPUTRC=/etc/inputrc
LANG=en_US.UTF-8
LESSOPEN=|/usr/bin/lesspipe.sh %s
LOGNAME=oracle
LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32: *.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*. zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00; 35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
MAIL=/var/spool/mail/oracle
OLDPWD=/home/oracle
PATH=/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/oracle/bin
PWD=/home/oracle/product/11.1.0/client_1
SHELL=/bin/bash
SHLVL=1
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
TERM=xterm
USER=oracle
XAUTHORITY=/home/oracle/.xauth08Gjoz
[oracle@UKEDXDTMDCS01 client_1]$

[Updated on: Wed, 27 April 2011 11:49]

Report message to a moderator

Re: SQL Plus no access [message #504773 is a reply to message #504771] Wed, 27 April 2011 11:50 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
ORACLE_HOME not set
PATH should include $ORACLE_HOME/bin
Re: SQL Plus no access [message #504775 is a reply to message #504773] Wed, 27 April 2011 11:54 Go to previous messageGo to next message
juniorpeardba
Messages: 31
Registered: April 2011
Location: London
Member
Hello,

thanks for swift reply. So I can understand do I need to set the PATH variable only?
And how do I amend the variable that is already set ?

Thanks
Re: SQL Plus no access [message #504776 is a reply to message #504775] Wed, 27 April 2011 11:58 Go to previous messageGo to next message
juniorpeardba
Messages: 31
Registered: April 2011
Location: London
Member
Hi,

Changed and still the same error


[oracle@UKEDXDTMDCS01 client_1]$ echo $PATH
/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/oracle/bin
[oracle@UKEDXDTMDCS01 client_1]$ PATH=/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/oracle/bin:$ORACLE_HOME/bin

[oracle@UKEDXDTMDCS01 client_1]$ ls -ltr sqlpl*
-rwxr-xr-x 1 oracle oinstall 9304 Apr 18 13:49 sqlplus

[oracle@UKEDXDTMDCS01 client_1]$ ./sqlplus connect
./sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory

[Updated on: Wed, 27 April 2011 11:59]

Report message to a moderator

Re: SQL Plus no access [message #504777 is a reply to message #504776] Wed, 27 April 2011 12:02 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
echo $PATH
echo $ORACLE_HOME
Re: SQL Plus no access [message #504778 is a reply to message #504776] Wed, 27 April 2011 12:03 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Quote:
ORACLE_HOME not set

LD_LIBRARY_PATH or LIBPATH should contain $ORACLE_HOME/lib or lib32 depending on your OS.

By the way "echo $PATH" is not the same than "env | grep PATH"
ALWAYS post "env | sort" with your post.

Regards
Michel

[Updated on: Wed, 27 April 2011 12:04]

Report message to a moderator

Re: SQL Plus no access [message #504857 is a reply to message #504765] Thu, 28 April 2011 03:15 Go to previous messageGo to next message
juniorpeardba
Messages: 31
Registered: April 2011
Location: London
Member
Hi

[oracle@UKEDXDTMDCS01 client_1]$ echo $PATH
/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/oracle/product/11.1.0/db_1/bin
[oracle@UKEDXDTMDCS01 client_1]$ echo $ORACLE_HOME
/home/oracle/product/11.1.0/db_1
[oracle@UKEDXDTMDCS01 client_1]$



[oracle@UKEDXDTMDCS01 db_1]$ env|sort
_=/bin/env
CVS_RSH=ssh
DISPLAY=localhost:10.0
G_BROKEN_FILENAMES=1
HISTSIZE=1000
HOME=/home/oracle
HOSTNAME=UKEDXDTMDCS01.peroot.com
INPUTRC=/etc/inputrc
LANG=en_US.UTF-8
LESSOPEN=|/usr/bin/lesspipe.sh %s
LOGNAME=oracle
LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32: *.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*. zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00; 35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
MAIL=/var/spool/mail/oracle
OLDPWD=/home/oracle/product/11.1.0
ORACLE_HOME=/home/oracle/product/11.1.0/db_1
PATH=/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/oracle/product/11.1.0/db_1/bin
PWD=/home/oracle/product/11.1.0/db_1
SHELL=/bin/bash
SHLVL=1
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
TERM=xterm
USER=oracle


Still no joy


[oracle@UKEDXDTMDCS01 db_1]$ sqlplus
-bash: sqlplus: command not found


[oracle@UKEDXDTMDCS01 ~]$ find . -name sqlplus* -print
./product/11.1.0/client_1/sqlplus
[oracle@UKEDXDTMDCS01 ~]$ cd product/11.1.0/client_1
[oracle@UKEDXDTMDCS01 client_1]$ ./sqlplus
./sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory
[oracle@UKEDXDTMDCS01 client_1]$ sqlplus
-bash: sqlplus: command not found


Many thanks for your assistance
Re: SQL Plus no access [message #504858 is a reply to message #504857] Thu, 28 April 2011 03:39 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
You still didn't apply what we said.

Regards
Michel
Re: SQL Plus no access [message #504864 is a reply to message #504858] Thu, 28 April 2011 03:59 Go to previous messageGo to next message
juniorpeardba
Messages: 31
Registered: April 2011
Location: London
Member
Sorry missed that bit

LD_LIBRARY_PATH=/home/oracle/product/11.1.0/client_1/lib32
ORACLE_HOME=/home/oracle/product/11.1.0/client_1
PATH=/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/oracle/product/11.1.0/db_1/bin:/home/oracle/product/11.1.0/client_1/bin

I changed my ORACLE_HOME to point to client_1

As you can see below sqlplus sits in the folder client_1 and within that directory there is a folder called lib32

[oracle@UKEDXDTMDCS01 client_1]$ pwd
/home/oracle/product/11.1.0/client_1
[oracle@UKEDXDTMDCS01 client_1]$ ls -ltr
total 141300
-rw-r--r-- 1 oracle oinstall 1512521 Aug 29 2007 libsqlplusic.so
-rw-r--r-- 1 oracle oinstall 79220601 Oct 4 2007 libociei.so
-rw-r--r-- 1 oracle oinstall 60 Apr 18 13:48 oraInst.loc
-rw-r--r-- 1 oracle oinstall 37 Apr 18 13:49 install.platform
-rwxr-xr-x 1 oracle oinstall 9304 Apr 18 13:49 sqlplus
-rw-r--r-- 1 oracle oinstall 9286 Apr 18 13:49 readme.txt
-rw-r--r-- 1 oracle oinstall 82953 Apr 18 13:49 orai18n-mapping.jar
-rw-r--r-- 1 oracle oinstall 1655204 Apr 18 13:49 orai18n.jar
-rw-r--r-- 1 oracle oinstall 1977444 Apr 18 13:49 ojdbc6.jar
-rw-r--r-- 1 oracle oinstall 1879924 Apr 18 13:49 ojdbc5.jar
-rw-r--r-- 1 oracle oinstall 36781 Apr 18 13:49 ODBCRelnotesUS.htm
-rw-r--r-- 1 oracle oinstall 91881 Apr 18 13:49 ODBCRelnotesJA.htm
-rw-r--r-- 1 oracle oinstall 7266 Apr 18 13:49 ODBC_IC_Readme_Linux.html
drwxr-xr-x 2 oracle oinstall 4096 Apr 18 13:49 light
-rw-r--r-- 1 oracle oinstall 1022670 Apr 18 13:49 libsqora.so.11.1
-rw-r--r-- 1 oracle oinstall 1484916 Apr 18 13:49 libsqlplus.so
-rw-r--r-- 1 oracle oinstall 179758 Apr 18 13:49 libocijdbc11.so
-rw-r--r-- 1 oracle oinstall 1631739 Apr 18 13:49 libocci.so.11.1
-rw-r--r-- 1 oracle oinstall 8292111 Apr 18 13:49 libnnz11.so
-rw-r--r-- 1 oracle oinstall 15505 Apr 18 13:49 libheteroxa11.so
-rw-r--r-- 1 oracle oinstall 45335274 Apr 18 13:49 libclntsh.so.11.1
drwxr-xr-x 3 oracle oinstall 4096 Apr 18 13:49 lib32
drwxrwx--- 13 oracle oinstall 4096 Apr 18 13:49 inventory
drwxr-xr-x 2 oracle oinstall 4096 Apr 18 13:49 install
drwxr-xr-x 3 oracle oinstall 4096 Apr 18 13:51 cf
gtoollog
s

If I execute the command below the error it gives is a missing file. But I can clearly see that file in the same folder I am running sqlplus from.

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

Have I set LD_LIBRARY_PATH incorrectly? There is no /lib folder hanging off client_1

Does this help?

Many thanks again

[Updated on: Thu, 28 April 2011 04:05]

Report message to a moderator

Re: SQL Plus no access [message #504866 is a reply to message #504864] Thu, 28 April 2011 04:31 Go to previous messageGo to next message
ThomasG
Messages: 3212
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
Something seems to be very wrong.

- The "sqlplus" that is below $ORACLE_HOME (the client_1 directory) should be a directory, not a file.
- There shouldn't be any library files directly in $ORACLE_HOME
- Having no "lib" folder below $ORACLE_HOME is also not right.
- There is also no "bin" folder below $ORACLE_HOME

Which binaries from where did you install, and how?
Re: SQL Plus no access [message #504867 is a reply to message #504866] Thu, 28 April 2011 04:39 Go to previous messageGo to next message
juniorpeardba
Messages: 31
Registered: April 2011
Location: London
Member
Hi,

I downloaded the Linux Binaries from oracle site
version 11.1.0.6. then upgraded to 11.1.0.7

The install worked OK - I did not see any errors and I used the runInstaller
Then I upgraded to 11.1.0.7 - again no issues

I was reading on the web and somewhere I read said if there are no ORACLE_BASE
I may have to reinstall - but I'm afraid I will get back to the same point


what do you suggest


Re: SQL Plus no access [message #504869 is a reply to message #504867] Thu, 28 April 2011 04:43 Go to previous messageGo to next message
juniorpeardba
Messages: 31
Registered: April 2011
Location: London
Member
[oracle@UKEDXDTMDCS01 oracle]$ pwd
/opt/oracle
[oracle@UKEDXDTMDCS01 oracle]$ ls -ltr
total 2122552
drwxr-xr-x 6 root root 4096 Oct 16 2007 client
drwxr-xr-x 5 root root 4096 Sep 15 2008 Disk1
-rw-r--r-- 1 root root 121850 Sep 18 2008 README.html
-rw-r--r-- 1 root root 557855805 Apr 18 13:38 linux.x64_11gR1_client.zip
-rw-r--r-- 1 root root 1613366248 Apr 18 13:38 p6890831_111070_Linux-x86-64.zip
[oracle@UKEDXDTMDCS01 oracle]$
Re: SQL Plus no access [message #504882 is a reply to message #504869] Thu, 28 April 2011 06:08 Go to previous messageGo to next message
ThomasG
Messages: 3212
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
Well, the installation usually works when you follow the installation instructions to the letter. It usually fails when you skip steps.
Re: SQL Plus no access [message #504885 is a reply to message #504882] Thu, 28 April 2011 06:28 Go to previous messageGo to next message
juniorpeardba
Messages: 31
Registered: April 2011
Location: London
Member
Sorry, but no steps have been skipped. Like I mentioned the installation was successful
but no database has been built, only the binaries have been installed as suggested.

If you can help that would be appreciated, if not then thanks for what you have offered so far
Re: SQL Plus no access [message #505011 is a reply to message #504885] Thu, 28 April 2011 15:44 Go to previous messageGo to next message
ThomasG
Messages: 3212
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
The thing is, there are files missing that should be there, so the installation was not successful.

Can you post the log of the linking process (<ORACLE_HOME>/install/make.log) and the installation log ( <oraInventory>\logs\installActions<date>.log )?
Re: SQL Plus no access [message #551232 is a reply to message #505011] Mon, 16 April 2012 08:53 Go to previous message
rapitton
Messages: 1
Registered: April 2012
Junior Member
I also faced this issue and just wanted to update how the issue was resolved...

Make sure that all the entries are "exported" (using export command) as well. If its not exported, "echo $ORACLE_BASE" might show as home/Infa_Linux/app/Infa_Linux, but "env" command will not show this variable in the list and things will not work as expected.

Minimal entries required in the .profile files are

ORACLE_BASE=/home/Infa_Linux/app/Infa_Linux
ORACLE_HOME=${ORACLE_BASE}/product/11.2.0/client_1
LD_LIBRARY_PATH=$ORACLE_HOME

PATH=$PATH:$HOME/bin:${ORACLE_HOME}/bin:${ORACLE_HOME}

export PATH
umask 022

export ORACLE_BASE
export ORACLE_HOME
export LD_LIBRARY_PATH


My installation also dumped everything under the home/Infa_Linux/app/Infa_Linux/product/11.2.0/client_1 and there were no bin or lib sub folders under client_1.

Don't know whether its because I ignored all the pre installation warnings or all the rpm packages mentioned in the prerequisite were not installed before installing oracle.

Anyway still I was able to connect to oracle using sqlplus

Enter user-name: scott/tiger@//hostname:1521/mydb

hostname is the name of the server where the database is hosted
1521 is the port
mydb is the service name of the database

Previous Topic: issue in my database while number of users increases
Next Topic: Huge archive generation
Goto Forum:
  


Current Time: Fri Nov 29 02:28:55 CST 2024