How to trace steps in SQL profiler for only particular application

1.9k views Asked by At

We using a third party company software that talk to SQL database and retreives and inserts all the information.

When user uses this software sometimes it freezes at particular step. I need to troubleshoot it and find out why it happens.

For that I am using SQL Profiler to see what query causes this bottleneck. But how would I trace steps only for that particular software and only for particular user? I dont want to see all other information.

enter image description here

I am able to filter NTUserName, which I am assuming its just UserName, correct? But how can I find out what is the ApplicationName?

If I ran this query I see 13 different applications, including Microsoft Office, Report Server etc. None of them sounds lile the name of the software we use. (MGA Systems. Insurance Management System)

select distinct 
    program_name
from sys.dm_exec_sessions
where is_user_process = 1;
2

There are 2 answers

1
TJB On BEST ANSWER

You need to know the username(s) of the people using the app. Then, where you are, you enter their username in NTUsername > Like > [User Name without the domain if they are on the same network] for windows AD connection strings, or the same steps for username instead of ntsurename if it is a sqlserver user. You can then filter their queries coming in.

0
Wes Palmer On

That Is the only way I know of. Just have the profiler running then have the person run the application and look at the times closest to when it ran to get the name of the application. You could also filter it by the Database name that it touches that way be a way to trim it down even further. Profiler is tricky sometimes and to get the information you want you need to keep messing with the filters. Sorry I can't be more help profiler is ornery.