I just installed oracle software and trying to connect sqlplus
When I say sqlplus, it was giving an error.
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*PlusI 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 DisconnectedIt was just a thought to share, to those who forgets like me !