DatabaseError: ORA-12506: TNS监听程序基于服务ACL过滤拒绝连接。

huangapple go评论74阅读模式
英文:

DatabaseError: ORA-12506: TNS:listener rejected connection based on service ACL filtering

问题

无法连接到托管在Oracle Cloud上的数据库:使用Python连接自主数据仓库(Warehousing)。

from sqlalchemy import create_engine
user = 'admin'
password = '****'
tns = <来自tnsnames.ora文件的字符串>

engine = create_engine('oracle+cx_oracle://{0}:{1}@{2}'.format(user, password, tns))
con = engine.connect()

需要使用Python访问Oracle数据库的表格和数据。

英文:

not able to connect to the DB hosted on oracle cloud: Autonomous Data Base (Warehousing) from python

from sqlalchemy import create_engine
user = &#39;admin&#39;
password = &#39;****&#39;
tns = &lt;string from the tnsnames.ora file&gt;

engine = create_engine(&#39;oracle+cx_oracle://{0}:{1}@{2}&#39;.format(user, password, tns))
con = engine.connect()

need to access the tables and data form the oracle database using python.

答案1

得分: 1

你需要使用“添加我的地址”选项将您的IP地址添加到Oracle Cloud的ACL列表中。

英文:

You need to add your IP address to the ACL list using "Add My Address" in the ACL options in oracle cloud.

enter image description here

huangapple
  • 本文由 发表于 2023年3月20日 22:45:59
  • 转载请务必保留本文链接:https://go.coder-hub.com/75791751.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定