Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Oracle error when executing sqlplus: "SP2-1503: Unable to initialize Oracle call interface"

I'm struggling with the following error when starting up sqlplus as my regular user - say "scott".

$ sqlplus
SP2-1503: Unable to initialize Oracle call interface
SP2-0152: ORACLE may not be functioning properly

Environment is:

  • Oracle 11.2.0.2
  • OpenSuse Linux 11.1 (64bit)

Misc other detail:

  • Oracle installed and running on localhost
  • No tnsnames issues as can run sqlplus as oracle admin user
  • Database up and listener started (11.2.0.2 install).
  • user scott in database admin group (/etc/group)
  • user scott references correct 11.2.0.2 installation

This is most bizarre as I can happily run sqlplus as the oracle user (say "oraadmin") and user scott is registered in the oracle admin group. Additionally, I had no such problems with my previous Oracle install (10.2.0.7). My ~scott's $ORACLE_HOME references the 11.2.0.2 installation.

Comparing my 11.2.0.2 and 10.2.0.7 environments, I've noticed several libraries (including $ORACLE_HOME/lib/libsqlplus.so) have group read-only permissions (744) so have chmod'ded these.

Other than that, my $ORACLE_HOME/lib, $ORACLE_HOME/bin, $ORACLE_HOME/oracore and $ORACLE_HOME/rdbms all seem reasonable with sensible permissons.

N.B: There's a plethora of stuff on-line but, as is often the case, there's a lot of case-specific issues and mainly around different versions of Windows. Focusing mainly on comparing my envs. Besides, as far as I can tell, this question doesn't yet exist on SO so could be useful to start collating answers by environment. I'll report back any sensible findings.

like image 400
wmorrison365 Avatar asked Jan 09 '12 14:01

wmorrison365


2 Answers

If it is Windows 7, You can right click on SQL Plus or whatever software you using, I use Crystal Reports.

so to you would have to right click and Run as Administrator.

it fixed for me.

like image 159
Mowgli Avatar answered Nov 03 '22 13:11

Mowgli


Fixed my particular issue...

User scott's $PATH still contained the ora11.1.0.7 bin. So, on starting sqlplus, I was running the ora11.1.0.7 sqlplus client against the 11.2.0.2 server. Think there may be more to it than that (i.e. I'd probably expect that client to work with that server) but that is the hub of the problem.

In my defence, my.bashrc sets the $PATH correctly so not yet sure what preempts it with the 11.1.0.7 version. Guess the sensible rule of thumb is to add my $ORACLE_HOME/bin to the front of the $PATH to ensure mine is found first, despite what else is set by whatever other environment config, as in

export PATH=$ORACLE_HOME/bin:$PATH

Yours, a little embarrassed but hopefully will be of help again to someone.

like image 45
wmorrison365 Avatar answered Nov 03 '22 12:11

wmorrison365