Tuesday, May 28, 2013

Check which tables have supplemental log groups


Tables that have supplemental logs:

SELECT
    OWNER,
    LOG_GROUP_NAME,
    TABLE_NAME,
    DECODE(ALWAYS,
             'ALWAYS', 'Unconditional',
             'CONDITIONAL', 'Conditional') ALWAYS,
   LOG_GROUP_TYPE
  FROM DBA_LOG_GROUPS;


OR tables by schema, that do not have supplemental log groups:


 Tables by schema that do not have supplemental log groups:
 
select owner, table_name from dba_tables
where owner = 'SCHEMA_NAME' and table_name not in
(SELECT
    TABLE_NAME FROM DBA_LOG_GROUPS)
order by table_name;

No comments: