问题描述:在执行sqlldr时出错,以下是错误信息
解决方法:
1、
SQL*PLUS连接报错,错误显示:ora-12154: tns:could not resolve service name
使用Oracle的tnsping命令测试报错,错误显示:TNS-03505: 未能分解名称
2、用oracle的tnsping命令测试
C:Documents and SettingsAdministrator>tnsping Statistics 2
tns ping utility for 32-bit windows: version 9.2.0.8.0 - utility
iis7站长之家 on 06-1月 -2012 11:35:27
Copyright (c) 1997, 2006, Oracle Corporation. All rights reserved.
Used parameter files:
E:oracleora92networkadminsqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION= (ADDRESS_LIST = ()(HOST =10.20.30.12)(PORT = 1521))) (CONNECT_DATA= (SERVER=DEDICATED) (SERVICE_NAME=oralce_servicename))
TNS-12533: TNS:illegal ADDRESS parameters
原来在PROTOCOL=TCP前少了一个左括号。正确配置如下
Statistics=
(DESCRIPTION=
(ADDRESS_LIST =
(ADDRESS=(PROTOCOL=TCP)(HOST =10.20.30.12)(PORT = 1521))
)
(CONNECT_DATA=
(SERVER=DEDICATED)
(SERVICE_NAME=oralce_servicename)
)
)