This is included here as the task should be considered as part of the general performance-related tasks. You need to optimize the model store as changes are made to the model store (install a model, import model store, or apply a hotfix).This routine performs a set of database optimization tasks on the Model store database (including re-index and database shrink). These could (and should), therefore, be automated as part of your SQL maintenance plan.
For releases prior to R2, the model store was included in the main database. You should, therefore, not run this task prior to R2 on large databases.
To optimize the model store, you should prepare by carrying out the following steps:
Securityadmin
or a higher-privileged userdb_owner
_model
)In this example, the following information is used:
SQL Server |
|
Database name |
|
The following steps are performed within Microsoft Dynamics AX 2012 Management Shell, which is the PowerShell with preloaded AX PowerShell commands:
Management shell
, and click on the result, Microsoft AX 2012 Management ShellOptimize-AXModelStore –server Zeus –database MicrosoftDynamicsAXR2_model
Reorganizing ModelStore. You can continue with other tasks.
This will take some time to complete.
The optimize command issues re-index and DBCC Shrink Database commands to SQL Server for the model store database (ends with _Model
). This will improve the general AX performance and responsiveness.
3.19.59.0