Filtering SQL stmts using SQL Server Profiler 2005 | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Filtering SQL stmts using SQL Server Profiler 2005

I have an intranet web app that is using the same connectionstring for all users to the database from the webserver. Is there a way for me to forward client information through the connection string so I can use SQL Server Profiler to filter out a specific users hit? Connection pooling is being used. Basically, I’m always trying to find out the exact SQL statement that runs on the database whenever I get an issue from my intranet users. I’d like to be able to capture that sql statement from the particular page that a specific user is running. Although the connection string that is used by the web application is the same for all the users. Any ideas, suggestions? -sandor

why don’t you setup another web server otherwise identical
but using a different user account
actually, if its on a different host,
just filter profiler on the host or
you don’t even need a new user account
in the connection string is a setting for application name
set it to something else
Thanks for the suggestions. I’m trying to avoid duplication of production environment. Whenever a user has an issue, I would like to be able to just fire up the SQL Profiler and ask them over the phone to refresh the page and capture any database hits from it. Of course there are other people using the application during that time, so I need to filter out all the noise. Since connection pooling is being used the hostname, loginname, applicationname are all the same for all users logged into the applcation. Is there something I can append to the connection string during the debug process that will give me the ability to filter out that particular user’s database hits?<br /><br />Can I do: ConnectionString = "Application Name=MyWebAppTest;User Id=uid<img src=’/community/emoticons/emotion-4.gif’ alt=’;P’ />wd=secret;…" and filter on the Application Name? <br /><br />I wish to make the user’s life as painless as possible if something needs to be looked at. Asking them to hit the refresh key on the browser is very reasonable.<br /><br />-sandor<br />
]]>