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.

Tuesday, 23 November 2010

Basic TableGroup and CacheLookup rules

Below are some of the basic rules for setting Dynamics AX TableGroup and CacheLookup property.


Table Type  Usage  Table Group to Use 
Transactional  If updating Financials  Transaction 
Transactional  If not updating Financials and is used as a Header  WorksheetHdr 
Transactional  If not updating Financials and is used as a line related to a header  WorksheetLine 
Master Data  Parameter Table  Parameter 
Master Data  Core Master Data Like Customers  Main 
Master Data  Grouping of Master data into Categories  Group 


Based on this table group, caching needs to be set based on:

Table Group  Cache Type 
Transaction, WorkSheetHdr, WorkSheetLine  NotinTTS 
Parameter  EntireTable 
Main, Group  Found 
Group (if very small and below 128K)  EntireTable 

Once the Cache Lookup is set, analysis needs to be done to set the right primary key for most efficient use of caching.

Although these are the basic rules, but occasionally there're situation where they needs to be set differently.

Tuesday, 21 September 2010

Basic algorithm for the "Auto update statistics"

This is an excerpt from one of the support call I read recently, thought it would be beneficial to share it.

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

Basically the SQL database engine will not update statistics every time a record is change, added or deleted. There is a change threshold for each table, and this is what effect the statistics update. So if you have a customer with large tansaction volumes, you could find that this update process is not triggered frequently enough.

The following describes the basic algorithm for the "auto update statistics" process:
  1. If the cardinality (in most cases this means row count) for a table is less than six and the table is in the tempdb database, auto update with every six modifications to the table.
  2. If the cardinality for a table is greater than 6, but less than or equal to 500, update status every 500 modifications.
  3. If the cardinality for a table is greater than 500, update statistics when (500 + 20 percent of the table) changes have occurred.
  4. For table variables, cardinality changes does not trigger auto update statistics.

Therefore you may find that large tables are only statistically updates when the row count increases by 20%. But this does not really take into account updates, and this does not change the row count. Therefore you may find that if you make lots of updates, the data statistics on the are not in tune with this updated data. So in this case, updating the statistics manually from a scripts would help the query optimiser when the process is run.

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

Thursday, 16 September 2010

(Dynamics AX) Failed to establish connection at Terminal Server

The "Failed to establish connection" in Dynamics AX is a common error seen and these are the common reasons:
  1. AOS is down
  2. AX configuration is incorrect
  3. Firewall blocked the port used
  4. Connection issue between client and AOS
  5. User account is locked

But occasionally, my colleagues encountered this error at the Terminal Server (where all of us logon to), while there's no changes to anything (AX configuration, security, network, and etc), his/her AX suddenly doesn't works, can't connect to the AOS. Restart AOS or logon logoff from Terminal Server doesn't helps. Checked the 5 possible causes listed above, none of them is the cause.

I investigate further, AOS is running, port is not blocked, I logged on to the Terminal Server and start up AX client (all works fine, able to start up and forms opened OK). I asked a few other colleague to logon to the same Terminal Server and start up AX, all of them doesn't have the problem. So, what happens that only 2 of my colleagues unable to logon (Failed to establish connection)? The weird thing is the next day it's working fine for them, but on and off, it happens again (and to other users). Until today, I still doesn't know what could have cause this, but based on a random suspect, I do found the way to solve this - refresh group policy.

I was thinking, since it only happens to particular users, could it be profile or security changes? I then tried refresh the group policy, hooray, it works.

Here's what I do:
  1. Open command prompt (Start > Run > cmd)
  2. Type in "gpupdate /Force" and press "Enter"
    (it will refresh the group policy and prompt whether OK to logoff)
  3. Press "Y" and logged-off
  4. Login again and it is now working fine

If you know what could have cause this and why, do leave a message here, others could benefit from it.

Thursday, 9 September 2010

Change password from Terminal Server session


If you're looking around the way to change password from within Terminal Server session due to pressing Ctrl + Alt + Del is applied to your host machine rather than Terminal Server, you just need to change the last "Del" to "End".

Instead of pressing "Ctrl + Alt + Del", you press "Ctrl + Alt + End", you'll get the window where you see the button for Lock, Logoff, Shutdown, Change password, Task Manager and Cancel at your Terminal Server session. Now you can click on the "Change password" button to change your password.

Wednesday, 21 July 2010

Renew Malaysian passport in UK (London)

[Update, 12/04/2017]
This article is 7 years old and there has been some change since then.
Eg. The new address is 52 Bedford Row, London WC1R 4LR. Hardcopy photo is not required, will capture it on the spot, etc. Please read visitors comments below the article to get some insight of the recent change and their experience.

------------------------------------------------------
Below is the original article dated 21/07/2010
------------------------------------------------------

Just to share some info regarding how to renew Malaysian passport at UK.
I'll make it short and simple based on my own experience.
  1. Take any transportation method to 45 Belgrave Square, London, SW1X 8QT
  2. Walk down to basement
    - Photoshop is on the left, go straight
      (if you doesn't have blue background passport photo, you may take it here, it cost £5)
    - Reception & waiting room is on the right
  3. Walk in and go straight to the reception and sign the guest book. You'll then be called and given a ticket number (you'll need to show him your passport, IC, & photos as well).
    [I guess the purpose of showing them is to verify you have the required documents]
  4. Wait till your number is displayed on the notification board, walk out the waiting room, turn right (has to open the door)
  5. Walk straight to the end, the counter is over there to process your passport renewal application
  6. You’ll need pass these to the staff:
    - Passport
    - Original IC
    - Photostat IC (1x)
    - Passport photo (2x)
  7. Sit and wait
  8. You'll be called again to scan the thumb print for both hand (digital scanning)
    (You're required to put on the ink and thumb print on the application form as well)
  9. Pay the fees (cost £50 for 32 pages)
  10. You'll be given the receipt with time to come back to collect the passport
    ...
    ...
    (processing)
    ...
    ...
  11. Return to the Malaysian High Commission office at the time slot indicated in the receipt and go straight to the counter (not the waiting room) [usually 3.00pm - 4.00pm]
  12. Pass the blue receipt to the staff and wait to be called
  13. Called and collect passport
Done.


Common questions & answers:
  • Can I carry bag(s) or mobile phone into Malaysian High Commission office?
    Yes, you're allowed to carry bag(s) into the waiting room.
    (I've called Malaysian High Commission to check prior to the visit)

  • If passport expire earlier than visa, do I need to transfer the visa to the new passport?
    No, you doesn't need to transfer the visa, you may travel together with the old passport.
    (I've called UK Border to check).

  • How long is the processing time for Malaysian passport renewal at London, UK?
    Process and collect on the same day.

  • What time is the Malaysian High Commission office open for application and collection?
    For application: 9.00am - 11.00am
    For collection: 3.00pm - 4.00pm

  • What's the website of Malaysian High Commission office at London, UK?
    http://www.jimlondon.net (Jabatan Imigresen Malaysia London)
  • Is there any passport photo or photocopy service at Malaysian High Commission office at London, UK?
    Yes.
    Passport photo: To the left at the main entrance (at basement)
    Photocopy: Eg. I/C. To the right in the waiting room

The above details is my experience as of 20/07/2010.
I would suggest you visit the website for latest info.