Ax2012 An SQL Server 2012

March 15, 2012 No comment

20120315-074725.jpg

Microsoft SQL Server 2012 RTM is released and hotfix 2680186 is availible for compatibiliteit with Microsoft Dynamics Ax2012.

https://mbs.microsoft.com/knowledgebase/KBDisplay.aspx?scid=kb;en-us;2680186

Install Ax2012 on SQL Server 2012 RC0

February 13, 2012 2 comments

During the preparations for Microsoft TechDays 2012 my colleague and I installed a fresh Windows Server 2008 R2 with SQL Server 2012 and Ax 2012. At first all seems to work (the AOS started and we could login with the client), but when we started to prepare and opened the ‘Datasource Name’ lookup on the ‘Document Datasources’ we got an error. After some research my colleague Kenny found that the SQL UtilElements-view used a deprecated keyword called FASTFIRSTROW. After updating the view this functionality seems to work fine. (more…)

Monitoring Table Size Growth in SQL Server

March 31, 2011 No comment

During my vacation I came across a older, but interesting article that shows you how you can monitor table size growth in SQL-server. With a bit of creativity you can create interesting report based on this information or you can just use the examples on the second page.

Index vs Index hint

October 1, 2010 4 comments

This is a discussion I had with several colleagues. What is the difference between index and index hint and what do we use in our code?

(more…)

Using ‘Not Like’ in Ax X++

October 13, 2009 No comment

When you want to use wild-cards in Ax, you can write a SQL statement with a LIKE keyword

1
2
select firstonly purchTable
where purchTable.purchId like '09*';

When you want to have all the other records (not like), in X++ SQL-statements you have 3 possibilities:
1.!LIKE :

1
2
select firstonly purchTable
where !(purchTable.purchId like '09*');

2. notExists join :

1
2
3
select firstonly purchTable
    notExists join refPurchTable
    where purchTable.purchId == '09*';

3. Query-object :

1
2
3
4
5
6
7
8
9
10
11
Query query = new Query();
QueryRun queryRun;
; 
query.addDataSource(tableNum(PurchTable)).addRange(fieldNum(PurchTable, PurchId)).value('!09*');
queryRun = new QueryRun(query);
if(queryRun.next())
{
    purchTable = queryRun.get(tableNum(PurchTable));
    print purchTable.PurchId;
}
pause;