Hi!
Mi name is Juan.Please, I need a script for rebuild all materialized views.
Sorry for my English.
Thanks.
Juan.
Printable View
Hi!
Mi name is Juan.Please, I need a script for rebuild all materialized views.
Sorry for my English.
Thanks.
Juan.
Try this
select 'create snapshot "&1"."'||a.name||'" tablespace '||b.tablespace_name||
' storage(initial '||b.INITIAL_EXTENT||
' maxextents '||b.MAX_EXTENTS||
' )using index tablespace '||c.tablespace_name||
' storage(initial '||c.INITIAL_EXTENT||
' maxextents '||c.MAX_EXTENTS||
' )refresh fast with primary key as '
from user_snapshots a, user_tables b, user_indexes c
where a.name = b.table_name
and c.index_name = ( select d.constraint_name from user_constraints d where
d.table_name = a.table_name and d.constraint_type = 'P')
order by a.name;
you can edit this according to ur needs
HTH
Amar
Thanks, for your Help.
Juan
I doubt very much if that works for all MVs
what version of oracle? if 9i look at dbms_metadata.get_ddl
steve
Hey Pando that's why i said edit it according to ur needs :DQuote:
Originally posted by pando
I doubt very much if that works for all MVs
yea well he has to get all the where conditions, the query etc etc
Atleast it helped him, i hope so :pQuote:
Originally posted by jvelizca
Thanks, for your Help.
Juan