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


[oracle@ oracle]$ sqlplus

SQL*Plus: Release 11.2.0.1.0 Production on Tue Oct 11 20:53:19 2011

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

Enter user-name: sys as sysdba

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

Solution:

This is because ORACEL_SID value is not set for database name before connecting to database.

[oracle@bin]$ export ORACLE_SID=db01
[oracle@bin]$ sqlplus

SQL*Plus: Release 11.2.0.1.0 Production on Tue Oct 11 20:54:00 2011

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

Enter user-name: sys as sysdba
Enter password:

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>

No comments:

Post a Comment