We help IT Professionals succeed at work.

Oracle, ora-12154 error

Rao_S
Rao_S used Ask the Experts™
on
how can i find that i am pointing to the correct oracle_home when i try to connect?
on my desktop somebody has installed 'instant client' earlier in one folder and i just installed the complete client in another folder..
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2011
Top Expert 2012
Commented:
get rid of one of them

consolidate the sqlnet settings though if they are split with some entries in each home's tnsnames.ora

Author

Commented:
i uninstalled the earlier installation, there is still some files left over, shall i just delete them?
also can i uninstall the second installation and delete everything and reinstall once again?

Author

Commented:
what do u mean by consolidate sqlnet settings?
i notice that i can log into the Oracle Enterprise Manager Consol and it shows me the databases and i can look at the schemas but when i try to rul sqlplus i get the ora-12154 and ora-12560 errors..
Most Valuable Expert 2011
Top Expert 2012
Commented:
enterprise manager is using a different oracle home than sqlplus

by consolidate I mean,  if tnsnames.ora of the instant client has database1 in it
and tnsnames.ora of the full client has database2 in it

then, before deleteing one of the installs,  make sure the one you keep has both database1 and database2 in it the tnsnames.ora

only use one client.  It'll make things much simpler.

Author

Commented:
where to look for the oracle home that sqlplus is using?
Most Valuable Expert 2011
Top Expert 2012
Commented:
check your path
exec :  where sqlplus
in cmd.exe
Geert GOracle dba
Top Expert 2009
Commented:
to specify a specific home for a sqlplus session

in a cmd window: (assuming installed on c:\oracle\ora1020 and tns is located in this home)

set oracle_home=c:\oracle\ora1020
set tns_admin=%oracle_home%\network\admin
set LD_LIBRARY_PATH=
%oracle_home%\bin\sqlplus.exe user/pass@tns_alias

Open in new window


this will make sure you use that specific oracle_home and it's sqlplus exe
and the tns_admin of that oracle_home
Geert GOracle dba
Top Expert 2009
Commented:
btw,

this approach allows any program to run with any oracle client
(except services)

you can set default oracle_home, tns_admin, etc in the environment variables of a specific user

make sure you distinguish between system and user environment variables

if the path for the system environment variables contains a oracle_home\bin directory, then that will take precedence over the user path variable (the user path variable is appended and not suffixed to the system path variable)

Author

Commented:
thank you all! solved the problem, found the path and sqlplus is working fine!