Solution for OracleORA-12154: TNS: couldnotresolveservicename
Oracle ORA-12154: TNS: cocould not resolve service name Solution
Problem description: An error occurred while executing sqlldr. The error message is as follows:
C: \ Documents ents and Settings \ Administrator> sqlldr username/password @ Statistics controlpolic'controlfile.txt 'logtail'log.txt'
SQL * Loader: Release 9.2.0.8.0-Production on Friday January 6 11:23:55 2012
Copyright (c) 1982,200 2, Oracle Corporation. All rights reserved.
SQL * Loader-704: Internal error: ulconnect: OCIServerAttach [0]
ORA-12154: TNS: cocould not resolve service name
However, the pl/SQL tool can be connected with this connection name.
Solution:
1,
SQL * PLUS connection error, error display:ORA-12154: TNS: cocould not resolve service name
Test an error using the tnsping command for Oracle, with the error: TNS-03505: failed to break down the name
2. Use the oracle tnsping command to test
TNS-12533: TNS: illegal ADDRESS parameters
The error message can be analyzed. The ADDRESS parameter is invalid.
OriginalInPROTOCOL = TCPLeft parentheses are missing. The correct configuration is as follows:
Statistics =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = 10.20.30.12) (PORT = 1521 ))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = oralce_servicename)
)
)