确定 Oracle 数据库对象何时失效
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1467604/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Determining when an Oracle database object became invalid
提问by Adam Paynter
Is it possible to determine whenan object within an Oracle database became invalid?
是否可以确定Oracle 数据库中的对象何时失效?
I have tried looking at the DBA_OBJECTS
view, but none of its date stamp columns seem to be affected when the STATUS
changes to 'INVALID'
.
我曾尝试查看该DBA_OBJECTS
视图,但是当STATUS
更改为'INVALID'
.
采纳答案by Rob
Something has to happen to make an object invalid. Usually it's a modification to a referenced object. Turn on database auditing on DDL and you should be able to catch changes to objects that cause other objects to become invalid.
必须发生某些事情才能使对象无效。通常它是对引用对象的修改。在 DDL 上打开数据库审计,您应该能够捕获导致其他对象无效的对象更改。
回答by dpbradley
No. You might be able to estimate this by looking at the timestamps of the related dependent objects (in DBA_DEPENDENCIES) - if the object was invalidated because of dropping another object then you could check the drop time of the parent in the recycle bin. Again, this is detective work and not as straightforward as having the information presented in a view.
不。您可以通过查看相关依赖对象的时间戳(在 DBA_DEPENDENCIES 中)来估计这一点 - 如果该对象因丢弃另一个对象而无效,那么您可以检查父对象在回收站中的丢弃时间。同样,这是侦探工作,不像在视图中显示信息那么简单。
回答by Chad
OEM Reports
If you have OEM configured, you can look at your daily objects reports. This is a manual solution, not sure if the data in these reports is queriable or LOB data.
OEM 报告
如果您配置了 OEM,您可以查看每日对象报告。这是一个手动的解决方案,不确定这些报告中的数据是可查询的还是LOB数据。