-
Rebuilding Indexes PL/SQL Script
Hey Guys,
I created Script that will rebuild indexes per schema. I wanted to post for others to enjoy.
BEGIN
FOR INDEx_RECORD IN (select 'SCHEMA_NAME.'||object_name as obj
from dba_objects
where object_type = 'INDEX' and
owner ='SCHEMA_NAME'
) LOOP
execute immediate 'ALTER INDEX '||INDEx_RECORD.obj||' REBUILD';
END LOOP; -- implicit CLOSE occurs
END;
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
|