|
 |
|
ss
Oracle Tips by Burleson |
Chapter 7 Oracle Storage and Object
Internal Scripting
SPOOL
mv_log_rep
rem
COLUMN log_owner FORMAT a10 HEADING "Owner"
COLUMN master FORMAT a20 HEADING "Master"
COLUMN log_table FORMAT a20 HEADING "Materialized View"
COLUMN trigger FORMAT a20 HEADING "Trigger Text"
COLUMN current HEADING "Last Refresh"
rem
SELECT
log_owner, master, log_table table,
log_trigger trigger, rowids, filter_columns filtered,
object_id id, sequence seq,Include_new_values new
FROM
dba_mview_logs
ORDER BY 1;
rem
SPOOL OFF
CLEAR COLUMNS
SET FEEDBACK ON
TTITLE OFF
These reports provide the DBA with hard-copy
documentation of all materialized views and materialized view logs
in the database. Each can be made more restrictive by using WHERE
clauses, by selecting a specific set of values such as owner or
log_owner, type, or date since last refresh (last_refresh > &date or
current_snapshots > &date).
Conclusion
The Oracle script collection contains more than 600 working Oracle scripts. You can download them immediately at this link:
|