1 Answer
- Newest
- Most votes
- Most comments
0
Hi,
The reason of seeing 'UNKNOWN' user in performance insight is because, RDS Performance Insights collects data from your database engine's internal tables. If a field is NULL or empty, Performance Insights will report this value as 'Unknown'. This allows reported metrics that determine the database load, such as wait stats, to be more accurate. 'Unknown' really means 'data unavailable' or 'data unlabelled’.... As a way to help in some way, I have provided a query below to find the actual username of most recently ran queries to manually find out who is the unknown user:
USE master
go
SELECT sdest.DatabaseName
,sdes.session_id
,sdes.[host_name]
,sdes.[program_name]
,sdes.client_interface_name
,sdes.login_name
,sdes.login_time
,sdes.nt_domain
,sdes.nt_user_name
,sdec.client_net_address
,sdec.local_net_address
,sdest.ObjName
,sdest.Query
FROM sys.dm_exec_sessions AS sdes
INNER JOIN sys.dm_exec_connections AS sdec ON sdec.session_id = sdes.session_id
CROSS APPLY (
SELECT db_name(dbid) AS DatabaseName
,object_id(objectid) AS ObjName
,ISNULL((
SELECT TEXT AS [processing-instruction(definition)]
FROM sys.dm_exec_sql_text(sdec.most_recent_sql_handle)
FOR XML PATH('')
,TYPE
), '') AS Query
FROM sys.dm_exec_sql_text(sdec.most_recent_sql_handle)
) sdest
where sdes.session_id <> @@SPID
--and sdes.nt_user_name = '' -- Put the username here !
ORDER BY sdec.session_id
you can run the above shared SQL query to check how much load user is putting on the SQL Server instance
let me know if you have any other question.
answered 3 years ago
Relevant content
- asked 2 years ago
- asked 10 months ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 4 years ago
- AWS OFFICIALUpdated a year ago