ORA-00942:表或视图不存在:如何找到它正在讨论的表或视图 [英] ORA-00942: table or view does not exist : How do I find which table or view it is talking about

查看:552
本文介绍了ORA-00942:表或视图不存在:如何找到它正在讨论的表或视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在TESTING中运行针对ORACLE 10g的java / hibernate应用程序。偶尔,我们看到这个错误:


ORA-00942:表或视图不存在


有没有办法找出ORACLE正在讨论哪个表/视图?



我知道我可以在hibernate中添加额外的日志级别,这将显示它在ORACLE上执行的所有SQL,然后运行该SQL来确定哪个TABLE / VIEW丢失或缺少权限。但鉴于它处于TESTING / STAGING阶段,这会降低性能。



是否有简单的方法来缩小表格/视图名称?



UPDATE:



您知道,我无法控制Oracle数据库服务器环境。

我启用了Hibernate跟踪/日志记录,并找到了VALID SQL。我甚至把Wireshark(这是一个TCP数据包过滤器)看看hibernate究竟发送了什么,这是一个有效的SQL。那么,为什么Oracle会偶尔抱怨它,而不总是这样。

解决方案

查看DBA_AUDIT_EXISTS表,当为Oracle启用审计。我相信Oracle可以提供非常详细的审计,您可以通过DB命令简单地打开和关闭,但我不记得它们是什么在我头顶。



请参阅:
http:// docs .oracle.com / cd / B19306_01 / network.102 / b14266 / cfgaudit.htm b

对于某些想法(我只是很快搜索到的) p>

We're running a java/hibernate app going against ORACLE 10g in TESTING. Once in a while, we're seeing this error:

ORA-00942: table or view does not exist

Is there a way to find out which table/view(s) ORACLE is talking about ?

I know that I can add extra levels of logging in hibernate which will show all the SQL that it executes on ORACLE and then run that SQL to figure out which TABLE/VIEW is missing or missing permission. But given that it is in TESTING/STAGING, that will slow down performance.

Is there a simple way to narrow down on the Table/View Name ?

UPDATE :

Just so you know, I don't have control over the Oracle DB Server Environment.
I enabled Hibernate tracing/logging and found a VALID SQL. I even put Wireshark(which is a TCP packet filter) to see what hibernate actually sends and that was a valid SQL. So, why would Oracle complain about it once in a while and NOT always.

解决方案

Take a look into the DBA_AUDIT_EXISTS table, when auditing is turned on for Oracle. I believe that Oracle can provide very detailed auditing which you can simply toggle on and off when you like via DB commands, although I dont remember what they are off the top of my head.

See: http://docs.oracle.com/cd/B19306_01/network.102/b14266/cfgaudit.htm

for some idea (which I just quickly googled for)

这篇关于ORA-00942:表或视图不存在:如何找到它正在讨论的表或视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆