0

I am troubleshooting a long running batchjob in AX2012 R3. I am trying to connect the dots: I can see the batchjob defined in the Dynamics database, table "batchjob". Now I want to find out what's inside the batchjob, so I can see which queries belong to that batchjob when running SQL Profiler. Where can I see this, except of course in AOS/AOT, which I do not have access to? Is this job defined in some table? Anything will help, even if it's only the tables that are touched by the job.

I already ran SSMS and SQL Profiler, but there's such a lot going on, that I would like to focus on where the pain is. It's just that I'd like to focus on that one batch for now.

Alex Kwitny
  • 11,211
  • 2
  • 49
  • 71
pnauta
  • 1
  • 2
  • 1
    The connection string has an [Application Name](https://learn.microsoft.com/en-us/dotnet/api/microsoft.data.sqlclient.sqlconnection.connectionstring) property. You can see (filter on) that value in Profiler - would that help? – Hans Kesting Aug 02 '23 at 12:19
  • Use extended events to capture query being executed - especially if using a production system – Stu Aug 02 '23 at 12:24
  • 1
    This question reads like a SQL dev trying to understand the queries that `x++` code produces. If that's correct, you really should just start by digging into the code a bit and it should be more straightforward via the AOT, which I realize you don't have access to. Batch jobs don't necessarily all have queries. They're potentially a hybrid collection of many activities, which may include various queries. The best approach usually is to start with a developer investigating the code. – Alex Kwitny Aug 02 '23 at 18:13
  • Thanks Alex, yes, of course AOT would be the way to go. I forwarded a link to the team to get more info via AOT. – pnauta Aug 03 '23 at 08:07

0 Answers0