RDS Performance Insights 'Slice By User' shows Unknown user generating DB load

0

I am using AWS RDS Performance Insights and am trying to establish who and what is generating DB load, when viewing 'Slice By User' I see the expected username of the DB connection cross-referenced with the host I am expecting, but I also see a large amount of load coming from the host generated by a user labelled as 'Unknown'.

I am using SQL Server DB.

Has anyone else experienced this or is able to explain why I would be seeing this behaviour? Thanks for any help

질문됨 2년 전2917회 조회
1개 답변
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.

답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인