April 26, 2013 at 12:20 am
Hi All,
I have a user by MasterAccess. As a DBA I want to see who are logged with this user. I wan to get the client_net_address (IP address of that System). I am getting all the Address who are using my 1.2 server by
SELECT *
FROM sys.dm_exec_connections
But I want to check those user only who are logged in with MasterAccess user.
Please help
April 26, 2013 at 2:28 am
Stored procedures sp_who or sp_who2 will both include username and hostname for all active connections. See if you can't find what you need in there. 🙂
EDIT: Sorry, on re-reading your post, I see that you're looking for a way to check only that specific user.
Here's a description of how to filter the results from sp_who2:
http://social.msdn.microsoft.com/forums/en-US/sqldatabaseengine/thread/46bc764a-1eec-44dd-a707-1828533d905d/[/url]
Vegard Hagen
Norwegian DBA, occasional blogger and generally a nice guy who believes the world is big enough for all of us.
@vegard_hagen on Twitter
Blog: Vegards corner (No actual SQL stuff here - havent found my niche yet. Maybe some day...)
April 26, 2013 at 2:30 am
Hi,
My promlem is now solved through googoling.
SELECT
conn.session_ID as SPID,
conn.client_net_address as IPAddress,
sess.host_name as MachineName,
sess.program_name as ApplicationName,
login_name as LoginName
FROM sys.dm_exec_connections conn
inner join sys.dm_exec_sessions sess
on conn.session_ID=sess.session_ID
However thanks for your answer
April 26, 2013 at 2:35 am
Nice. Gee, it's getting hard to remember how we found anything in the days before Google. 😛 😉
Vegard Hagen
Norwegian DBA, occasional blogger and generally a nice guy who believes the world is big enough for all of us.
@vegard_hagen on Twitter
Blog: Vegards corner (No actual SQL stuff here - havent found my niche yet. Maybe some day...)
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply