如何解决cx\U Oracle connect不工作:ORA03113

2024-06-01 03:08:01 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试用cx\u oracle连接到远程oracle数据库。这在过去是有效的,我可以使用oraclesqldeveloper进行连接,但是使用它会不断返回错误。这让我觉得这是一个甲骨文的问题,但任何洞察力。在

import cx_Oracle as orc 
user='usr'
pwd='pwd'
host='db.host.url'
service_name='servname'

db = orc.connect(user, pwd, '{}:1521/{}'.format(host,service_name)) #error is here

错误:

^{pr2}$

Oracle SQL Developer version: 17.3.0

Oracle Client version: 11.2.0

Oracle DB hosted on azure

Local platform: windows 10

python version: 3.7

cx_Oracle version: 7.0.0


Tags: name数据库hostdb远程version错误service