Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

ora-12154 DB Oracle10g connection from DOS/command prompt

Posted on 2008-06-16
12
Medium Priority
?
780 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 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
Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

 

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

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!

Question has a verified solution.

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

Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
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…
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
Suggested Courses

916 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