analyze index validate structure script????
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: analyze index validate structure script????

  1. #1
    Join Date
    Jan 2001
    Posts
    72
    Hello
    Can anybody send me a script that I can use to analyze all my indexes
    at one time instead of doing it one index after the other? e.g
    SQL> analyze index SCOTT.ORG_PK validate structure;
    Index analyzed.

    I want to be able to analyze all the indexs at once not just one at a time.

    The same applies to the script below

    SQL> select DEL_LF_ROWS*100/decode(LF_ROWS, 0, 1, LF_ROWS) PCT_DELETED,

    (LF_ROWS-DISTINCT_KEYS)*100/ decode(LF_ROWS,0,1,LF_ROWS)
    DISTINCTIVENESS
    from index_stats
    where NAME='&index_name';

  2. #2
    Join Date
    Nov 2000
    Posts
    344
    I don't have a script to do it, but there is a GUI tool that does this called EZSQL (www.ezsql.net, free for 30 days, $100 after that).

    Under 'Tuning' there is an option called 'Index Storage'. Select the indexes you want, and click the button with an 'A' on it at the top. It will spool the results to a text file.

    -John

  3. #3
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,448
    select 'analyze index '||owner||'.'index_name||' validate structure;'
    from dba_indexes
    where owner <> 'SYS';

  4. #4
    Join Date
    Nov 2000
    Location
    Baltimore, MD USA
    Posts
    1,339
    ORG_PK!!??

    Are you working with NASD, perchance?

    - Chris

  5. #5
    Join Date
    Jun 2000
    Posts
    41
    [QUOTE][i]Originally posted by pando [/i]
    [B]select 'analyze index '||owner||'.'index_name||' validate structure;'
    from dba_indexes
    where owner <> 'SYS'; [/B][/QUOTE]

    Hi does anyone know how to add this dynamic sql code into a pl/sql? And generate a text file?


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width