page contents

Dynamics AX/SQL Maintenance Scripts


 

Attached are the Maintenance Scripts I described in my EaaS Video "Microsoft Dynamics AX and SQL Server Maintenance Plans"

 

1.   SP_STATISTICS_MAINTENANCE

2.   SP_INDEX_MAINTENANCE_ENTERPRISE

      a. Requires parameter values be set

3.   SP_INDEX_MAINTENANCE_STANDARD

      a. Requires parameter values be set

4.   SP_DBCC_CHECK_DB

      a. Requires parameter values be set

 

 

 

Database Maintenance Script.zip

Comments (12)
  1. Igor says:

    Hi Michael,
    just found the mistake in your script: sp_index_maintenance - Enterprise.sql:
    instead of
    JOIN sys.indexes i on i.object_id = f.object_id and i.index_id = f.index_depth should be
    JOIN sys.indexes i on i.object_id = f.object_id and i.index_id = f.index_id

    also it is make sense to add the condition
    and f.avg_fragmentation_in_percent > 0 to reduce the number of REBUILD operations.

    By the way, @RowThreshold parameter is not using in the script at all.

    Thank you!
    Igor.

    1. Kristin says:

      Igor ... I came looking for more information about this script because I also just noticed the @RowThreshold parameter is not being used and was worried I had a bad version of it. Thanks for the confirmation!

    2. Kristin says:

      Also, thanks for the fix on the id vs depth. The script was not doing what I expected until I made that change!

  2. Mahtab Khan says:

    Thanks Michael. This really cool. I appreciate your help.

  3. The Video is not published yet.  It will be part of Education as a Service library.  I will post a link when it becomes available shortly.

  4. maqkhan says:

    worthy share - thanks

  5. Thanks Michael, Nice Job!

  6. Hai Nguyen says:

    Would you please share your video? Where can I view it?

  7. Ryan Schlig says:

    Hey Michael, Thanks for the scripts.. Can you share the video? I missed it. See you in a couple weeks!

  8. TrilliantFood says:

    Is the video online?

  9. Tom Kim says:

    Hi Michael,

    The stats and index scripts are working great for my customer, especially the index maintenance. It has greatly reduced the maintenance time. Thanks --Tom

Comments are closed.

Skip to main content