Saturday, July 5, 2014

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


I just installed oracle software and trying to connect sqlplus

When I say sqlplus, it was giving an error.

-bash-3.00$ sqlplus '/as sysdba'

SQL*Plus: Release 10.2.0.1.0 - Production on Sun Jul 6 00:54:32 2014

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

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


Enter user-name:
ERROR:
ORA-12162: TNS:net service name is incorrectly specified


Enter user-name:
ERROR:
ORA-12162: TNS:net service name is incorrectly specified


SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
I forgot to export ORACLE_SID
I exported the ORACLE_SID and tried again, it was successful


-bash-3.00$ export ORACLE_SID=prod


-bash-3.00$ sqlplus '/as sysdba'

SQL*Plus: Release 10.2.0.1.0 - Production on Sun Jul 6 01:04:52 2014

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> exit
Disconnected
It was just a thought to share, to those who forgets like me !

No comments:

Post a Comment

NLS boot file not found or invalid opmnctl ping – EBS 12.2 ADCFGCLONE FAIL

Error: adcfgclone.pl failed while performing clone of EBS 12.2 instance. This occurred while ohsT2PApply is in progress. INST_TOP/adm...