cancel
Showing results for 
Search instead for 
Did you mean: 

Rebuild index online

Former Member
0 Kudos

Dear All,

We are doing rebuild index online activity for every week in PRD at os level.(DB02.>detail analysis)

It's to much time consuming for each individual table(which found poor index quality) .

1 can u suggest any script that will save our time.so that at a time we can enter a table name and run the script.

2 can we check poor index table at os level.

Please guide.

Accepted Solutions (0)

Answers (3)

Answers (3)

ashish_vikas
Active Contributor
0 Kudos

Hello,

you can create a script based on your OS.

I assume u have Oracle database.. if yes then only :

This script should run .sql file on Oracle database

make a Index.sql file with similar content as shown :

set time on

set echo on

spool SID_ind_rebuild.log

< your SQL to rebuild index : e.g. only :

alter index sapsid."VBEP~0" rebuild online parallel 6 nologging;

alter index sapsid."VBEP~0" parallel 1;

.....

....

..

>

set time off

set echo off

spool off

Now, you should make a OS script which should run this Index.SQL file.

For example, a simple Unix script for HPUX will be like this :

#! /bin/ksh

sqlplus "/as sysdba" @Index.sql

exit

thanks

ashish

Edited by: ashish vikas on Aug 12, 2011 1:02 PM

Former Member
0 Kudos

Thanks all for ur reply.

Ashish i did the as u told .and it worked very well.

can we avoid executing the script for individual table.

How to execute in a bundle to save time.

ashish_vikas
Active Contributor
0 Kudos

No, it will execute the alter index command for all tables what you mention in your index.sql file.

However, you may have different sets of table clubbed in different Index1.sql, index2.sql files and now you have the options to run them separately at different time.

i hope u r aware of cronjob, if not chek that out, its very helpful.

thanks

ashish

Former Member
0 Kudos

Hi,

You can use transactions SE11 (or SE14) to create the missing indexes (this is not a rebuild).

Also, Br*Tools are available to Oracle databases, not for SQL Server.

if u want more details please find below link

http://help.sap.com/saphelp_nw04/helpdata/en/75/95536a63b44b4a9e7f278c7d9c2b67/content.htm

Regards,

K.ramamoorthy

Former Member
0 Kudos

Dear Friend,

You can run SAP standard Report RSANAORA report. It will be useful for u

Best Regards

k7