Extend Event with sqlserver.login

  • My knowledge of Extended Events is limited, but I am trying to capture some login details with extended events and can see actions for:

    sqlserver.client_app_name

    sqlserver.client_hostname

    sqlserver.database_name

    sqlserver.username

    etc

    I would also like to find out the client interface (.Net SqlClient Data Provider, ODBC, OLEDB etc), which is client_interface_name in sys.dm_exec_sessions.

    Does anyone know if it is possible to capture this in an extended event or will I have to use a Logon Trigger?

    • This topic was modified 6 months, 3 weeks ago by  Ken McKelvey.
  • have you checked the extended events KBs for more detail

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • I could not find anything so I just went with a logon trigger.

  • using the login event from the session category and capturing the relevant global fileds i was able to connect via a sql acct and pull data and see the connections app name in the extended event log.

    login ext evt

     

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • Thanks for the information although I do not understand the process. I will try and look at it sometime. The sessions I am actually interested in only last a second or two so I am not sure of the implications of connecting with a SQL account.

     

  • I just used a SQL acct for demo purposes, you would need to filter the event trace or have the headache of searching through it, you may have a group of users for example that you want to track

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

Viewing 6 posts - 1 through 5 (of 5 total)

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