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年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ