SAP Basis

SAP Basis Cafe – Exploring SAP R/3 Basis World

Update Database Statistics using BRTOOLS and BRCONNECT

On this tutorial, you’ll see how to update your database statistic. Database statistic need to be update in order to accelerate database query on your program or SAP standard program. For example, you need to query data from MSEG table. If MSEG table has may rows data and never been updated its statistics then your program would be running slowly especially when MSEG table rows had been grown rapidly.

To update database statistic, you could use BRCONNECT or BRTOOLS. Actually, BRCONNECT is part of BRTOOLS. I’ll explain how to use both of them. I use my Windows box and use [sid]adm. If you use UNIX box, use ora[sid].

First, let’s try to use BRCONNECT to update MSEG table. Open your MSDOS prompt.

Type command : > brconnect -u / -c -f stats -t MSEG

Explanation :

  • - u means using user root (/)
  • - c means force without using password
  • - f means using function statistics. Another option is checks.
  • - t means which table is going to update its statistics. Another option is ALL for all tables.

Now, we are going to look at BRTOOLS to do this task. BRTOOLS are menu based program. Open your MS-DOS prompt. Type BRTOOLS.

Type 7 to choose Database Statistics. Press ENTER.

Type 1 to update database statistics. Press ENTER.

To update MSEG table choose 9 to enter MSEG table name and then press ENTER.

Type C to continue to next step, running update database statistic process.

You’ll see summary of what you are going to do. Type C to continue.

Last confirmation before running update database statistics. Type C to continue.

BRTOOLS update database statistics has been completed successfully. Type C to continue and back to update database statistic menu.

Type B to go back to BRTOOLS main menu.

Type 9 and then ENTER to exit from BRTOOLS menu.

That’s all for now. Now you know how to update your database statistic. Hope this tutorial work for you. See you on the next tutorial.

June 10, 2008 - Posted by ardhian | Database Administration, SAP | , , , , , , , , | 4 Comments

4 Comments »

  1. Thanks mas Ardhian, keren..

    Comment by Raffaell | June 20, 2008 | Reply

  2. This is good documentation,
    but only working at the host where the Database is running,

    Whats the commands to run this from the SAP application Server with an dedicated standalone ORACLE DB Server,
    where the connection should be using ssh?

    Thanks for you help
    Walter

    Comment by Walter Huber | October 19, 2009 | Reply

  3. @walter : you can use BRGUI (GUI style of BRTOOLS)

    ardhian

    Comment by ardhian | October 23, 2009 | Reply

  4. Hi ardhian,
    it’s known, that i can use BRGUI als in an centralized environmen,
    - But i have to schedule “Update Statistics” priodical,
    in my J2EE systems, like it is done in DB13 with ABAP.

    Thanks for your Assistance

    Comment by Walter Huber | October 23, 2009 | Reply


Leave a comment