数据库错误:ORA-12506:TNS:侦听器基于服务 ACL 过滤拒绝连接

问题描述 投票:0回答:1

无法连接到 Oracle 云上托管的数据库:来自 python 的自治数据库(仓储)

from sqlalchemy import create_engine
user = 'admin'
password = '****'
tns = <string from the tnsnames.ora file>

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

需要使用python访问oracle数据库中的表和数据。

python oracle sqlalchemy database-connection oracle-autonomous-db
1个回答
0
投票

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

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.