如何查看包含错误的 Oracle 报告执行的实际查询
与 O*Financials 中的大多数 Oracle 报表一样,查询由动态部分组成,具体取决于输入的参数。
当我运行并发请求时,日志文件包含一个模糊错误:
ORA-00933:SQL 命令未正确结束 d.acctd_amount_dr, d.amount_dr) ) C_AMOUNT , trx 。 trx_number C_TRX_NUMBER FROM ar_cash_receipt_history crh 、 ar_distributions d 、 gl_code_combinations gc 、 ar_batches b 、 ar_cash_receipts cr 、 hz_cust_accounts cust_acct 、 h
(我不知道为什么它在 trx.trx_number 之间放置空格,这是我的更改之一。 )
Like most Oracle Reports in O*Financials, the query is made up of dynamic parts depending on the parameters entered.
When I run the concurrent request the log file contains an obscure error:
ORA-00933: SQL command not properly ended
d.acctd_amount_dr, d.amount_dr) ) C_AMOUNT , trx . trx_number C_TRX_NUMBER FROM ar_cash_receipt_history crh , ar_distributions d , gl_code_combinations gc , ar_batches b , ar_cash_receipts cr , hz_cust_accounts cust_acct , h
(I don't know why it puts spaces in between the trx.trx_number which is one of my changes.)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我对 Oracle Reports 本身没有任何经验。 但是,始终可以查看哪些 sql 语句从客户端发送到 Oracle 数据库的是 sqlnet 跟踪。 有关如何配置 sqlnet 以创建跟踪文件的说明,请查阅 Oracle sql*net 文档或查看 OraFAQ。
请不要忘记在完成该 sql 语句后再次停用跟踪功能。
I have no experience with Oracle Reports itself. But what always works to see which sql statements are being sent from a client to an Oracle db, is a sqlnet trace. For instructions about how to configure sqlnet to create a trace file, please consult the Oracle sql*net documentation or take a look at the OraFAQ.
And please, don't forget to deactivate the tracing feature again after you are done with that sql statement.
多谢你们。
我复制了查询文本并连接了所有参数,例如 &LP_ORDER_BY,然后在 BEFORE_REPORT 触发器中将其与 SRW_MESSAGE 一起显示。
有点乏味,他们应该有一些可用的字段来保存查询。
Thanks guys.
I copied the query text and concatenated in all the parameters like &LP_ORDER_BY and then displayed it with an SRW_MESSAGE in the BEFORE_REPORT trigger.
Bit tedious, they should have some available field that holds the query.