Identifying a Citrix Session that is causing Deadlocking in a Finance database.

  • Hi Folks,

    Would anyone know if there is a way to match up a SPID (or connection_id) in a SQL 2005 database to it's source session in Citrix? I don't mean the actual Citrix database, but users are connecting in via Citrix to a Finance database..

    Here's my problem...

    I have a 10 Citrix servers allowing users to connect into a Finance application which in turn connects to a SQL 2005 database. Unfortunately, the way this was initially configured, (before my arrival), was that all users connect into Citrix using the own credentials. Now the ugly bit is that the application logs into the database using a single SQL login account. So I have a load of sessions inside SQL server from many Citrix servers and by running the query below I can easily identify the Citrix server but not the user, as all I can see is the application login.

    [font="Courier New"]USE master

    GO

    SELECT sqltext.TEXT ,

    req.session_id ,

    req.status ,

    req.command ,

    req.cpu_time ,

    req.total_elapsed_time,

    req.transaction_id,

    req.start_time,

    req.connection_id

    FROM sys.dm_exec_requests req

    CROSS APPLY sys.dm_exec_sql_text(sql_handle) AS sqltext

    where req.session_id <> @@SPID

    order by req.total_elapsed_time desc

    [/font]

    Therefore whenever I get blocking or deadlocking, I can't find out the offending username.

    Would anyone know how I can match the SQL database session to the Citrix connection to allow me to identify the user?

Viewing 0 posts

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