Rebuilding Indexes in SAP
1. How do we find out the indexes that are to be rebuild? You can use sapdba --> reorganization --> check extents and fragmentation. 2. Is there any tcode available in SAP to rebuild indexes or should we do it only at oracle level? You can also do it at oracle level, but using sapdba is the best option to have sync between oracle and sap. 3. What are the precautionary steps before rebuilding the indexes? a. Update statistics to latest.
I wouldn't rebuild indexes using SAP, unless you have to. It will likely lock tables, so you would need system offline. At Oracle 8.1.7 you can (usually but not always, depending upon the nature of the index) alter index <indexname> rebuild online ; zero (well, as close as you'll get... ) impact on the running system. You can also parallelise it like: alter index <indexname> rebuild online parallel 10 ; Don't think its quite the same as
a proper drop index plus create index, like sapdba does, mind you. But
most of the benefits, none of the drawbacks.
I rebuild all my SAP indices and then run stats afterwards once a month using cron'ed jobs. Because there are so many SAP indices and the outputsize is limited, I have to break up the job into 3 ranges, A-J, K-R, and R up. I use this script: rem ----------------Rebuild Script
Start---------------------------------
set serveroutput on size 1000000
begin
dbms_output.put_line('ALTER INDEX
"'||c1.owner||'"."'||c1.index_name||
end loop;
spool off -- Run the generated script
rm index_rebuild_runAJ.sql exit
Read also:
SAP Basis Reference Books:
Back to Basis Menu:
Return to :-
(c) www.gotothings.com All material on this site is Copyright.
|