Io 异常: The Network Adapter could not establish the connection
来源:互联网 发布:大数据专家委员会 编辑:程序博客网 时间:2024/04/30 02:34
Io 异常: The Network Adapter could not establish the connection
这个异常的出现一般与数据库和你的PC的设置有关
这种异常的出现大致上有下面几种:
1。IP错误。
在设置URL时错误,例如:jdbc:oracle:thin:@192.168.0.36:1521:sharp
数据库服务器不正确:ping 服务器IP是否正确。不正确,将URL更改为正确
端口号错误:一般不会错误。
进行一下操作:在DOS上键入sqlplus,检查oracle是否开启
一却正常,执行下面第2步。
2。防火墙
如果机器上安装有放火墙,可能是服务器端口号屏蔽而造成的。关闭防火墙后,尝试重新连接。
仍然不行,执行第3步。
3。数据库监听未启动 修改PC上注册表中的ImagePath值。
我下面以现在主流的数据库ORACLE为例
重新手动启动数据库监听:
1:开始 → 运行→ 输入CMD→ 进入DOS命令提示界面
d:>lsnrctl
LSNRCTL> status
或者
LSNRCTL> start
如果是类似图片中的信息
恭喜,你的问题已经查找出来,是数据库监听器没未启动而造成的。
以下是手动启动数据库的方法:
在运行处执行regedit进入注册表到
开始 →运行→ regedit
按下面路径
HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/OracleOraHome90TNSListener
找到OracleOraHome90TNSListener(我用的是Oracle9i 其他的版本的应该是OracleOraHomexxxTNSListener)
找到之后你会发现ImagePath关键值不存在了,创建它:(存在的话,点击修改,修改方法在下文有介绍)
右键单击,弹出菜单选择新键(N)→字符串值(S)
将其命名为ImagePath
选中ImagePath点右键,选中修改:
在值中输入你的Oracle安装目录/ora90(其他版本对应的是oraxxx目录)/bin/tnslsnr
确定后退出注册表:
再在DOS命令下键入start
如果出现下面画面,恭喜你,监听器启动成功:
关闭DOS,启动你的程序进行测试,应该恢复正常了。
以上就是3中常见的引发The Network Adapter could not establish the connection 异常的原因,如果进行了以上3步仍然无法恢复正常请在论坛上发信给我~
- 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
- 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
- 2007年11月23日 - 横渡金沙江
- 二零零七年五一节自驾游记(十四)--------0502若尔盖县城
- Fedora7配置简介(加入很多更新)
- DIV形式的alert提示效果--JS源码[原]
- Managed DirectX source code uploaded.......
- Io 异常: The Network Adapter could not establish the connection
- Cygwin的使用方法
- MSDTC on server '' is unavailable.
- MSDTC on server '' is unavailable. 的解决办法
- key为自定义结构的map
- 2008年值得期待的十大IT热点
- 自动挂载.ISO镜像的简单脚本
- 易语言,你在做什么?
- 献给汉语编程的诗