This is one I should have written down a long time ago…
When setting up a new database for AX 2012 and I am trying to start the service I am getting the following error:
Internal Error occurred executing stored procedure when creating session for the AOS.
The reason for this is that AX is looking for two Stored Procedure in the AX database called CREATESERVERSESSIONS and CREATEUSERSESSIONS. If these are missing the service will not start. My temporary solution is that I script out the SPs from another database and create them where they are issing.
Everything that is printed in AX 2012 is using SQL Server Reporting Services (SSRS). It does this by connecting to AX when it is told to and gets the data. To find the settings for the AX Server it normally uses the default client configuration. In some cases (especially when you have multiple instances) this fails or SSRS is using the wrong configuration.
You can help SSRS by saving the correct configuration in C:\Program Files\Microsoft SQL Server\MSRS12.MSSQLSERVER\Reporting Services\ReportServer\bin with the name Microsoft.Dynamics.AX.ReportConfiguration.axc
Have a nice day
When we upgrade to AX 2012 the destination database needs to be in “upgrade mode” othewise the upgrade checklist it not triggered correctly. This can be done in one of two ways… either you check “Register this database for Upgrade” when you set up the AOS… this implies that you actually set up a new AOS. If you do not want to do that you can also do this:
1. Start SQL Management Studio and run this script:
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
CREATE PROCEDURE [dbo].[SETUPVERSIONPROC] AS SELECT ‘6.0.947.0’
DELETE FROM SysSetupLog
WHERE NAME = ‘SysCheckList_Setup’
OR NAME LIKE ‘SysCheckList_Up%’
Our company has retired all of our lab hosts which we used to have internally which means thet we need to have our lab servers on Microsoft Azure. To install the servers we use LCS (Lice Cycle Services) which deploys a VM in our Azure Subscription. The problem is that the VM is not activated, which on an internal server would require a product key and a Windows Server License… When running VMs internally we used to handle this by rearming the VMs 3 times which gives us a total of 180 days and then set up a new one which was a little hassle but it worked. But since we now have deployed VMs on Azure there is actually a license included in the Azure VM which means that there is no need to run a server which is not activated. Here is a short description on how to activate the AX VM…
- Install the new VM on Microsoft Azure using LCS
- Log into the the server using RDP (the logon info is in LCS)
- Start an elevated command prompt
- Find the edition of the VM by running this command:
DISM /online /Get-CurrentEdition
We get: Current Edition : ServerDatacenterEval
- Find out which edition you can upgrade to by running:
DISM /online /Get-TargetEditions
We get: Target Edition : ServerDatacenter
This means that you can upgrade from the evaluation edition of datacenter edition to the full version of datacenter edition. Now we need a license key… Microsoft uses Automatic Virtual Machine Activation to license the VMs in Azure… This means that if the host is activated (which it hopefully is ) the guest gets activated but to use this feature the guest VM still need a product key. The keys are available on Technet.
- Use the correct key to activate the VM by running this:
DISM /online /Set-Edition:ServerDatacenter /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX /AcceptEULA
- Restart the VM and verify that is is not using Evaluation Edition anymore
That’s all for today
One of my colleagues had an issue accessing the Screen Layout designer in the AX Client and I was a bit confused… it worked for me… This turned out to be two separate issues.
The first one was that he and I was logged into two different AOSes and the Retail Headquarter was not installed on the one he was logged on to… simple enough to fix… I simply installed it. The Retail Headquarter component includes some DLLS that are required. If you want to be able to run the Retail Layout Designer on a client or terminal server you will need to install the retail components on the client/terminal server as well.
When we installed the Headquarter components we unfortunately missed the fact the we “probably should” install Expression Blend (note to self… read all the instructions)
When we tried to start the Designer it crashed with this error.
I found information on this issue on LCS Issue Search (Link below). The trick is to install Expression Blend Dev Kit for .NET and then copy Microsoft.Expression.Interactions.dll and System.Windows.Interactivity.dll from “C:\Program Files (x86)\Microsoft SDKs\Expression\Blend\.NETFramework\v4.0\Libraries” to “C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin”
When these issues was fixed and my colleague tried to start the Button Grid Layout he gets this error:
Normally the AX AOS Service user is used to access the AX database but in some cases the individual user needs to have specific access… below is a link to an article that describes steps involved
One of my customers have migrated to new servers for their AOSes, these are brand new Windoews Server 2012 R2 servers… nice. We hade one issue though… When trying to send emails using batch from a batch jog we got the following error:
Microsoft.Dynamics.Ax.Xpp.ClrErrorException: Exception of type ‘Microsoft.Dynamics.Ax.Xpp.ClrErrorException’ was thrown.
at Microsoft.Dynamics.Ax.Xpp.CLRInterop.staticInvoke(String typeName, String methodName, Object parameters, Type type)
at Dynamics.Ax.Application.WinAPIServer.cryptUnProtectData(Object _encryptedDataBlob) in WinAPIServer.cryptUnProtectData.xpp:line 39
at Dynamics.Ax.Application.SysEmailParameters.password() in SysEmailParameters.password.xpp:line 18
at Dynamics.Ax.Application.SysEmailDistributor.Processemails(Guid _emailProcessorId) in SysEmailDistributor.processEmails.xpp:line 39
at Dynamics.Ax.Application.SysEmailDistributor.Run() in SysEmailDistributor.run.xpp:line 78
at Dynamics.Ax.Application.BatchRun.runJobStaticCode(Int64 batchId) in BatchRun.runJobStaticCode.xpp:line 54
at Dynamics.Ax.Application.BatchRun.runJobStatic(Int64 batchId) in BatchRun.runJobStatic.xpp:line 13
at BatchRun::runJobStatic(Object )
at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeStaticCall(Type type, String MethodName, Object parameters)
at BatchIL.taskThreadEntry(Object threadArg)
It took me some time to figure it out… Apparently the password for the SMTP account is saved in the AX database, but using an encryption key from the computer which saved it (a.k.a. the server that was retired) so when moving to the new server it was not able to read it. To fix it I simply entered the password again from the new server and Presto!
Todays issue is a problem with integrating Management Reporter CU 15 with AX 2012 R3. When doing the initial integration we got this error:
Invalid column name ‘PARTITION’.
Invalid column name ‘Key_’.
and the integration never finished. After doing some research online I found someone with this issue and the recommendation was to downgrade to Management Reporter CU13. When doing so we bumped into an error in CU 13 causing deadlocks in SQL. I called Microsoft support and got the recommendation to once again upgrade to CU15.
Here is a good place to insert some history:
The customer upgraded from AX 2012 Feature Pack directly to AX 2012 R3. Before upgrading from AX 2012 Feature Release to AX 2012 R3 we had installed MR CU13. In AX 2012 R2 Microsoft introduced a feature called PARTITION. This is used to be able to host AX in a multi tenant environment with isolated customers.
When installing Management Reporter (CU13 and Later) and integrating it to AX it creates three views in the database.
When we upgraded directly from AX 2012 Feature Release directly to AX 2012 R3 these views where migrated to R3 and when we installed CU15 these views were never updated (the PARTITION column was missing), Management Reporter just verified that they were there and thought all was fine.
Remove the integration
- Remove the three views
- Recreate the integration
- Enable the integration and sync the datamart
That is all for today
I am working with a customer today and we are setting up LCS System Diagnostics on their AX 2012 R3 environment. They have quite a locked down environment which presents some challenges.
First of all we need to open outgoing traffic to LCS and to Azure from the server where we installed LCS according to Microsoft. The adresses are:
If you miss the Azure port no data vill be uploades since the upload is a Zipped file to an Azure Storage account
We have a large deploy with a customer this week which is a very bad time for AXBuild to stop working… really bad time. And ofcourse that is what happened (screw you Murphy). There are of course other ways to to a compile in AX byt doing it from within AX is really slow so AXBuild is much nicer and faster.
The problem was that when I launched AXBuild the process kept crashing with this error:
I also got the following events in Event viewer:
Error 14.11.2016 17:49:05 Dynamics Server 01 110 None
Object Server 01:
Can not create default Keyset. Error code -2146893809.
Error 14.11.2016 17:49:05 Dynamics Server 01 110 None
Object Server 01:
The license information can not be decoded.
Error 14.11.2016 17:49:06 .NET Runtime 1026 None
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception
Exception Info: System.Runtime.InteropServices.SEHException
When doing research we found that this is most likely a permissions issue and I got somen hints on what to check:
- Are you running elevated: Check
- Are you local admin on the AOS computer: Check
- Is the AOS user local admin on the AOS computer: Check
- Check AOS user permissions on the AX database and modelstore: Check
I was not able to find the solution so I resorted to Microsoft Support and they sait the same thing… it is a permission issue. So finally I fired up ProcessMonitor (which I don’t do often enough) and the it was after some looking around and filtering. I filtered out everything except the Ax32Serv.exe process and I also removed the SUCCESS lines.
The issue was that my user (the one doing the the compiling) got access denied on a file in the folder:
I changed the permission on the file and Presto! (or as one of my colleugues said – I am going to get a Cappuchino with cinnamon)
The compile is running and things are good
This morning we had an incident with a customer who during the night had failed over their SQL cluster during the night and then failed it back again and now AX had stopped working. The error was this:
The problem is that when SQL is restarted the permission on tempdb is reset. AX solves this is a “special” way. When AX is installed the install created a stored procedure in master on the SQL server which it calls to set the permissions in case they get lost.
These was unfortunately missing on one of the nodes so I used Management Studio to script them out and the create them on the node where they were missing