【发布时间】:2019-04-05 09:40:01
【问题描述】:
我可以访问一个连接到商店的 oracle11g 服务器,并且有一个软件可以在 softare 中获取报告,但该软件是封闭源代码的。 因为我在数据库中有一个用户名,我可以从软件访问所有报告,但我想自动化一些工作并想编写一个 python3 脚本来做到这一点。我只需要知道 DB 中的表名。我想要一个在 oracle 中返回表名的代码。 我可以从“PLSQL Developer”和我未完成的 python 代码访问数据库。
import cx_Oracle
con = cx_Oracle.connect('username/password@serveraddress/dbname')
print (con.version)
cur =con.cursor()
cur.execute(" SOME ORACLE CODE")
#cur.execute('select * from tablesname orderby id' )
for i in cur:
print (i)
con.close()
那么什么是可以执行并将表名返回给我的代码?
ps:我什至使用wireshark 找出程序发送到服务器的代码是什么,但数据包中没有表名。 :(
p.s 2:欢迎任何有创意和不寻常的答案。
【问题讨论】:
标签: oracle dictionary catalog