4

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:

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?

I can determine this for MLOG$_T1:

select MASTER, LOG_TABLE from USER_MVIEW_LOGS

|T1       |MLOG$_T1 |

But where to find a reference to the table RUPD$_T1?

turbanoff
  • 2,439
  • 6
  • 42
  • 99

2 Answers2

6

its in the SYS base table. i.e.

SQL> select  master, log, temp_log from sys.mlog$ where mowner = user and master = 'T1';

MASTER               LOG                  TEMP_LOG
-------------------- -------------------- --------------------
T1                   MLOG$_T1             RUPD$_T1
DazzaL
  • 21,638
  • 3
  • 49
  • 57
  • impossible without the use of internal tables? – turbanoff Jan 22 '13 at 16:03
  • @turbanoff its not exposed in the DBA/ALL/USER views. its in a few views like `sys.EXU10SNAPL` `sys.EXU9SNAPL` `sys.KU$_M_VIEW_LOG_VIEW` and the base table `sys.mlog$` only (`select owner, name from dba_dependencies where referenced_name = 'MLOG$' and type = 'VIEW';` will show you all the views that reference the base table, but not all have that column exposed). – DazzaL Jan 22 '13 at 16:15
0

Try:

 select * from all_mview_logs
4b0
  • 21,981
  • 30
  • 95
  • 142