数据库连接异常The Network Adapter could not establish the connection
来源:互联网 发布:软件代工生产合同 编辑:程序博客网 时间:2024/05/16 08:40
数据库连接错误The Network Adapter could not establish the connection
连接数据库报错
java.sql.SQLException: The Network Adapter could not establish the connection
用sqlplus 连接数据库可以连上
java连接时报错。
用ip地址作连接,防火墙以关/
向高手请教
------解决方案--------------------------------------------------------
lz在 管理工具--> 服务 中启动OracleOraDb10g_home1TNSListener服务后再刷新看该服务是否还显示为“已启动”。
------解决方案--------------------------------------------------------
10g我没用过,9i2我把C:\oracle\ora92\network\admin目录下的listener.ora和tnsnames.ora文件中的
java.sql.SQLException: The Network Adapter could not establish the connection
用sqlplus 连接数据库可以连上
java连接时报错。
用ip地址作连接,防火墙以关/
向高手请教
------解决方案--------------------------------------------------------
lz在 管理工具--> 服务 中启动OracleOraDb10g_home1TNSListener服务后再刷新看该服务是否还显示为“已启动”。
------解决方案--------------------------------------------------------
10g我没用过,9i2我把C:\oracle\ora92\network\admin目录下的listener.ora和tnsnames.ora文件中的
HOST全部改为:HOST = 127.0.0.1 ------错,应该是本机ip,然后重启监听就行了
就好了,我以前遇见过这种情况。
# LISTENER.ORA Network Configuration File: C:\oracle\ora92\network\admin\listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
)
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = C:\oracle\ora92)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = tfpc)
(ORACLE_HOME = C:\oracle\ora92)
(SID_NAME = tfpc)
)
)
**********************
# TNSNAMES.ORA Network Configuration File: C:\oracle\ora92\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
TFPC =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = tfpc)
)
)
INST1_HTTP =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = SHARED)
(SERVICE_NAME = MODOSE)
(PRESENTATION = http://HRService)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
------解决方案--------------------------------------------------------
lz这样:开始--> 运行--> cmd--> netstat -na
找找里面有没有如下一行:
TCP 127.0.0.1:1521 0.0.0.0:0 LISTENING
# LISTENER.ORA Network Configuration File: C:\oracle\ora92\network\admin\listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
)
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = C:\oracle\ora92)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = tfpc)
(ORACLE_HOME = C:\oracle\ora92)
(SID_NAME = tfpc)
)
)
**********************
# TNSNAMES.ORA Network Configuration File: C:\oracle\ora92\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
TFPC =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = tfpc)
)
)
INST1_HTTP =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = SHARED)
(SERVICE_NAME = MODOSE)
(PRESENTATION = http://HRService)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
------解决方案--------------------------------------------------------
lz这样:开始--> 运行--> cmd--> netstat -na
找找里面有没有如下一行:
TCP 127.0.0.1:1521 0.0.0.0:0 LISTENING
- 数据库连接异常The Network Adapter could not establish the connection
- 数据库连接错误The Network Adapter could not establish the connection
- 数据库连接错误The Network Adapter could not establish the connection
- 数据库连接错误The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- 浏览器兼容性问题
- SQLite简单教程
- 备份数据
- sitemesh 简单实例
- Image Gallery --- Html5&Css3
- 数据库连接异常The Network Adapter could not establish the connection
- 使用log4net的一点体会
- LCD的CPU接口和RGB接口
- JQuery实例扩展,限制输入长度。
- 在与SQL Server建立连接时出现错误
- 枚举 Enum
- Path 2.0 大部分效果分享
- 在CentOS上安装Git
- Android+PHP最佳实践(送源码)