AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
CRM
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 24.06.2017, 03:33   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
stoneridgesoftware: Top Tips for Microsoft Dynamics AX Performance Optimization: Part I – Purging data from tables
Источник: https://stoneridgesoftware.com/your-...ics-ax-system/
==============

Which Microsoft Dynamics AX system logging tables should have a data retention policy?

After working with Microsoft Dynamics AX for over 10 years, you start to see patterns in issues that arise. These patterns have become things I look for when analyzing the health of client’s Dynamics AX systems. In this ‘Top Tips for Microsoft Dynamics AX Performance Optimization’ series, I will be covering some of the items that I look for when analyzing the health of a Microsoft Dynamics AX system. Since there is a lot of information out there related to SQL Server and Dynamics AX performance I wanted to start with a couple non-SQL Server topics.  

Recommended tables for purging

The first topic is related to tables that I often recommend the customer considers purging data from. The reason is that they are what I would consider log tables of events that happened at some point in time in the system. After a certain time frame, knowing for example, that a batch job completed successfully is not necessary information for you to have. In this case, depending on how many batch jobs you have, you can accumulate a lot of information about past batch jobs.  

The topic of purging data can be tricky. However, a few tables that contain system data are low risk/low impact to purge on a regular basis.  

Low risk/low impact tables are:
  1. AIFDOCUMENTLOG & AIFMESSAGELOG – these tables contain information about AIF/Services calls that have been received by the system.  This information is great to have if a service call has any issues.  However, after time you can accumulate thousands of records and take up unnecessary disk space.
  2. BATCHJOBHISTORY & BATCHJOB & BATCHHISTORY – these tables contain information about batch jobs that have run in the system.  Every time a batch job runs information about the start time, end time, status of the batch job, and infolog messages (if there were any) are stored.  
  3. SYSDATABASELOG – this contains records for instances in which a person accessed a table in which logging has been setup.  If you setup Dynamics AX to log if someone updates a customer record then when a user accesses the custtable and updates a record there will be an entry in the sysdatabaselog table.
For these tables you should determine the answer to the following questions:
  1. Do we need to purge data from theses tables?  To answer this I typically recommend evaluating if you are using these tables. For example, you may not even be using AIF/Services or have logging turned on for it.  If that is the case then you probably don’t need to purge data from the AIFDOCUMENTLOG and AIFMESSAGELOG tables.  Another consideration would be to download the Dynamics Performance Analyzer and run the INDEXES_BY_SIZE portion of the 4-Analyze_SQL_Indexes script.  This will return the top tables in your Dynamics AX implementation by size.  If these tables don’t show up in the list, it may not be worth the effort to purge data from these tables.
  2. Can we purge data from these tables?  For some customers, due to policies of the company or auditing requirements, you may not be able to purge data from these tables.
  3. How often should you purge data from these tables?  For each table, you would need to evaluate how long you need to keep data.  For any log table, I typically suggest you keep it for at least as long in between when someone might look at the data.  For example, if you are looking at batch history or services log daily you might think I can purge it after a couple of days.  Some pointers I would give are to think about holidays and how as the result of how some holidays fall it could be up to 5 days before you would be in to look at the logs.  Also sometimes it is nice to see patterns (especially with batch jobs) of things like how long or how often something happens.  For this reason, I like to have two to three months of data if possible.
  4. What method should we use to purge data in these tables?  This can be done in a variety of ways:
    1. Through a SQL script – Some people will create a SQL script and create a SQL job that is scheduled to run on a regular basis on the SQL server.  This has a low impact on your Dynamics AX system performance as its being run directly in SQL but has a risk of not ensuring business data integrity.  It would not be recommended to use this method for other tables within Dynamics AX.
    2. Through X++ code – Some companies write X++ code that is scheduled through a batch job to run on a regular basis which will go through and clean up these tables.  Utilizing the AOS to ensure data integrity is a benefit from this method but adds overhead to the AOS and may impact performance if performed during business hours.
Since these specific tables are system tables and have been vetted as having a low impact on data integrity complications, these methods can easily be implemented for cleanup.  If you are however looking at purging other tables than the ones listed, you should utilize a tool such as Intelligent Data Management Framework (IDMF) that utilizes the AOS.

Now that you know what system tables to consider for purging you should run the INDEXES_BY_SIZE portion of the 4-Analyze_SQL_Indexes script that comes in the Dynamics Performance Analyzer to see if these tables are in your top 100 list. You can get Dynamics Performance Analyzer from the following site:  http://dynamicsperf.codeplex.com/.  If these tables are in your top 100, the next step is to start going through the questions above and determine your next steps.





Источник: https://stoneridgesoftware.com/your-...ics-ax-system/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
crminthefield: Podcast and Overview: Microsoft Dynamics CRM 2011 Update Rollup 15 Blog bot Dynamics CRM: Blogs 1 10.02.2016 10:26
NAV Team: Best Practices Tips and Tricks for Upgrading to Dynamics NAV 2013 R2 or Dynamics NAV 2015 Part 2 Blog bot Dynamics CRM: Blogs 0 17.06.2015 11:00
NAV Team: Upgrading from Microsoft Dynamics NAV 2009 R2 or Microsoft Dynamics NAV 2009 SP1 to Microsoft Dynamics NAV 2015 Blog bot Dynamics CRM: Blogs 0 23.02.2015 13:00
emeadaxsupport: New Content for Microsoft Dynamics AX 2012 : October 2011 Blog bot DAX Blogs 0 27.10.2011 17:11
german_nav_developer: Buildnummern-Übersicht Microsoft Dynamics 4.0 Service Pack 3 Blog bot Dynamics CRM: Blogs 0 04.06.2010 12:28
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 13:55.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.