webservice连接不上oracle1g,内有配置文件,三天了!!!1
用PL/SQL能正常连接,就是用WEBSERVICE(.net)不能访问,提示“TNS:监听进程不能解析在连接描述符中给出的SERVICE_NAME”另外,用SQLPLUS也连接不上提示同样的错误
tnsnames.ora文件:
qqq =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = hp)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = qqq)
)
)
listener.ora文件
# listener.ora Network Configuration File: D:\oracle\product\10.2.0\db_1\network\admin\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = D:\oracle\product\10.2.0\db_1)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = qqq)
(ORACLE_HOME = D:\oracle\product\10.2.0\db_1)
(SID_NAME = qqq)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = hp)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
)
sqlnet.ora文件
# sqlnet.ora Network Configuration File: D:\oracle\product\10.2.0\db_1\network\admin\sqlnet.ora
# Generated by Oracle configuration tools.
# This file is actually generated by netca. But if customers choose to
# 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= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
--------------------编程问答-------------------- 你的连接字符串是什么,贴出来看看。
按以下步骤检查一下:
①服务端的Oracle WindowsService 是否启动了;
②服务端的Listener WindowsService 是否启动了;
(因为你的PL/SQL Developer能连上,所以基本排除服务端有问题。)
③在客户端用SQL*Plus测试连接是否成功;
④检查客户端连接字符串是否正确。
⑤检查客户端是否有安装有多个版本的Oracle?确认ORACLE_HOME路径是否正确。
--------------------编程问答-------------------- 顶起 --------------------编程问答-------------------- 记得以前用连接字符串的时候,可以用
datasource=192.168.0.123..............
可这次只能用
datasource=qqq..............
不知道为什么?
oracle服务器和WEBSERVICE应用在一个机器上
补充:.NET技术 , Web Services