无法从Oracle SQL Developer与AWS RDS Oracle数据库实例建立连接 [英] Cannot establish connection with AWS RDS Oracle database instance from Oracle SQL Developer

查看:529
本文介绍了无法从Oracle SQL Developer与AWS RDS Oracle数据库实例建立连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在AWS RDS控制台中创建了一个Oracle数据库.尽管遵循了《 Amazon Developer Guides》中的所有说明,我仍然无法从Oracle SQL Developer程序连接到它(请参阅

I created an Oracle database in the AWS RDS console. I'm unable to connect to it from the Oracle SQL Developer program despite following all the instructions in the Amazon Developer Guides (see item #3 in this webpage in particular).

我收到错误: IO错误:网络适配器无法建立连接(供应商代码17002).

我已经在防火墙设置中打开了端口1521.

我的SQL Developer连接属性窗格的屏幕快照以及AWS RDS控制台中的数据库属性:

Screenshots of my SQL Developer connection properties pane and the database properties from the AWS RDS console:

数据库被标记为可用",并且连接属性窗格包含正确的在AWS控制台中指定的DNS端点和端口

AWS安全组规则更新: 我听取了别人的建议,并确保将端口1521添加到安全组的入站和出站规则.

AWS Security Group Rules Update: I took people's suggestions and ensured that Port 1521 was added to the Security Group inbound and outbound rules.

入站规则屏幕截图 对于入站,我尝试了多种操作,例如允许为所有IP地址或仅允许我的IP地址使用端口,但是在安全组上允许它是唯一的选项,它不会给我任何帮助SQL开发人员连接错误侦听器拒绝连接,并出现以下错误:TNS:listener当前不知道连接器描述符中提供的SID.供应商代码12505".

Inbound Rules screenshot For the inbound, I tried multiple things such as allowing the port for all IP addresses or just my IP address, but allowing it on the security group is the ONLY option that doesn't give me a SQL Developer connection error of "Listener refused the connection with the following error: TNS:listener does not currently know of SID given in connector descriptor. Vendor code 12505".

我不认为我有任何规则可以在入站规则"中打开端口1521,因为默认设置会接受所有流量,我认为这将包括端口1521.

I don't believe I should have to have any rule for opening Port 1521 on the Inbound Rules because the default setting accepts all traffic, which I would think would include Port 1521.

出站规则屏幕截图 对于出站,我为IP地址添加了端口1521.

Outbound Rules screenshot For the outbound, I added Port 1521 for my IP address.

尽管进行了所有这些更改,但我仍然遇到相同的错误.

I still get the same error despite all of these changes.

任何指导将不胜感激!谢谢!

Any guidance would be appreciated! Thanks!

推荐答案

下面概述的一个或多个步骤可以解决您的问题.

One or more of the steps outlined below may solve your problem.

  1. 请确保您在SQL Developer中的SID是您的数据库名称.为避免沮丧,创建数据库时,请不要理会您设置的任何内容.通过转到配置"选项卡,然后复制数据库名称"下面的字符串,以验证正确的数据库名称,如下面的屏幕快照所示.如您所见,数据库名称是DATABASE.我以为我已将其设置为ofaoes,但我错了.至少在编写此答案时,用于创建数据库的AWS流程完全没有帮助,因为没有用于输入数据库名称的特定字段.

  1. 验证您的数据库是可公开访问的.

  1. Verify that your database is Publicly Accessible.

  1. 验证您的VPC附加了Internet网关,并且安全组的入站规则允许连接. (有关此方面的帮助,请参见下面的链接2)

  1. Verify that your VPC has an internet gateway attached to it and that the inbound rules for the security group allow connections. (See link 2 below for help on this)

打开Amazon RDS控制台.

Open the Amazon RDS console.

从导航窗格中选择数据库",然后选择数据库实例.

Choose Databases from the navigation pane, and then select the DB instance.

选择修改".

在网络和网络下安全性,选择进行公共访问.

Under Network & Security, choose Yes for Public accessibility.

选择继续.

选择修改数据库实例".

Choose Modify DB Instance.

这是该窗口的屏幕截图:

Here is a screenshot of that window:

有关更多信息,或者如果以上操作无效,请访问链接以获取更多最新信息:

For more info, or if the above doesn't work, visit the links for more current info:

  1. https://docs.aws.amazon .com/AmazonRDS/latest/UserGuide/CHAP_Troubleshooting.html#CHAP_Troubleshooting.Connecting
  2. https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Internet_Gateway.html#Add_IGW_Attach_Gateway
  3. https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html#USER_VPC.Hideing

  1. https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Troubleshooting.html#CHAP_Troubleshooting.Connecting
  2. https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Internet_Gateway.html#Add_IGW_Attach_Gateway
  3. https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html#USER_VPC.Hiding

https://aws .amazon.com/premiumsupport/knowledge-center/rds-connectivity-instance-subnet-vpc/

https://docs.aws.amazon. com/AmazonRDS/latest/UserGuide/USER_VPC.html

https://docs.aws. amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.Scenarios.html

这篇关于无法从Oracle SQL Developer与AWS RDS Oracle数据库实例建立连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆