I needed to get the language option that different logins were using. I knew I could get the info from DBCC USEROPTINS but that only gives the information for the account the query is ran against. To get similar information for all current connections to an instance, you can use sys.dm_exec_sessions.

DBCC option:

DBCC USEROPTIONS

 

Sys.dm_exec_sessions option:

SELECT nt_user_name, language, date_format
FROM sys.dm_exec_sessions
WHERE nt_user_name IS NOT NULL
Advertisements