This article covers the error which will occur in a Linux or UNIX environment if the OS parameter ORACLE_SID is not properly set and how to resolve this error.
1. With the ORACLE_SID OS parameter set to null, attempt to start SQLPLUS as sysdba. You will receive the following error – ORA-12162.
mylinux:> sqlplus ‘/ as sysdba’
SQL*Plus: Release 10.2.0.4.0 – Production on Wed Jan 6 14:55:56 2010
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
ERROR:
ORA-12162: TNS:net service name is incorrectly specified
Enter user-name:
2. In the OS layer define your database sid with the OS parameter ORACLE_SID.
mylinux:> export ORACLE_SID=orcl
mylinux:>
3. Attempt to start SQLPLUS as sysdba.
mylinux:> sqlplus ‘/ as sysdba’
SQL*Plus: Release 10.2.0.4.0 – Production on Wed Jan 6 14:57:54 2010
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 – 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
4. Oracle SQLPLUS starts normally after the ORACLE_SID parameter is set at the OS layer correctly.
Larry J Catt, OCP 9i, 10g
oracle@allcompute.com
www.allcompute.com