oracle连接DBeaver或SQLdeveloper显示the network adapter could not establish the connnection

以下所有,要在打开监听,关闭防火墙之后进行!

查看监听状态 lsnrctl status

打开监听 lsnrctl start



以DBeaver为例,如图

1.点击左上角那个像插头一样的带着绿色加号的

oracle连接DBeaver或SQLdeveloper显示the network adapter could not establish the connnection 

2. 选择oracle数据库oracle连接DBeaver或SQLdeveloper显示the network adapter could not establish the connnection

3.配置。

主机里面的一串数字是我的数据库所在虚拟机的IP地址。

查看IP地址可以在  1)命令行内输入ip a  2)虚拟机图形化界面:设置->网络->有线连接的设置->IPv4地址即是IP地址


Database 后面要填SID的名字 如何查询参见https://www.cnblogs.com/yifenghong/articles/oracle.html

用户名一般为sys 角色改为SYSDBA或sysoper!!!如果用户名为system,角色是normal即可。

sys的权限比system大,相当于超级用户。区别详见视频:http://www.51zxw.net/show.aspx?id=59967&cid=616 

密码是你的密码 如果忘记了可以修改

修改方法:ALTER USER user_name IDENTIFIED BY "newpass";

oracle连接DBeaver或SQLdeveloper显示the network adapter could not establish the connnection

测试连接就成功啦!


在SQLdeveloper中,我是这样配置的

连接名自己随便起一个就好啦

用户名和密码和在DBeaver中一样 角色也要改成SYSDBA

jdbc:oracle:thin:@10.162.2.77:1521:dbsrv2  这一串的意思是:jdbc:oracle:thin:@+IP地址+:端口号(一般为1521):SID名

oracle连接DBeaver或SQLdeveloper显示the network adapter could not establish the connnection

或者传统一点:

oracle连接DBeaver或SQLdeveloper显示the network adapter could not establish the connnection