oracle 如何判断一个表是否用于存储物化视图日志?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14457791/
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
How to determine whether a table is used to store materialized view logs?
提问by turbanoff
I have table with created on it materialized view log:
我在其上创建了物化视图日志:
create table T1(A number primary key);
create materialized view log on T1 with primary key;
Oracle additionally creates two tables for materialized view logs:
Oracle 还为物化视图日志创建了两个表:
select TABLE_NAME from USER_TABLES
|T1 |
|MLOG$_T1 |
|RUPD$_T1 |
How to determine that RUPD$_T1
table is a table with the mview logs for T1
?
如何确定该RUPD$_T1
表是带有 mview 日志的表T1
?
I can determine this for MLOG$_T1
:
我可以确定MLOG$_T1
:
select MASTER, LOG_TABLE from USER_MVIEW_LOGS
|T1 |MLOG$_T1 |
But where to find a reference to the table RUPD$_T1
?
但是在哪里可以找到对表的引用RUPD$_T1
?
回答by DazzaL
its in the SYS base table. i.e.
它在 SYS 基表中。IE
SQL> select master, log, temp_log from sys.mlog$ where mowner = user and master = 'T1';
MASTER LOG TEMP_LOG
-------------------- -------------------- --------------------
T1 MLOG$_T1 RUPD$_T1
回答by user11732454
Try:
尝试:
select * from all_mview_logs