-
script to rebuild all materialized views
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
Last edited by adewri; 01-08-2003 at 12:12 PM.
Amar
"There is a difference between knowing the path and walking the path."
-
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
I'm stmontgo and I approve of this message
-
-
yea well he has to get all the where conditions, the query etc etc
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|