Skip to Content
avatar image
Former Member

Autostats diabled in SQL server 2008

Dear Gurus,

Our SAP version is ECC 6.0 EHP5, DB is SQL server 2008 and OS Windows 2008 R2

We have EWA generated for PRD system and it says -

Set the AUTOMATIC UPDATE STATISTICS option to "OFF"  for tables VBHDR, VBMOD, and VBDATA

Execute below commands in QUERY ANALYZER

EXEC sp_autostats VBHDR  

EXEC sp_autostats VBDATA  

EXEC sp_autostats VBMOD

I have few questions regarding this :

1. I opened Query analyser but have no idea where to paste this command and how to execute it ?

2. Can this be done while DB is UP ?

Please help as I havent worked much in SQL before and this is regarding PRD system.

Thanks,

Shobhit

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Aug 25, 2012 at 09:05 PM

    Hello Shobhit,

    Please, check https://websmp130.sap-ag.de/sap/support/notes/1649078

    "As of Microsoft SQL Server 2005 you do not need to run single commands anymore to adjust the autostats settings. Instead SAP provides the script sap_z_set_parameters which will set all required autostats options. This is also mentioned in SAP Note 879941 and SAP Note 1237682. To adjust the settings in your database please run the script. Depending on your SAP Basis release and support package you can run the script with:

    1. Transaction ST04 / DBACockpit
    2. Configuration
    3. SQL Script Execution
    4. Execute SQL Script
    5. Enter select sap_z_set_parameters
    6. Click Execute

    or with:

    1. Transaction SA38
    2. Execute report MSSPROCS
    3. Select your DB release
    4. Lookup script sap_z_set_parameters in the list
    5. Rightclick and select Execute script

    "

    Cheers,

    Diego.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      In SQL Server 2008 you have a new tool: SQL Server Management Studio.

      You can create the new query there and execute it. just copy&paste the sentences separated by ";"

      Anyway, is advisable to execute via ST04/SA38.

      Cheers,

      Diego.

  • avatar image
    Former Member
    Aug 23, 2013 at 04:08 PM

    Hello Shobith,

    I've already made this fixed on the same problem as well with 2008 R2.

    Just copy the following

    Go to ST04 -----» Diagnostics ----------» SQL Command Editor

    EXEC sp_autostats 'sid.VBHDR' 'OFF' 

    EXEC sp_autostats 'sid.VBDATA' 'OFF'  

    EXEC sp_autostats 'sid.VBMOD' 'OFF'

    Execute

    Regards,

    Juan

    Add comment
    10|10000 characters needed characters exceeded