Thursday 16 June 2011

Microsoft Dynamics AX - Where did that Error/Warning/Info come from?

I recently had difficulty with an automated process (via the business connector) throwing a warning from deep within AX! I was working on Axapta 3.0 but I'm sure this has carried through to more recent versions.

Here are my steps to finding the source of the error;

Open the AOT
Browse to Classes
Open the Info class
Place a breakpoint on the Exception Method
Run your code (in my case this was automated so I created a test job)
The breakpoint is triggered and the debugger opens
The "Context" drop down shows the call stack.

You can use this to trace all the way back to where your code is triggering the error, warning or info.

Thursday 27 January 2011

SQL Server Benchmark Testing & Performace Tuning - Clear Cache

When performing SQL Server benchmark testing and performance tuning, it is essential to test against a clear cache.

SQL Server stores common queries in RAM, so after the first run of tests your performance is likely to increase.

To replicate a benchmark test on a clear cache, DBAs can use the following commands;

-- Clear the data cache
DBCC DROPCLEANBUFFERS

-- Clear the stored procedure cache
DBCC FREEPROCCACHE