I installed AX2012 R2 CU7 with the demo data downloaded from Microsoft Dynamics AX 2012 Solution Demos on PartnerSource. When I attempted to start the AX client, it threw the following error:
A user session on the server could not be created. Try to start the client again. If the problem continues, contact the Microsoft Dynamics AX administrator.
I also found the following message in the Event Log:
Unable to connect to an Application Object Server. A company name or server name may not be specified correctly in the client configuration, or the server specified may not be available.
I checked the setup and everything was all right. I also looked on internet, just to find that few other people ran into the same error – but I didn’t find any solution.
I thought that “user session on the server could not be created” might have referred to missing permissions for execution of CREATEUSERSESSIONS stored procedure but it wasn’t the case either.
Then I used the SQL Server Profiler to obtain statements sent to database – as expected, CREATEUSERSESSIONS was called. I copied the command (with all parameters) and executed it by myself. And it failed! The error was:
Procedure or function CREATEUSERSESSIONS has too many arguments specified.
It was easy then to find out that the extra argument was a partition ID. Partitions were introduced in AX2012 R2 and the database obviously was from a pre-R2 environment.
There are two data set on Microsoft Dynamics AX 2012 Solution Demos:
- Demo Data (used to restore VM-A v3 to original demo data state)
- Demo Data (used to restore VM-A v4 to original demo data state)
Accidentally, I downloaded v3 without noticing there is another version available. When I downloaded and installed v4, everything started to work. I thought that v3 version was built upon AX2012 R2 too, however it doesn’t seem to be the case with the database.
The lesson learned isn’t only that I should be more careful about what I’m installing. The way how I managed to identify the problem is important as well and might help in other cases in future.