Script berikut bisa di gunakan untuk mengetahui siapa saja yg lagi login ke database MSSQL 2005 dan 2008
[sourcecode languange=”css”]
SELECT ‘Authentication Method’=(
CASE
WHEN nt_user_name IS not null THEN ‘Windows Authentication’
ELSE ‘SQL Authentication’
END),
login_name AS ‘Login Name’, ISNULL(nt_user_name,’-‘) AS ‘Windows Login Name’,
COUNT(session_id) AS ‘Session Count’
FROM sys.dm_exec_sessions
GROUP BY login_name,nt_user_name
[/sourcecode]
SQL : mengetahui user dan session pada MSSQL
You May Also Like
Angular v19 is here!
November 20, 2024
Full Keynote: Satya Nadella at Microsoft Ignite 2024
November 19, 2024
Keynote in 90 Seconds: Satya Nadella at Microsoft Ignite 2024
November 19, 2024
More From Author
How to move file in AL11 using SAP abap
November 14, 2024
Red Magic 10 Pro+ display detailed ahead of launch
November 6, 2024
Apple’s Next New iPhone to Debut in the Spring: What to Expect
October 2, 2024
+ There are no comments
Add yours