Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have installed oracle10 in debian, in the web ui i can use the database, but this doesn't work with sqlplus, where i can configure this?


when i run sqlplus in command line, ask me for login and password, i digit the same of web interface and i get this error:

ORA-12162: TNS:net service name is incorrectly specified

share|improve this question
Care to share any errors you see? – medina Jul 25 '10 at 11:36
Are you sure your shell environment is correct (see my answer)? – DCookie Jul 25 '10 at 16:33
up vote 0 down vote accepted

This error usually indicates ORACLE_SID is incorrectly or not set.

Make sure your environment variables ORACLE_HOME (directory where you installed Oracle) and ORACLE_SID (database instance) are defined and exported, e.g.:

ORACLE_HOME=/usr/local/oracle/product/10.2.0/DB; export ORACLE_HOME
ORACLE_SID=your_DB; export ORACLE_SID     (note that case is significant on *nix instance names)
sqlplus user/pw


Can you connect through a listener? In other words, assuming your instance is defined in your tnsnames.ora file, then does the following allow you to connect:

sqlplus /nolog
connect user@your_DB
share|improve this answer
what is the ORACLE_SID default? XE? – diegueus9 Aug 5 '10 at 13:32
I'm not sure what the DB name limitations are on the instance, but whatever the name of the instance, your environment needs to have ORACLE_SID set to it and exported. – DCookie Aug 5 '10 at 16:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.