June 1, 2015 at 6:19 am
Hi,
we have a legacy system and not documented. We need to switch our database server, but before doing so, we need to list/monitor what application server is consuming these databases.
I need to monitor following atleast
Source (who use to connect to database) IP
Source machine
Database Name
Connection time
I have used "sys.dm_exec_connections" it is providing most of the information but not all. Is there any other view exist to extract all required information ? as dm retain information after start up.
Thanks
June 1, 2015 at 6:33 am
This should be everything you need:
SELECT source_IP = dec.client_net_address,
source_Machine = des.host_name,
Database_Name = DB_NAME(des.database_id),
Connection_Time = des.login_time
FROM sys.dm_exec_sessions des
INNER JOIN sys.dm_exec_connections dec
ON dec.session_id = des.session_id
-- Gianluca Sartori
June 1, 2015 at 6:50 am
Thank you Gianluca Sartori
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply