Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get list of all materialized views in oracle

Tags:

oracle

How to get list of all Materialized Views.?

like image 552
Software Sainath Avatar asked Oct 03 '12 09:10

Software Sainath


People also ask

How can I see all views in Oracle?

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.

Where are Oracle materialized views stored?

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.

What is Oracle materialized view log?

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.

How do I check if a materialized view exists?

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).


1 Answers

Try this:

SELECT * FROM  all_snapshots; 

Instead of all_snapshots you can also use the all_mviews view.

like image 160
diederikh Avatar answered Sep 22 '22 06:09

diederikh