How to get list of all Materialized Views.?
ALL_VIEWS describes the views accessible to the current user. DBA_VIEWS describes all views in the database. USER_VIEWS describes the views owned by the current user. This view does not display the OWNER column.
A materialized view log is located in the master database in the same schema as the master table. A master table can have only one materialized view log defined on it. Oracle Database can use this materialized view log to perform fast refreshes for all fast-refreshable materialized views based on the master table.
In an Oracle database, a materialized view log is a table associated with the master table of a materialized view. When master table data undergoes DML changes (such as INSERT, UPDATE, or DELETE), the Oracle database stores rows describing those changes in the materialized view log.
To actually check that materialized view exists use select count(*) instead of simple select * . In case of 1 - it exists, 0 - you get the idea.. @standalone - not exactly. There may be more than one view with the same name, so rather select count (*) > 0 (returns Boolean).
Try this:
SELECT * FROM all_snapshots;
Instead of all_snapshots
you can also use the all_mviews
view.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With