Monday, March 8, 2010

Event ID 110 and 117 (annoying database error)

I observe the issue described below in both AX 4.0.x and AX 2009 SP1 x solutions running SQL Server 2005 and 2008 (the version of SQL Server Native Client is the same). This is also reported by others in several Communities like microsoft.public.axapta (last one beeing a post by Mike titled "AOS errors" from February 25 2010 where one suggestion is to syncronize the SYSLASTVALUE table).

Eventlog, application

#1 Event ID 110

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.















#2 Event ID 117

Object Server 01:
The database reported (session 1 (-AOS-)):
[Microsoft][SQL Native Client][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=?))"

















I don't know if this has any impact on the solutions at all and I have also found some information on Partnersource describing this as "noice". And I also find it a little bit hard to understand why a syncronization of the system table SYSLASTVALUE should be needed since the real error message in fact is stating "Changed language setting to us_english.".

The reason for posting this is that I find it a little bit hard to understand why something is logget as an error situation if this is "just noice". AX is in general bad at categorizing events in event log application, but I would like to share some experience with others regarding this. Since it's reported from the ODBC layer it could be related to settings like default language for the DBO user (aka AOS Service Account) or inproper settings for Regional Settings for the same Service Account. This is a couple of my own teories left to verify, but bottom line I find it hard to be "just noice".

Hopefully we can start a good discussion around this and bring the issue forward to the system vendor instead of reporting it individually (perhaps a bigger impact).

Update March 10 2010:
For those of you not reading the comments, I would like to point out that Chris pointed to an important KB-article from Microsoft. After looking a little bit more at the details (Googled for NativeError 5703), I found another reference on MSDN. Quote:
The SQL Server ODBC driver returns SQL_SUCCESS_WITH_INFO on a successful SQLConnect, SQLDriverConnect, or SQLBrowseConnect. When an ODBC application calls SQLError after getting SQL_SUCCESS_WITH_INFO, it can receive the following messages:

5701—indicates SQL Server initially putting the user's context into the default database defined at the server for the login ID used in the connection
5703—indicates the language being used on the server

If either the ODBC data source has a default database specified or the application specified the DATABASE keyword on SQLDriverConnect or SQLBrowseConnect, there will be a second 5701 message that indicates the user's context has been switched to the database requested.
My conclusion is that the AOS kernel treat every error raised from the ODBC layer as an error. If Microsoft could implement a change to filter out NativeError 5701 and 5703, a lot of confusion could be saved and not at least a lot of time investigating this issue could also be saved.

Until further notice, this is my conclusion.

Again, thank you Chris for leaving this valuable information.

Update #2 March 11 2010:

I have today posted this as a suggestion on the MS Dynamics AX Suggestions Home page at Microsoft Connect. Please sign in at Connect and vote this up if you find this issue to be a valuable improvement.

Update #3 May 11 2010:

The EMEA Dynamics AX Support team recently released a post giving another explanation. It can be found here.

8 comments:

Anonymous said...

Hi, We got same issue. I did not find a solution yet. But how do we sync a Kernel Table which is not in the DataDictionary?

Hans-Petter Lund said...

Hi and thank you for commenting. Based a simple Google search, this is a rather common issue both for AX 4 and 2009. From my understanding the key is "Changed language setting to us_english", but this has to be verified in some kind of lab. Keep posting in this matter. I don't think sync is relevant at all in this situation because the error is'nt related to the structure of the table and the table can't be synced from the AOT as you says...

Chris said...

Microsoft says this MAY be an issue with network Problems. Especially too high latency between AOS and Database.

Chris said...

Ok.... An update

http://support.microsoft.com/kb/197459

Not really an issue eith the SQLServer but this messages seems to come from the login procedure of the ODBC Drivers?! That means connection is OK, but i got more Info ans so i write this into the Eventlog.

Could be a reason because i see some other Eventlog Infos which tell me that the connection was closed due timeout and that the SPID's are still in the Database...

Hans-Petter Lund said...

Hi Chris. I don't think this has anything to do with latency (did MS really say that?). The KB article that you reference is very relevant and from what I can understand, the error message is raised because the AOS kernel does'nt check the error code mentioned (NativeError code 5703). So maybe MS was right on when they categorized this as "just noise". If this is the case, maybe MS could implement a change in the AOS kernel to filter out this one to avoid people spending a lot of time investigating this matter. I think we are reaching a conclusion here - well done Chris!

Hans-Petter Lund said...

Chris, regarding your second comment.

The time outs and orphaned user sessions is probably not related to the annoying "Changed language settings..." ODBC message - it seems like you had another issue hurting the communication between AOS and your databaseserver... These kind of breaks is often hard to track down, but you should start by looking into the error log on your SQL Server for messages logged in the same timeframe (I guess you are running SQL Server 2005/2008). So long.

Unknown said...

I don't know if this blog is still up-to-date but I wanted to share my findings about this issue.
I am working on Dynamics AX 2009 RU8 (5.0.1600.1824) and to my knowledge this has something to do with multiple AOS servers. More info here: http://blogs.msdn.com/b/emeadaxsupport/archive/2010/05/10/event-117-changed-language-setting-to-us-english.aspx
This issue should be resolved in 5.0.1500.6450 but as I said before, I am on a higher kernel build and I still get the errors.
We logged the incident with Microsoft and they are currently investigating the issue. Apparently we are not the only customer with this problem. I'll let you know if I know anything else.

Hans-Petter Lund said...

Hannes,

No, this blog is alive in the sense that it's still available. I spend almost all my time on AX 2012 R2 and I have a new blog for this.

Sorry to see that you are still struggeling with this. I have choosen to ignore them since it's not a signal of anything bad going on. I have also noticed it in some AX 2012 (not R2). Busy still to bad MS has'nt fixed this