[数据库实验]使用sqldeveloper连接虚拟机oracle数据库问题与解决方案汇总

目录

一、状态: 失败 -测试失败: IO 错误: The Network Adapter could not establish the connection

端口号错误:

ip输入错误

虚拟机防火墙设置问题:

 二、状态: 失败 -测试失败: Listener refused the connection with the following error:ORA-12505, TNS:listener does not currently know of SID given in connect descriptor 


一、状态: 失败 -测试失败: IO 错误: The Network Adapter could not establish the connection

状态: 失败 -测试失败: IO 错误: The Network Adapter could not establish the connection

不同错误对应解决方案:

端口号错误:

一般为1521

ip输入错误

NAT模式下,在虚拟机控制台中输入ifconfig,获取虚拟机ip。

同时使用虚拟机与主机互相ping测试连通性。

若联通,在主机名一栏输入虚拟机ip,问题解决。

虚拟机防火墙设置问题:

使用root账户输入下方代码关闭防火墙

service iptables stop

 二、状态: 失败 -测试失败: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
 

状态: 失败 -测试失败: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
 

一般由于sid填写错误。

获取sid过程如下:

在虚拟机控制台中输入

sqlplus

注意使用sys账户登录需要在输入用户名时输入 sys as sysdba

 登录后输入下方指令:

select instance_name from V$instance;

在下方涂红色位置为sid

 最后在连接时填写sid即可

猜你喜欢

转载自blog.csdn.net/m0_56738500/article/details/127160939