AX 2012 – Compile and CIL Generation errors
Someone may come across the following compilation errrors in classes while compiling the application; ClassesBIGeneratorclassDeclaration ClassesDMFBIConfigurationEntityClassclassDeclaration ClassesSysStartupCmdGenerateSsasProjectbuildProject ClassesBIAnalysisServicesProjectControllerclassDeclaration When I dig into these errors it was related to Microsoft.Dynamics.AX.Framework.Analytics.DLL that is installed with Reporting Extensions. Fix: Install the SQL 2008 R2 Analysis Managment Objects (my running version of SQL) on the same machine as the AX Client (in my scenario, the AOS server) . Then recompile!
AX 2012: Forms and Tables methods call sequence
Many a times we came across the point that where should we write code either it would be in init() of a form or in datasource init() method. And which method will be called first and where you can actually retireve record and what would be best way to accomplish few basic requirements without impacting the performance. For all above reasons I found an interesting link and thought it would be worth sharing here. http://www.slideshare.net/HamdaouiAmine/microsoft-dynamics-ax2012-forms-and-tables-methods-call-sequences-30159669#
Access denied; Copying DLL into Windows Server 2012
Installing .DLL file into GAC folder of windows is just a drag & drop procedure and it always work. However, things can be annoyed if this simple thing does not work as it happened with me and I was having the following access denied error even I was logged in with Administrator. There is another way to install .DLL file through power shell and following commands can be used to install and remove .DLL from GAC folder. You can also have a look on techNet article for more details. Add a DLL to the GAC 1. Run the Power Shell console as Administrator. 2. Enter the following PowerShell Set-location “c:Folder Path” [System.Reflection.Assembly]::Load(“System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”) $publish = New-Object System.EnterpriseServices.Internal.Publish $publish.GacInstall(“c:Folder PathDLL.dll”) iisreset Remove DLL to the GAC 1. Run the PowerShell console as Administrator. 2. Enter the following Power Shell Set-location “c:Folder Path” [System.Reflection.Assembly]::Load(“System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”) $publish = New-Object System.EnterpriseServices.Internal.Publish $publish.GacRemove(“c:Folder PathDLL.dll”) iisreset
Dynamics AX 2012 R3 is released!
Dynamics AX 2012 R3 is now released and can be downloaded from this link link https://mbs.microsoft.com/partnersource/northamerica/deployment/downloads/product-releases/MSDYAX2012R3Release
AX 2012: How to retrieve the license information through X++
Recently I came across the requirement to retrieve the licence information from the system to use it for some purpose. Here is the sample to job to get license information. static void getLicenseValue(Args _args) { str licVal; licVal = xSysConfig::find(ConfigType::SerialNo, 0).Value; info(strFmt(“%1”, licVal)); } Output:
Ludo’s Development Journal: AX 2012 Create new project tool
Ludo’s Development Journal: AX 2012 Create new project tool
Dynamics AX 2012 – Advanced Performance Optimization – Part 1
To maintain the performance of an application with large amount of data is always being a night dream for any organization. However, things can be control with pro-active steps and can easily be managed if something happen other than expectation. This blog entry is mainly focused on some of the (there can never be 100%) points which we can take into our consideration while implementing and customizing Dynamics AX 2012. Dynamics AX AOS settings Index Hints and LTRIM The best practice is to disable index hints allowing SQL Server to decide the most efficient way to process queries instead of forcing it to use a certain set of indexes pre-determined in code. All performance testing for Microsoft Dynamics AX 2012 was done with index hints disabled. If index hints are being used to address specific performance issues, it’s better to address those situations individually rather than globally enabling index hints at the AOS. It is also best practice to disable LTRIM. The use of functions such as ltrim in a where clause can significantly degrade query performance by requiring scans to be used instead of seeks. LTRIM was mostly used in Microsoft Dynamics AX 3.0 to address issues with the right-justification of data. Since data should all be left-justified in Microsoft Dynamics AX 2012 it should no longer be used. Both ‘Index Hints’ and ‘LTRIM’ are controlled by registry key ‘hint’ with the following description: Hint Registry Value Description Blank Index hints enabled, LTRIM disabled 0 Index hints and LTRIM disabled 1 Index hints enabled, LTRIM disabled 2 Index hints disabled, LTRIM enabled 3 Index hints and LTRIM enabled The value ‘0’ (Index hints and LTRIM disabled) is the recommended value. To change or check this go Start/Run and type regedit and go to “HKEY_LOCAL_MACHINESYSTEMCurrentControlSetservicesDynamicsServer6.0[AOS instance number][AOS configuration]hint” and change the value to 0. Maximum buffer size The maximum buffer size determines the maximum amount of data that the AOS can retrieve from the database per database call. A larger buffer allows more rows to be retrieved per database call. The default value is 24 KB. Note: In AX 2012 R2 this default value is now 48KB. Changes to this setting should be done carefully. Adjust this value when queries that return a large number or rows are executing slowly. Increase the maximum buffer size value in small increments. If this adjustment has worked, the number of round trips to the database, as measured in Performance Monitor by the SQL Server statistics: batchrequestsPerSecond value should decrease. Stop increasing the value when the rate of improvement starts to diminish. For more information about how to tune data access, see Tune data access settings. This setting can be changed using the Microsoft Dynamics AX Server Configuration Utility > Database Tuning tab > Settings Statement cache By default the “Statement cache” setting is on AX 2012 RTM is 256 (In AX 2012 R2 this value is 450 by default). The recommendation is to leave this value as default value. A value that is larger than default can cause memory issues on the server. If you must increase the value in this field, validate that the value is appropriate, based on your data composition and query patterns. For more information about how to tune data access, see Tune data access settings. This setting can be changed using the Microsoft Dynamics AX Server Configuration Utility > Database Tuning tab > Settings See also http://technet.microsoft.com/EN-US/library/aa569635.aspx Debug Settings In Microsoft Dynamics AX 2012 there are the following options in the Microsoft Dynamics AX Server Configuration Utility: · “Enable breakpoints to debug X++ code running on this server” (xppdebug) · “Enable global breakpoints” (globalbreakpoints) These settings enable breakpoints (pausing of code execution). There are two reasons why this is not recommended in a production environment. There is significant overhead associated with enabling this feature, so performance is degraded even when no debugging activity is taking place. The system becomes vulnerable to a user setting a breakpoint and pausing code execution. Depending on where the breakpoint is set, it might result in a SQL transaction being held open for an extended period of time. That may in turn cause blocking within the database that affects the performance of the application for other users. These settings should be disabled in Microsoft Dynamics AX production environments. To disable go to Microsoft Dynamics AX Server Configuration Utility > Application Object Server tab > Settings and disable “Enable breakpoints to debug X++ code running on this server” and “Enable global breakpoints” for each AOS server. Use of literals The default is to have both settings turned off (unless there is a clear performance analysis done which recommends having one or both settings activated). sqlcomplexliterals Use literals in complex joins from X++ Specify that Microsoft Dynamics AX use literals rather than parameters for complex joins to optimize performance. sqlformliterals Use literals in join queries from forms and reports Specify that Microsoft Dynamics AX use literals rather than parameters in long-running queries to optimize performance. These settings can only be found in the registry. For more information please read: http://technet.microsoft.com/EN-US/library/aa569637.aspx Stay Tuned for next part.
CIL generation: Duplicate type name within an assembly.
Issue Definition: I have been trying to generate a FULL CIL into our working live environment and suddenly it started giving me the following error; CIL generation: Duplicate type name within an assembly. Assessments: I did the following steps: 1- Strong recommendation, apply latest kernel build. Download link: Package: ———————————————————– KB Article Number (s) : 2957061 Language: All (Global) Platform: i386 Location: ( http://hotfixv4.microsoft.com/Microsoft%20Dynamics%20AX%202012%20R2/nosp/KB2957061/6.2.1000.7176/free/474249_intl_i386_zip.exe ) 2- To improve Compilation speed I did following changes : – For the full compile not catching all the syntax errors, please follow the X++ code workaround suggestion: Under ClassesSysCompilerOutputstartCompilation Simply delete or out comment the marked line completely. -For the CIL compiler performance: – Make sure that the “Client/Server trace” under the client options is unchecked. – Change the tier from “client” to “server” on ClassesSysCompileILdumpParallelBulkn method. – Further improvements is provided under: http://blogs.msdn.com/b/axtools/ 3- For the full CIL generation failure: Stop all AX client sessions Stop all AOS services Take a copy of XPPIL folder Take a copy of Model database Delete content of XPPIL folder Truncate SYSXPPAssembly table from SQL backend Retsart AOS Restart AX client Complete full XPP compilation Completet full CIL generation Happy Daxing!
Take pity on your SQL with Poor SQL
If you’re feeling cruel, obfuscate with your SQL quries, Poor SQL is a very nice tool to leverage your time up. http://poorsql.com/
Microsoft Dynamics AX 2012 Data Import/Export Framework new version released
http://blogs.msdn.com/b/axsa/archive/2013/11/01/microsoft-dynamics-ax-2012-data-import-export-framework-new-release.aspx