Rebuild dos indices do Oracle Portal

Login como PORTAL

set pagesize 0
set linesize 250

spool rebuild_index1.sql
select ‘alter index ‘||INDEX_NAME||’ rebuild;’
from dba_indexes
where TABLE_NAME in (‘WWNLS_STRINGS$’,
‘WWPOB_ITEM$’,
‘WWPOB_PAGE_CUSTOMIZATION$’,
‘WWPOB_PAGE$’,
‘WWPOB_PORTLET_INST$’,
‘WWV_THINGS’,
‘WWV_DOCINFO’,
‘WWV_SEC_SYS_PRIV$’,
‘WWSEC_FLAT$’,
‘WWSBR_SITES$’,
‘WWSBR_URL$’,
‘WWDOC_DOCUMENT$’)
and OWNER = ‘PORTAL’
and INDEX_NAME not like ‘%_PK’ — exclude the primary keys indexes
and INDEX_NAME not like ‘WWSBR%CTX%’ — exclude the intermedia indexes
and INDEX_NAME not like ‘SYS_%’ — exclude the LOB indexes (check Note #159995.1 why)
;
spool off

spool rebuild_index2.sql
select ‘alter index ‘||INDEX_NAME||’ rebuild;’
from dba_indexes
where TABLE_NAME like ‘WWUTL%’
and OWNER = ‘PORTAL’
and INDEX_NAME not like ‘%_PK’ — exclude the primary keys indexes
and INDEX_NAME not like ‘SYS_%’ — exclude the LOB indexes (check Note #159995.1 why)
;
spool off

execute rebuild_index1.sql
execute rebuild_index2.sql

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *