Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

[fault handling] handling of ORA-12162 errors

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

[fault handling] ORA-12162: TNS:net service name is incorrectly specified

Scenario 1. 1 gets a new environment today, but cannot log in when executing sqlplus / as sysdba and report the error of ORA-12162: TNS:net service name is incorrectly specified. If you haven't encountered it before, record it at any time for reference.

I.2 experiment restore Last unsuccessful login: Thu Mar 19 16:59:06 BEIST 2015 on / dev/pts/0 from 200.31.177.54

Last login: Thu Jul 16 22:44:20 BEIST 2015 on ftp from:: ffff:200.31.156.201

*

* *

* *

* Welcome to AIX Version 5.3! *

* *

* *

* Please see the README file in / usr/lpp/bos for information pertinent to *

* this release of the AIX Operating System. *

* *

* *

*

Oracle@SJCk4:/home/oracle >

Oracle@SJCk4:/home/oracle >

Oracle@SJCk4:/home/oracle > ps-ef | grep ora_pmon_

Oracle 348182 1 0 Apr 25-7:42 ora_pmon_DATAWDB

Oracle 630842 1 0 Apr 25-20:02 ora_pmon_COGDB

Oracle 843948 1 0 Apr 25-6:45 ora_pmon_ETLDB

Oracle 5005418 4427974 0 09:44:03 pts/0 0:00 grep ora_pmon_

Oracle@SJCk4:/home/oracle > ORACLE_SID=DATAWDB

Oracle@SJCk4:/home/oracle > echo $ORACLE_SID

DATAWDB

Oracle@SJCk4:/home/oracle >

Oracle@SJCk4:/home/oracle > sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0-Production on Fri Jul 17 09:56:44 2015

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

Oracle@SJCk4:/home/oracle > echo $ORACLE_HOME

/ app/oracle/product/10.2.0/db_1

Oracle@SJCk4:/home/oracle > echo $ORACLE_SID

DATAWDB

Oracle@SJCk4:/home/oracle >

Oracle@SJCk4:/home/oracle >

Oracle@SJCk4:/home/oracle >

Oracle@SJCk4:/home/oracle >

Oracle@SJCk4:/home/oracle > export ORACLE_SID=DATAWDB

Oracle@SJCk4:/home/oracle > sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0-Production on Fri Jul 17 09:59:27 2015

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

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-64bit Production

With the Partitioning, OLAP and Data Mining options

SQL >

SQL >

I.3 Summary [oracle@rhel6_lhr ~] $oerr ora 12162

12162, 00000, "TNS:net service name is incorrectly specified"

/ / * Cause: The connect descriptor corresponding to the net service name in

/ / TNSNAMES.ORA or in the directory server (Oracle Internet Directory) is

/ / incorrectly specified.

/ / * Action: If using local naming make sure there are no syntax errors in

/ / the corresponding connect descriptor in the TNSNAMES.ORA file. If using

/ / directory naming check the information provided through the administration

/ / used for directory naming.

[oracle@rhel6_lhr ~] $

What is certain is that ORA-12162 is caused by the fact that ORACLE_SID is not set or is not set correctly. It is recommended to use export ORACLE_SID=XXX to set it, and then use ORACLE_SID=XXX to set it directly when it cannot be set.

Another blog reference: http://blog.itpub.net/26736162/viewspace-1735917/

One. 4 About Me

. .

The author: wheat seedlings, only focus on the technology of database, pay more attention to the application of technology.

ITPUB BLOG: http://blog.itpub.net/26736162

Address: http://blog.itpub.net/26736162/viewspace-1736192/

Pdf version of this article: http://yunpan.cn/QCwUAI9bn7g7w extraction code: af2d

If you add QQ to QQ:642808185, please indicate the title of the article you are reading

Creation time and place: 2015-07-17 10 00 ~ 2015-07-17 19:00 at × × Trading Center

. .

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report