-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
使用oracle数据库的在线查询报错 bind variables are not supported in DDL statements #2252
Comments
如果知道修正方式的话, 欢迎 pr |
俺也遇到了,求大佬解决一下! |
我把oracle.py中的594和673行的配置改成下面的: |
@SoHuDrgon @leon1208 @LeoQuote 我们可以使用connection.current_schema=db_name代替 cursor.execute(f' ALTER SESSION SET CURRENT_SCHEMA = "{db_name}" ') |
使用connection.current_schema=db_name代替 cursor.execute(f' ALTER SESSION SET CURRENT_SCHEMA = "{db_name}" ') 参考 https://cx-oracle.readthedocs.io/en/latest/api_manual/connection.html?highlight=CURRENT_SCHEMA#Connection.current_schema 但是仅自测 cx-oracle 7.3.0 版本
@tonyhu214 不行啊大佬,改了还是报错! |
@SoHuDrgon oracle.py 文件里面有2行该内容 |
…tabaseError-DPI-1059-1 fix hhyo#2252
@tonyhu214 对啊,我两个都改了的,但是还是不行的。 |
@tonyhu214 我使用archery 1.9.1和1.10.0两个镜像测试都是不能查询的。 |
@SoHuDrgon docker 部署的吗?docker部署的话需要重启容器生效。如果不是docker部署,或许可能是cx-Oracle包的版本问题。pip list installed 看下版本。我的是7.3.0的 |
好了,谢谢大佬! |
* fixed #2252 fix #2252 * Update oracle.py * Update oracle.py * Update oracle.py * Update sql_utils.py * Update oracle.py fix #2262 * Update oracle.py * Update oracle.py * Update sql_utils.py * Update sql_utils.py * Update sql_utils.py * Update oracle.py * Update oracle.py * Update oracle.py * Update oracle.py
Archery-1.10.0报错解决 1、django对应错误 2024-01-22 18:21:05,903 - default - WARNING - Oracle 语句执行报错,语句:SELECT table_name 2、修改Archery-1.10.0/sql/engines/oracle.py 具体行数位置 586 def explain_check(self, db_name=None, sql="", close_conn=False): 658 def query( |
good ! |
重现步骤
1.选择在线查询
2.选择一个oracle实例
3.选择任何一个schema报错
预期外的结果
cx_Oracle.DatabaseError: DPI-1059: bind variables are not supported in DDL statements
ALTER SESSION SET CURRENT_SCHEMA = 'xxxx' 属于DDL语句,不支持bind variables
日志文本
No response
版本
1.10.0
部署方式
Docker
是否还有其他可以辅助定位问题的信息?比如数据库版本等
oracle.py中的594和673行
The text was updated successfully, but these errors were encountered: