Troubleshooting AX 2009 Performance Issues can be sometimes frustrating when you’ve got a lot of users using the system and you want to trace one particular users session.
One way that can ease this is to log the user onto an AOS where the service account it runs under is different to your other AOS’s and where they are the only user on the AOS. This means you can trace only their session using the “Microsoft Dynamics AX 2009 Server Configuration” application along with SQL Server Profiler (In Profiler you can specify the service account to be traced).
In order to set this up there are two different options, option 1 is the preferred option.
Option 1: Install a new AOS on an existing server that has the capacity or a new server – you can allocate specific CPU’s for each AOS Service on your server within the “Microsoft Dynamics AX 2009 Server Configuration” application, I will cover this in another article at a later date.
Option 2: Use an existing AOS Service
Option 1: New AOS Service
1. Create a new Active Directory Login
2. Add user to ‘Performance Log Users’ group
This is required so AOS Tracing can be started via the Tracing tab found within the
“Microsoft Dynamics AX 2009 Server Configuration” application.
3. Install a new AOS specifying the new Service Account login details when prompted, specify not to start service after the installation is completed, this ensures you can install Service Packs and Hotfixes on the new AOS service.
4. Ensure you install any Service Packs or Hotfixes to your current environments level. During each install specify not to start service after the installation is complete and ensure you only select to update the AOS.
5. You may need to add ‘EXECUTE‘ permissions on any additional custom Stored Procedures that you may have in your AX Database for your new account.
6. Start the new AOS Service and check the application event log to ensure no warnings/errors are reported.
Option 2: Changing an Existing AOS Service
If you already have an existing AOS Service you want to configure for Performance Monitoring there are different steps to complete:
1. Create a new Active Directory Login
2. Create a SQL Server Login
USE [master] CREATE LOGIN [CONTOSO\PerfMonAosSvc] FROM WINDOWS WITH DEFAULT_DATABASE=[MY_DAX09_DB]
3. Create the Database Login
USE [MY_DAX09_DB] CREATE USER [CONTOSO\PerfMonAosSvc] FOR LOGIN [CONTOSO\PerfMonAosSvc]
4. Grant Database Role Permissions
USE [MY_DAX09_DB] EXEC sp_addrolemember N'db_ddladmin', N'CONTOSO\PerfMonAosSvc' EXEC sp_addrolemember N'db_datawriter', N'CONTOSO\PerfMonAosSvc' EXEC sp_addrolemember N'db_datareader', N'CONTOSO\PerfMonAosSvc'
5. Grant Stored Procedure Permissions
USE [MY_DAX09_DB] GRANT EXECUTE ON [dbo].[CREATESERVERSESSIONS] TO [CONTOSO\PerfMonAosSvc] GRANT EXECUTE ON [dbo].[CREATEUSERSESSIONS] TO [CONTOSO\PerfMonAosSvc]
Note: You may need to add ‘EXECUTE’ permissions on any additional custom Stored Procedures that you may have in your AX Database.
6. Add user to ‘Performance Log Users’ group
This is required so AOS Tracing can be started via the Tracing tab found within the “Microsoft Dynamics AX 2009 Server Configuration” application.
7. Ensure the Service Account has Modify, Read & Execute, List folder contents, Read, Write permissions on the Application Folder
e.g. C:\Program Files\Microsoft Dynamics AX\50\Application
8. Ensure the Service Account has Read, Write permissions on the AOS Log folder
e.g. C:\Program Files\Microsoft Dynamics AX\50\Server\MY_NEW_AOS_02\Log
9. Change the AOS service account user in Services to the newly created service account
10. Restart the AOS Service.
Please as always try this setup in your Test / Dev environment prior to implementing it in your Production environment to ensure you understand the setup required and that it fits your requirements.
A great 3 part series on AX Tracing from the ‘Premier Field Engineering’ Team