Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

sql connections Expand / Collapse
Author
Message
Posted Wednesday, March 6, 2013 9:09 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, July 29, 2014 12:33 PM
Points: 8, Visits: 28
I want to know whaich connections are using which driver / api to connect to my server.
For instance I'm told one application is using ODBC which I am sure it is not.
But how do you see ODBC, ADODB, OLEDB, ... from the server's prespective?
Post #1427480
Posted Wednesday, March 6, 2013 9:32 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Yesterday @ 12:34 PM
Points: 31,204, Visits: 15,649
I'm not sure you can. I'm not sure it should matter from the server. The idea of the API is the server sees calls to it without worrying about clients.

Does sys.dm_exec_sessions give you what you need?

http://msdn.microsoft.com/en-us/library/ms176013.aspx







Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #1427494
Posted Wednesday, March 6, 2013 9:33 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Yesterday @ 3:19 PM
Points: 1,913, Visits: 2,062
The easiest way to see that is through the dynamic management views. CLIENT_INTERFACE_NAME in SYS.DM_EXEC_SESSIONS

SELECT s.session_id, s.host_name, s.program_name, s.client_interface_name, s.login_name, s.status AS session_status,
db_name(er.database_id) AS database_name,
er.status AS request_status, er.command, er.percent_complete,
er.blocking_session_id,
er.wait_type, er.wait_time / 1000.0 AS wait_sec, er.last_wait_type, er.wait_resource,
er.transaction_id, er.open_transaction_count,
er.cpu_time / 1000.0 AS cpu_sec, er.total_elapsed_time / 1000.0 AS total_elapsed_sec, er.start_time, er.reads, er.writes, er.logical_reads,
er.sql_handle, er.plan_handle
FROM sys.dm_exec_requests er
INNER JOIN sys.dm_exec_sessions s ON er.session_id = s.session_id
WHERE s.is_user_process = 1
AND s.session_id <> @@SPID

Post #1427497
Posted Wednesday, March 6, 2013 9:44 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, July 29, 2014 12:33 PM
Points: 8, Visits: 28
Bingo!

Client_Interface_Name from sys.dm_exec_sessions

Here is a sample from the column:
.Net SqlClient Data Provider
OLEDB
ODBC
NULL
ODBC
.Net SqlClient Data Provider
.Net SqlClient Data Provider


Thanks.
Post #1427504
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse