{"id":354,"date":"2012-09-02T21:26:14","date_gmt":"2012-09-02T20:26:14","guid":{"rendered":"http:\/\/www.darrencoupland.com\/blog\/?p=354"},"modified":"2012-09-02T21:28:19","modified_gmt":"2012-09-02T20:28:19","slug":"dynamics-ax-2009-tracing-on-application-object-servers-the-easy-way","status":"publish","type":"post","link":"https:\/\/www.darrencoupland.com\/blog\/2012\/09\/dynamics-ax-2009-tracing-on-application-object-servers-the-easy-way\/","title":{"rendered":"Dynamics AX 2009 Tracing on Application Object Servers the easy way"},"content":{"rendered":"<p dir=\"ltr\">Troubleshooting AX 2009 Performance Issues can be sometimes frustrating when you\u2019ve got a lot of users using the system and you want to trace one particular users session.<\/p>\n<p>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\u2019s and where they are the only user on the AOS. This means you can trace only their session using the \u201cMicrosoft Dynamics AX 2009 Server Configuration\u201d application along with SQL Server Profiler (In Profiler you can specify the service account to be traced).<\/p>\n<p>In order to set this up there are two different options, option 1 is the preferred option.<\/p>\n<p><strong>Option 1<\/strong>: Install a new AOS on an existing server that has the capacity or a new server &#8211; you can allocate specific CPU\u2019s for each AOS Service on your server within the \u201cMicrosoft Dynamics AX 2009 Server Configuration\u201d application, I will cover this in another article at a later date.<\/p>\n<p><strong>Option 2<\/strong>: Use an existing AOS Service<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>Option 1: New AOS Service<\/strong><\/span><\/p>\n<p>1. \u00a0Create a new Active Directory Login<\/p>\n<p>e.g. <span style=\"color: #800080;\">CONTOSO\\PerfMonAosSvc<\/span><\/p>\n<p>&nbsp;<\/p>\n<p>2. \u00a0Add user to \u2018Performance Log Users\u2019 group<\/p>\n<p style=\"text-align: left;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter  wp-image-362\" title=\"Performance Log Users Group\" src=\"http:\/\/www.darrencoupland.com\/blog\/wp-content\/uploads\/2012\/08\/PerfLogUser.jpg\" alt=\"Performance Log Users Group\" width=\"790\" height=\"227\" srcset=\"https:\/\/www.darrencoupland.com\/blog\/wp-content\/uploads\/2012\/08\/PerfLogUser.jpg 790w, https:\/\/www.darrencoupland.com\/blog\/wp-content\/uploads\/2012\/08\/PerfLogUser-300x86.jpg 300w, https:\/\/www.darrencoupland.com\/blog\/wp-content\/uploads\/2012\/08\/PerfLogUser-500x143.jpg 500w\" sizes=\"auto, (max-width: 790px) 100vw, 790px\" \/>This is required so AOS Tracing can be started via the Tracing tab found within the<br \/>\n\u201cMicrosoft Dynamics AX 2009 Server Configuration\u201d application.<\/p>\n<p>3. \u00a0Install a new AOS specifying the new Service Account login details when prompted, \u00a0 \u00a0 specify not to start service after the installation is completed, this ensures you can install Service Packs and Hotfixes on the new AOS service.<\/p>\n<p>4. \u00a0Ensure you install any Service Packs or Hotfixes to your current environments level. \u00a0During each install specify not to start service after the installation is complete and ensure you only select to update the AOS.<\/p>\n<p><em>5. \u00a0<\/em>You may need to add &#8216;<em>EXECUTE<\/em>&#8216; permissions on any additional custom Stored Procedures that you may have in your AX Database for your new account.<\/p>\n<p>6. \u00a0Start the new AOS Service and check the application event log to ensure no warnings\/errors are reported.<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>Option 2: Changing an Existing AOS Service<\/strong><\/span><\/p>\n<p>If you already have an existing AOS Service you want to configure for Performance Monitoring there are different steps to complete:<\/p>\n<p>1. \u00a0Create a new Active Directory Login<\/p>\n<p dir=\"ltr\">\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"color: #800080;\">\u00a0e.g. CONTOSO\\PerfMonAosSvc<\/span><\/p>\n<p>&nbsp;<\/p>\n<p>2. \u00a0Create a SQL Server Login<\/p>\n<pre class=\"brush: sql; gutter: true\">USE [master]\r\nCREATE LOGIN [CONTOSO\\PerfMonAosSvc]\u00a0\r\nFROM WINDOWS \r\nWITH DEFAULT_DATABASE=[MY_DAX09_DB]<\/pre>\n<p>&nbsp;<\/p>\n<p>3. \u00a0Create the Database Login<\/p>\n<pre class=\"brush: sql; gutter: true\">USE [MY_DAX09_DB]\r\nCREATE USER [CONTOSO\\PerfMonAosSvc] \r\nFOR LOGIN [CONTOSO\\PerfMonAosSvc]<\/pre>\n<p>&nbsp;<\/p>\n<p>4. \u00a0Grant Database Role Permissions<\/p>\n<pre class=\"brush: sql; gutter: true\">USE [MY_DAX09_DB]\r\nEXEC sp_addrolemember N&#039;db_ddladmin&#039;, N&#039;CONTOSO\\PerfMonAosSvc&#039;\r\nEXEC sp_addrolemember N&#039;db_datawriter&#039;, N&#039;CONTOSO\\PerfMonAosSvc&#039;\r\nEXEC sp_addrolemember N&#039;db_datareader&#039;, N&#039;CONTOSO\\PerfMonAosSvc&#039;<\/pre>\n<p>&nbsp;<\/p>\n<p>5. \u00a0Grant Stored Procedure Permissions<\/p>\n<pre class=\"brush: sql; gutter: true\">USE [MY_DAX09_DB]\r\nGRANT EXECUTE ON [dbo].[CREATESERVERSESSIONS] \r\nTO [CONTOSO\\PerfMonAosSvc]\r\nGRANT EXECUTE ON [dbo].[CREATEUSERSESSIONS] \r\nTO [CONTOSO\\PerfMonAosSvc]<\/pre>\n<p style=\"text-align: left;\"><em>Note: \u00a0You may need to add &#8216;EXECUTE&#8217; permissions on any additional custom Stored Procedures that you may have in your AX Database.<\/em><\/p>\n<p style=\"text-align: left;\">6. \u00a0Add user to \u2018Performance Log Users\u2019 group<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter  wp-image-362\" title=\"Performance Log Users Group\" src=\"http:\/\/www.darrencoupland.com\/blog\/wp-content\/uploads\/2012\/08\/PerfLogUser.jpg\" alt=\"Performance Log Users Group\" width=\"790\" height=\"227\" srcset=\"https:\/\/www.darrencoupland.com\/blog\/wp-content\/uploads\/2012\/08\/PerfLogUser.jpg 790w, https:\/\/www.darrencoupland.com\/blog\/wp-content\/uploads\/2012\/08\/PerfLogUser-300x86.jpg 300w, https:\/\/www.darrencoupland.com\/blog\/wp-content\/uploads\/2012\/08\/PerfLogUser-500x143.jpg 500w\" sizes=\"auto, (max-width: 790px) 100vw, 790px\" \/><\/p>\n<p>This is required so AOS Tracing can be started via the Tracing tab found within the \u201cMicrosoft Dynamics AX 2009 Server Configuration\u201d application.<\/p>\n<p>&nbsp;<\/p>\n<p>7. \u00a0Ensure the Service Account has <em>Modify, Read &amp; Execute, List folder contents, Read, Write<\/em> permissions on the Application Folder<\/p>\n<p>e.g. <span style=\"color: #800080;\">C:\\Program Files\\Microsoft Dynamics AX\\50\\Application<\/span><\/p>\n<p>&nbsp;<\/p>\n<p>8. \u00a0Ensure the Service Account has <em>Read, Write<\/em> permissions on the AOS Log folder<\/p>\n<p dir=\"ltr\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0e.g. <span style=\"color: #800080;\">C:\\Program Files\\Microsoft Dynamics AX\\50\\Server\\MY_NEW_AOS_02\\Log<\/span><\/p>\n<p>9. \u00a0Change the AOS service account user in Services to the newly created service account<\/p>\n<p>10. Restart the AOS Service.<\/p>\n<p>&nbsp;<\/p>\n<p>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.<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>Additional Reading:<\/strong><\/span><\/p>\n<p>A great 3 part series on AX Tracing from the \u2018Premier Field Engineering\u2019 Team<br \/>\n<a href=\"http:\/\/blogs.msdn.com\/b\/axinthefield\/archive\/2010\/12\/28\/dynamics-ax-tracing-part-1.aspx\">http:\/\/blogs.msdn.com\/b\/axinthefield\/archive\/2010\/12\/28\/dynamics-ax-tracing-part-1.aspx<\/a><br \/>\n<a href=\"http:\/\/blogs.msdn.com\/b\/axinthefield\/archive\/2011\/03\/25\/dynamics-ax-tracing-part-2.aspx\">http:\/\/blogs.msdn.com\/b\/axinthefield\/archive\/2011\/03\/25\/dynamics-ax-tracing-part-2.aspx<\/a><br \/>\n<a href=\"http:\/\/blogs.msdn.com\/b\/axinthefield\/archive\/2011\/06\/25\/dynamics-ax-tracing-part-3.aspx\">http:\/\/blogs.msdn.com\/b\/axinthefield\/archive\/2011\/06\/25\/dynamics-ax-tracing-part-3.aspx<\/a><\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>Troubleshooting AX 2009 Performance Issues can be sometimes frustrating when you\u2019ve got a lot of users using the system and you want to trace one particular users session.<\/p>\n<p>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\u2019s and where they are the only user on the AOS.  This post shows you how to configure a &#8216;performance monitoring only AOS&#8217;<!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[3],"tags":[36,8,59,22],"class_list":["post-354","post","type-post","status-publish","format-standard","hentry","category-dynamics-ax-2009","tag-aos-tracing","tag-ax2009","tag-dynamics-ax-2009","tag-performance"],"_links":{"self":[{"href":"https:\/\/www.darrencoupland.com\/blog\/wp-json\/wp\/v2\/posts\/354","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.darrencoupland.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.darrencoupland.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.darrencoupland.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.darrencoupland.com\/blog\/wp-json\/wp\/v2\/comments?post=354"}],"version-history":[{"count":3,"href":"https:\/\/www.darrencoupland.com\/blog\/wp-json\/wp\/v2\/posts\/354\/revisions"}],"predecessor-version":[{"id":665,"href":"https:\/\/www.darrencoupland.com\/blog\/wp-json\/wp\/v2\/posts\/354\/revisions\/665"}],"wp:attachment":[{"href":"https:\/\/www.darrencoupland.com\/blog\/wp-json\/wp\/v2\/media?parent=354"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.darrencoupland.com\/blog\/wp-json\/wp\/v2\/categories?post=354"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.darrencoupland.com\/blog\/wp-json\/wp\/v2\/tags?post=354"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}