If you check the online user in Administrator Module, You may be found some session with inactive and block status. These inactive and block session are due to crashing of AX clients. These sessions are not create any problem, but possible issues with limited number of active users under Dynamics Ax license. Best approach to clear these inactive and block session form Dynamics Ax to avoid any future conflict with Licensing. All these session information is stored in “SysClientSessions.” Table.
Second Problem we usually face that when we start AOS service, it take too much time change status from Starting to started. One of many reason for this phenomena that AX try to query and located any Active session in SysClientSessions. To reduce the time is to remove all session inactive from SysClientSessions table or possible remove the inactive and block session form Database. In “SysClientSessions” Status with status 0 (Inactive), Status 2 (Ending Waiting for AOS), 3 (Ending –Block).
Perform following steps.
- Stop AOS service.
- Open SQL Server Management Studio
- Open any new query on Dynamics Ax Database.
- Run the following Query where sessions with status 0 (Inactive), Status 2 (Ending Waiting for AOS), 3 (Ending –Block).
delete from SysClientSessions where status in(0,2,3)
- Restart AOS.
Hopes this will works to start AOS service faster than previously.
System Requirements for Microsoft Dynamics Ax 2012 R3 Updated by Microsoft. For this purpose Microsoft uploaded a new document , you can download it from this link
We can get standard sql from AOT Query object through X++ code.
Following X++ Code used to get Standard Sql out of EcoResProductListPage
static void Job2(Args _args)
query = new Query(queryStr(EcoResProductListPage));
Updated version for “Inside Microsoft Dynamics Ax 2012” is now out. It is updated for AX 2012 R3 version.
What’s new :
- It include a new chapter about developing companion apps.
- It include a new chapter about application life cycle.
- A new sections about LINQ support and print management.
You can purchase inline from:
Last week I post a solution to problem of old code on Dynamics Ax 2012 Client, That work for single client and it is not possible to clear cache on manually on every client. Later I found better solution to reset the client cache at AOS. Reference is
According to that reference we have to reset the GUID, so all Clients have to reset its cache, this method required AOS restart.
static void ResetAUC(Args _args)
update_recordset _Settings setting GlobalGUID = str2Guid(#EmptyGuidString);
info("Now we have to Restart the AOS Service to use a new GlobalGUID.");
Its works for me.
In Dynamics Ax List is used as collection, You can add , remove or update elements in it. Type of list is define at the time of its declaration and cannot be change after initialization.
We can iterate in List with the help of ListIterator object, which have several methods to process on list.
List intList = new List(Types::Integer);
List strList = new List(Types::String);
// add the element at the end of the list
// add the element at the start of the list
// If you want to insert the data at some specific index, then you need to make use of the listIterator class
// Iterator performs a midpoint
// insert at current position.
literator = new ListIterator(strList);
// can provide some condition, i.e. if check etc
if (literator.value() == "Ali")
listIterator.insert ("Between Raza and Zaidi");
My friend Bashir Ahmad Malik got following error during start up dynamics Ax service.
“The Microsoft Dynamics AX Object Server 6.2$01-MicrosoftDynamicsAX service terminated with service-specific error Code 90.
Suspect state of SQL Server database is a state when you are unable to connect to the database. “
During trouble shooting we find following root causes.
- database is corrupted
- database files are being “opened” or held by some process (operating system, other program(s)…)
- not enough disk space for SQL Server
- insufficient memory (RAM) for SQL Server
- unexpected SQL Server shutdown caused by power failure
we solve this problem by following Sql Script.
- Connect database server with Microsoft SQL Server Management Studio.
- Execute the following SQL script in given order:
NOTE: replace [DatabaseName] with your database name
-- This query will rollback any transaction which is running on that database
-- and bring SQL Server database in a "single user" mode
ALTERDATABASEMicrosoftDynamicsAX SETSINGLE_USER WITHROLLBACKIMMEDIATE
-- Marking database READ_ONLY, disable logging,
-- and limiting access only to members of the sysadmin fixed server role
-- Checks the logical and physical integrity of all the objects in the specified database
-- In case of simple failure then we can use allow data loss option to recover Database
-- DBCC CheckDB (MicrosoftDynamicsAX, REPAIR_ALLOW_DATA_LOSS)
-- Set database accessibility to it's original state, allowing all logins
ALTERDATABASE MicrosoftDynamicsAX SETMULTI_USER
EXEC sp_resetstatus MicrosoftDynamicsAX
reference : http://social.technet.microsoft.com/wiki/contents/articles/25820.repair-a-suspect-database-in-sql-server.aspx
A few days ago, I was working on Dynamics Ax 2012 customization. When I shifted code to QA server, Compile, Generate CIL, but no changes display on client. I was shocked, latest code working fine on my machine but why it is not working on QA server. AOT shows the latest code. During troubleshooting I found that it is due to Client Cache. For this I have to delete cache files form cache folder. AX cache files have “auc” extension.
I found auc files from following folder
I perform following steps.
- Close Client on machine.
- Stop AOS service.
- Delete all auc files from local cache folder.
- Restart AOS.
- Open client.
I found latest code working fine on QA server.
Hi, You can get Count X++ select statement as
/// Get resource poool count.
/// resource pool count.
protected int getResourcePoolCount()
select count(Rank) from resourceTable
where resourceTable.UserSession == _userSession
&& resourceTable.ResourceSet == ProjResourceSet::Pool;
If analysis services are not deployed on machine, then deployed it and select analysis services from sql server installation wizard.
After installation, Please verify that sql server analysis services are running in services.
Run the Dynamics Ax 2012 R3 setup to install the Analysis services component.
Validate the prerequisite and if they failed install the prerequisites
During installation wizard select the service name.
Select the AOS server name and database. if default then set to Dynamics Ax
Now open the dynamics ax 2012 Client and form file menu ==> Tools ==> Business Intelligence ==> sql
Select the Deploy option
Deployment process took 1 hour on my machine.
Deployment are successfully install on my machine.