Oracle client simple connection error ORA-12154, TNS-03505
Environment:
Server: RHEL6.5 + Oracle Server 11.2.0.4
Client: Win2003 + Oracle Client 10.2.0.1
1. symptom
2. Troubleshooting
3. Solve the Problem
1. symptom
The Oracle database is installed on the server, and the test is normal.
But when the user's client tests the connection, the error ORA-12154, TNS-03505
Sqlplus system/oracle@192.168.10.10/xxsid
C: \ Documents ents and Settings \ Administrator> sqlplus system/oracle@192.168.10.10/xxsid
SQL * Plus: Release 10.2.0.1.0-Production on Thursday July 16 16:53:58 2015
Copyright (c) 1982,200 5, Oracle. All rights reserved.
ERROR:
ORA-12154: TNS: Unable to parse the specified connection identifier
Enter the User Name:
2. Troubleshooting
Tnsping test:
C: \ Documents ents and Settings \ Administrator> tnsping 192.168.10.10
TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0-Production on 16-7-
16:53:00 2015
Copyright (c) 1997,200 5, Oracle. All rights reserved.
Used parameter files:
D: \ oracle32 \ product \ 10.2.0 \ client_1 \ network \ admin \ sqlnet. ora
TNS-03505: unable to resolve name
View the used parameter file sqlnet. ora
# Sqlnet. ora Network Configuration File: D: \ oracle32 \ product \ 10.2.0 \ client_1 \ network \ admin \ sqlnet. ora
# Generated by Oracle configuration tools.
# This file is actually generated by netca. But if MERs choose
# Install "Software Only", this file wont exist and without the native
# Authentication, they will not be able to connect to the database on NT.
SQLNET. AUTHENTICATION_SERVICES = (CNT)
NAMES. DIRECTORY_PATH = (TNSNAMES)
It is found that the configuration of NAMES. DIRECTORY_PATH only allows TNSNAMES
3. Solve the Problem
Comment out a row of NAMES. DIRECTORY_PATH = (TNSNAMES) in sqlnet. ora,
The default values (TNSNAMES, ONAMES, and HOSTNAME) are used after the annotations are commented out. You can also add these common options.
Test again and solve the problem.
C: \ Documents ents and Settings \ Administrator> sqlplus system/oracle@192.168.10.10/xxsid
SQL * Plus: Release 10.2.0.1.0-Production on Thursday July 16 16:54:08 2015
Copyright (c) 1982,200 5, Oracle. All rights reserved.
Connect:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0-64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
If there are no special security requirements or other specifications, we recommend that you do not modify the configuration information of the sqlnet. ora file at will.