Skip to Content
avatar image
Former Member

Rebuild index online

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Aug 12, 2011 at 04:52 AM

    Dear Friend,

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

    Best Regards

    k7

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 12, 2011 at 06:10 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 12, 2011 at 10:57 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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.

      cron job : how to run scripts as cron job

      thanks

      ashish