Tuesday 7 December 2010

Switching Trace Parser between AX4, AX2009, & AX2012

When Trace Parser is started up, it will login to AX through business connector. If you have different version of AX, it won't prompt to ask about which version of AX it should use. If you need to switch between the version the Trace Parser logon to, you'll need to edit the Trace Parser config file.

Open the file 'Microsoft.Dynamics.AX.Tracing.TraceParser.exe.config' (under the Trace Parser installation path) and edit the line: <bindingRedirect oldVersion="5.0.0.0" newVersion="5.0.0.0"/>

Set the 'newVersion="5.0.0.0"' to the version you want.

Eg.
To logon to AX4: <bindingRedirect oldVersion="5.0.0.0" newVersion="4.0.0.0"/>
To logon to AX2009: <bindingRedirect oldVersion="5.0.0.0" newVersion="5.0.0.0"/>

If that doesn't works, it might be due to the 32/64bit issue.

Below is the excerpt from the an email I received.

=============================

Verify that both 4 and 5 BC.Net are in the GAC by opening up c:\windows\assembly from the start menu. If so, then the following should work:

<bindingRedirect oldVersion="5.0.0.0" newVersion="4.0.0.0" />

If that still doesn’t work, it may be an issue with 32/64 bit. BC.Net has both x86 and x64 for AX2009 but only x86 for AX4. If you have Visual Studio, you could open a visual studio command prompt and run

corflags /32BIT+ Microsoft.Dynamics.AX.Tracing.TraceParser.exe

Combined with the bindingRedirect, this should solve the problem.

=============================

*UPDATE: To connect to AX2012, just do the similar changes to the config file to version 6.0.0.0.

Monday 6 December 2010

Event ID 117: Changed language setting to us_english.. The SQL statement was: "UPDATE SYSLASTVALUE SET VALUE ...

Below are two of the common errors seen in AX and the explanation of them from Microsoft support.

=========================
Event ID: 117
Description:
Object Server 01: The database reported (session 1 (-AOS-)): [Microsoft][ODBC SQL Server Driver][SQL Server]Changed language setting to us_english.. The SQL statement was: "UPDATE SYSLASTVALUE SET VALUE=?,RECVERSION=? WHERE (((((((USERID=?) AND (RECORDTYPE=?)) AND (ELEMENTNAME=?)) AND (DESIGNNAME=?)) AND (ISKERNEL=?)) AND (COMPANY=?)) AND (RECVERSION=?))"


Event ID: 110
Description:
Object Server 01: Dialog issued for client-less session 1: Cannot edit a record in LastValue (SysLastValue). User ID: , AdminUserSetup.
The SQL database has issued an error.
=========================

 
These messages do not appear constantly, but actually sporadically, and always in pairs, of 110 and 117.

From my research the cause of this is that an update conflict occurs when updating a table with a blob type field, like SysLastValue table. The kernel uses ODBC function SQLParamData to put data into a blob field, in case of an update conflict SQLParamData returns SQL_NO_DATA. The AX kernel misinte rprets this return value, thinking that SQL server has raised an error, and so raises the two messages in the event log - message 110 indicates the update failed, message 117 is the last message raised from SQL server, which is actually just a standard information message that is normally not shown , as there is no actual error from SQL, it is only misinterpretation from AX kernel.