Solved

ora-12154 DB Oracle10g connection from DOS/command prompt

Posted on 2008-06-16
12
771 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
12 Comments
 
LVL 29

Accepted Solution

by:
MikeOM_DBA earned 250 total points
ID: 21796166

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

Author Comment

by:danieliturbe
ID: 21796217
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
ID: 21796656
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:danieliturbe
ID: 21797213
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
ID: 21797232
not oracle_home, oracle_sid.

set ORACLE_SID=EMREP

is EMREP the name of your database?
0
 

Author Comment

by:danieliturbe
ID: 21797421
yes.
0
 

Author Comment

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

Expert Comment

by:rbrooker
ID: 21806495
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
ID: 21806551
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
ID: 21806566
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
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
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
Suggested Courses

617 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