|
-
hi,
i am using below query
set timi on
SET HEADING OFF
SET FEEDBACK OFF
set PAGESIZE 3000
SPOOL C:\hafeez\scripts\index\fcatc_ind.sql
SET HEADING OFF
select "CMDLINE"
from
(
select index_name "SORT1",
'1' "SORT2",
'alter index '||owner||'.'||index_name||' rebuild online;' "CMDLINE"
from dba_indexes
where owner = 'SCOTT'
union
select index_name "SORT1",
'2' "SORT2",
'select to_char(sysdate,'||'''dd-Mon-yyyy hh24:mi:ss'''||') from dual;' "CMDLINE"
from dba_indexes
where owner = 'SCOTT'
)
order by "SORT1", "SORT2"
/
spool off
spool C:\hafeez\scripts\index\fcatc_ind.log
select '-- Rebuilding FCATC schema kindly wait......' from dual;
select to_char(sysdate, 'DD-MON-YY HH24:MI:SS') from dual;
set feedback on
@C:\hafeez\scripts\index\fcatc_ind.sql
set feedback off
select '-- Rebuilding FCATC schema completed......' from dual;
select to_char(sysdate, 'DD-MON-YY HH24:MI:SS') from dual;
spool off
exit
its give me out put like
Index altered.
Elapsed: 00:00:00.00
12-Jun-2008 18:00:05
can i have something through which i can get index name as well which is getting rebuilded
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
|