Getting Profiler to Filter User Name

  • I suppose I am not the first one who has ever run into this common problem, but I have not found any resources on it: I need to investigate a performance issue and wanted to setup a trace on a user who is logging into a web application using a username (say "jsmith") and accessing various forms, reports tied to database "appdatabase". It seems the application is setup to use a single generic user ("appuser") for the SQL connection - when I check the security information for "appdatabase", I see "appuser" is setup with various priveleges against it. Now - how do I go about tracking the activities of "jsmith" who is logging in from his work laptop?

    I know the filters for Host Name, Domain Name, Login ID etc. exist, but it looks like the SQL connection is not passing them, it is only passing "appuser". Problem is, "appuser" is being used by a number of apps and users running against the database, so it is almost impossible for me to figure out which is the "appuser" is tied to "jsmith" activities. Is there a way to get Profiler to track Jsmith and only Jsmith?

    Thanks!

  • How exactly is the application set up?

    Keep in mind unless the application is actually connecting their computer directly to the database, which sounds like isn't the case, all you would see is the single user account for the application logged in from the server hosting the application. In which case you would need to use whatever tools are built into the application to monitor their behavior.

  • You maybe able to uses the sysprocesses table to determine the hostprocess ID. You can use the hostprocess ID to find the PID on the server it originated from:SELECT

    hostname,

    loginame,

    nt_username,

    hostprocess

    FROM

    sysprocesses

    WHERE

    dbid > 4

    AND hostprocess <> '' Then from the server that the process originated from, you may be able to link it back to the workstation that ran it

    It's a lot of scripting but might help point you in a direction or sorts.

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply