ORA-12154, ORA-12560 Solution Process
Application Server: Windows Server 2008 R2 Enterprise
Fault symptom: Project-side colleague reported application server program Connection database error: ORA-12560: TNS: protocol adapter Error
- 1. Fault Reproduction
- 2. Locate the problem
- 3. Solve the Problem
1. Fault Reproduction
Log on to the application server using sqlplus and PL/SQL
Database Server connection error:
ORA-12154: TNS: Unable to parse the specified connection identifier
2. Problem locating 2.1 ping test network
Ping database IP address network connection
C: \ Users \ Administrator> ping 192.168.1.100 pinging 192.168.1.100 data with 32 bytes: reply from 192.168.1.100: byte = 32 time <1 ms TTL = 64 reply from 192.168.1.100: byte = 32 time <1 ms TTL = 64 replies from 192.168.1.100: byte = 32 time <1 ms TTL = 64 replies from 192.168.1.100: bytes = 32 time <1 ms TTL = 64192.168.1.100 Ping statistics: Packet: Sent = 4, received = 4, lost = 0 (0% lost ), estimated round-trip time (in milliseconds): Minimum = 0 ms, maximum = 0 ms, average = 0 ms
2.2 tnsping test Port
Tnsping database IP address, error: TNS-12560: TNS: protocol adapter Error
C: \ Users \ Administrator> tnsping 192.168.1.100TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0-Production on month 27-1-2016 09: 55: 56 Copyright (c) 1997,201 0, Oracle. all rights reserved. used parameter file: D: \ app \ administrator \ product \ 11.2.0 \ client_1 \ network \ admin \ sqlnet. ora has used the EZCONNECT adapter to parse the alias and try to connect (DESCRIPTION = (CONNECT_DATA = (SERVICE_NAME =) (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.1.100) (PORT = 1521) TNS-12560: TNS: protocol adapter Error
2.3 log on to the Database Host
When SecureCRT is used to log on to the database host server, the following error occurs:
An operation on a socket could not be performed because the system lackedsufficient buffer space or because a queue was full.
2.4 try other machine connection
Other machines can be logged on to the database server to further view the database information and find that everything is normal:
- The Database Service is normal.
- Database listening is normal
- Firewall/SELINUX not enabled
- Other hosts with the same network segment as the application server can test the connection to the database.
It looks very strange, but it is still determined that it is not the reason for the database server, not the reason for the network.
3. Solve the Problem
3.1 Official explanation of two ORA errors
ORA-12560
$ oerr ora 1256012560, 00000, "TNS:protocol adapter error"// *Cause: A generic protocol adapter error occurred.// *Action: Check addresses used for proper protocol specification. Before// reporting this error, look at the error stack and check for lower level// transport errors. For further details, turn on tracing and reexecute the// operation. Turn off tracing when the operation is complete.
ORA-12154
$ oerr ora 1215412154, 00000, "TNS:could not resolve the connect identifier specified"// *Cause: A connection to a database or other service was requested using// a connect identifier, and the connect identifier specified could not// be resolved into a connect descriptor using one of the naming methods// configured. For example, if the type of connect identifier used was a// net service name then the net service name could not be found in a // naming method repository, or the repository could not be// located or reached.// *Action:// - If you are using local naming (TNSNAMES.ORA file):// - Make sure that "TNSNAMES" is listed as one of the values of the// NAMES.DIRECTORY_PATH parameter in the Oracle Net profile// (SQLNET.ORA)// - Verify that a TNSNAMES.ORA file exists and is in the proper// directory and is accessible.// - Check that the net service name used as the connect identifier// exists in the TNSNAMES.ORA file.// - Make sure there are no syntax errors anywhere in the TNSNAMES.ORA// file. Look for unmatched parentheses or stray characters. Errors// in a TNSNAMES.ORA file may make it unusable.// - If you are using directory naming:// - Verify that "LDAP" is listed as one of the values of the// NAMES.DIRETORY_PATH parameter in the Oracle Net profile// (SQLNET.ORA).// - Verify that the LDAP directory server is up and that it is// accessible.// - Verify that the net service name or database name used as the// connect identifier is configured in the directory.// - Verify that the default context being used is correct by// specifying a fully qualified net service name or a full LDAP DN// as the connect identifier// - If you are using easy connect naming:// - Verify that "EZCONNECT" is listed as one of the values of the// NAMES.DIRETORY_PATH parameter in the Oracle Net profile// (SQLNET.ORA).// - Make sure the host, port and service name specified// are correct.// - Try enclosing the connect identifier in quote marks.// // See the Oracle Net Services Administrators Guide or the Oracle// operating system specific guide for more information on naming.
3.2 windows Application Server Information
Run the systeminfo command to view some information about the windows Application Server:
C: \ Users \ Administrator> systeminfo Host Name: XXXXWEB1OS name: Microsoft Windows Server 2008 R2 EnterpriseOS version: 6.1.7600 currently missing Build 7600OS manufacturer: Microsoft configurationos configuration: Master Domain Controller OS component type: multiprocessor Free registration owner: registered organization: Product ID: xxxxx-OEM-xxxxxxx-xxxxx initial installation date:, 21:31:46 system start time:, 13:42:21 system manufacturer: HP System Model: ProLiant BL460c Gen8 system type: x64-based PC Processor: 2 processors installed. [01]: Intel64 Family 6 Model 45 Stepping 7 GenuineIntel ~ 2000 Mhz [02]: Intel64 Family 6 Model 45 Stepping 7 GenuineIntel ~ 2000 MhzBIOS version: HP I31
We can see that the server was last started and has been running for more than a year.
The error message returned from the above CRT connection is preliminarily determined that the socket resources of the Windows Server are exhausted.
I am not very familiar with Windows. I simply restarted the application server and solved this problem.