Internal Error occurred executing stored procedure when creating session for the AOS

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.

Johan

Links:
http://dynamics-ax-live.blogspot.com/2009/04/missing-stored-procedures.html

SSRS using wrong configuration

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

/Johan

Email errors in AX 2012 R2

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!

/JP

Restarting the Software Update Checklist

Today I did an inplace upgrade of AX 2012 CU 8 to CU 10 and found myself having a strange issue. As part of the upgrade you need to complete a checklist including such things as Compile application and detect conflicts… and there is also a couple of times where you need to restart the AOS. When I did this the checklist disapeared and I could not find it. Turns out you can restart it by going to System administration > Setup > Checklists > Software Update Checklist

That all for today folks…

/Johan

Installing Management Reporter and connecting it to AX 2012 R2

If you use Dynamics AX 2012 R3, Management Reporter is included from the beginning. It is simply a feature you add from the install application. Prior to AX 2012 R2 you will need to download the install from Microsoft and install it. This is a short description on how to install Management Reporter and integrate it into AX 2012 R2.

My server Environment consists of one SQL server called SQL1, one AOS server called AOS1, one Management Reporter Server called MR1

I start by installing SQL locally on the MR1. The features installed are:

image

Then next thing is to install Management Reporter. This is a simple Next, Next, Finish install and when it is done you start the Configuration Console to do the actual work. The first thing to do is to select the AX 2012 Data Mart integration.

image

Now start the hard stuff… I will try to explaing the values as good as possible and also where it is easy to go wrong

image     image

  1. This is a Service account used to run Management Reporter. It needs to be a user in the AOS instance you want to connect to and it needs the role System Administrator
  2. This is the database server where Management Reporter keeps its own databases. In this case it is locally on the MR server.
  3. To create the databases on the MR server we use Windows authentication which is the account you are currently logged in as
  4. The name of the Management Reporter database
  5. This is an encryption key Management Reporter uses to encrypt information stored in its database
  6. This user is added to the Management Reporter as an admin
  7. This is the port which Management Reporter Client will use to connect to the Management Reporter Server
  8. This is the port used to connect to the AOS server instance. Note that if you have more than one instance on the same server this will be different for all instances. You can find port information for each instance in Microsoft Dynamics Ax Server Configuration Utility (Image below). In my case this is the third instance and the ports are 8203 and 2714.
  9. This is the AOS server (Note: NOT the instance name)
  10. See 8
  11. This is the database server where the AX database is located.
  12. This is the AX database name. Note that the service account will need atleast db_reader access to both the AX database and to the AX model database
  13. This is the database where the AX Data mart is stored. In my case this is located in the MR Server 

image