[Spacewalk-list] SP2-0750: You may need to set ORACLE_HOMEtoyour Oracle software directory

Jan Pazdziora jpazdziora at redhat.com
Thu Feb 5 18:24:08 UTC 2009


On Thu, Feb 05, 2009 at 04:26:53PM +0100, Wolf, Christian wrote:
> Hi!
> I hope thats ok:
> [root at berlxspw01 Desktop]# cd /usr/bin/
> [root at berlxspw01 bin]# sqlplus spacewalk/spacewalk at xe

You are not necessarily running /usr/bin/sqlplus here. The fact that you
are chdir'ed to a directory does *not* mean you are running program from
that directory. What command (from which directory) will be executed
depends on your PATH environment variable, not on you current directory.
My guess is that you actually execute
/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/sqlplus
just like you are in the next case, and you have ORACLE_HOME set.

> SQL*Plus: Release 10.2.0.1.0 - Production on Thu Feb 5 16:22:42 2009
> Copyright (c) 1982, 2005, Oracle.  All rights reserved.
> 
> Connected to:
> Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
> SQL> quit
> 
> Disconnected from Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
> [root at berlxspw01 /]# sqlplus spacewalk/spacewalk at xe

I assume that this works because you have ORACLE_HOME set.

> SQL*Plus: Release 10.2.0.1.0 - Production on Thu Feb 5 16:22:54 2009
> Copyright (c) 1982, 2005, Oracle.  All rights reserved.
> 
> Connected to:
> Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
> SQL> quit
> 
> [root at berlxspw01 /]# type sqlplus
> sqlplus is hashed (/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/sqlplus)

This shows that no matter in what directory you are,
/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/sqlplus
will be run. That is not correct.

> [root at berlxspw01 /]# ./sqlplus
> -bash: ./sqlplus: Datei oder Verzeichnis nicht gefunden

This shows that there is no sqlplus in this directory.

You should:

- unset ORACLE_HOME;
- verify that /usr/bin/sqlplus points to the InstantClient sqlplus;
- try /usr/bin/sqlplus (full path) and see if it works without that
  ORACLE_HOME set;
- unset /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin from
  your PATH;
- run type sqlplus to verify that it shows /usr/bin/sqlplus;
- run sqlplus and see if it works without that ORACLE_HOME set.

-- 
Jan Pazdziora | adelton at #satellite*, #brno
Satellite Engineering, Red Hat




More information about the Spacewalk-list mailing list