Solved

ora-12154 DB Oracle10g connection from DOS/command prompt

Posted on 2008-06-16
12
770 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
Industry Leaders: 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

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!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Oracle Insert not working 10 79
Error 14 initializing SQL*Plus 4 22
construct a query sql 11 43
Force XMLSEQUENCE to return empty tags for null values. 10 47
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
Via a live example, show how to take different types of Oracle backups using RMAN.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

710 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