Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ora-12154 DB Oracle10g connection from DOS/command prompt

Posted on 2008-06-16
12
Medium Priority
?
778 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 1000 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 1000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
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

670 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