Solved

ora-12154 DB Oracle10g connection from DOS/command prompt

Posted on 2008-06-16
12
755 Views
Last Modified: 2012-05-05
Hi All,

I have been having problems to connect to my 10g database using DOS/command prompt window. I 've already connected to that database using SQL*Plus, and it is working ok. I checked my sqlnet.ora, lsitener.ora, and tnsnames.ora, and they seems to be ok as well. I got an ORA-12154 error message.
Can anyone tell me why it is  happening?..any idea?
Thanks.
0
Comment
Question by:danieliturbe
  • 5
  • 4
12 Comments
 
LVL 29

Accepted Solution

by:
MikeOM_DBA earned 250 total points
Comment Utility

Did you set ORACLE_HOME, ORACLE_SID and the correct PATH environment variables?
0
 

Author Comment

by:danieliturbe
Comment Utility
Over the registry?..if so, yes I did it.
This are my entries:
ORACLE_HOME=c:\OracleHomes\db10g
ORACLE_SID=emrep
0
 
LVL 18

Expert Comment

by:rbrooker
Comment Utility
when you use a command prompt, you need to issue the command:

set ORACLE_SID=<YOUR_SID>

before connecting using command line sqlplus.  you do this for every command window you open.  did you do this?
0
 

Author Comment

by:danieliturbe
Comment Utility
Yes I did it.
c:\>set ORACLE_HOME=emrep...is that ok?? or I missed something?....because I still having the same error #.
0
 
LVL 18

Expert Comment

by:rbrooker
Comment Utility
not oracle_home, oracle_sid.

set ORACLE_SID=EMREP

is EMREP the name of your database?
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:danieliturbe
Comment Utility
yes.
0
 

Author Comment

by:danieliturbe
Comment Utility
Hello,
The DB name is "EMREP"...
Any ideas?
Thanks.
0
 
LVL 18

Expert Comment

by:rbrooker
Comment Utility
thats all i can think of.

C:\>set ORACLE_SID=EMREP
C:\>sqlplus /nolog
SQL> connect / as sysdba
Connected.
SQL>

after that, im all out.
0
 

Author Comment

by:danieliturbe
Comment Utility
Thank you , but now I am getting the following:

Error 6 initializing SQL*Plus
Message file SP1<lang>.msb not found
SP2-0750 You may need to set ORACLE_HOME to your Oracle software directory.
ANy idea over this?

Thanks a lot.
0
 
LVL 18

Assisted Solution

by:rbrooker
rbrooker earned 250 total points
Comment Utility
C:\>set ORACLE_SID=EMREP
C:\>set ORACLE_HOME=C:\where\ever\you\installed\oracle
C:\>sqlplus /nolog
SQL> connect / as sysdba
Connected.
SQL>
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now