Skip to content

Commit

Permalink
Encode query hash fields as hex strings in sqlserver input (influxdat…
Browse files Browse the repository at this point in the history
  • Loading branch information
Trovalo authored and danielnelson committed Dec 30, 2019
1 parent e4b513e commit a86f9cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/inputs/sqlserver/sqlserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -1408,8 +1408,8 @@ SELECT
, qt.objectid
, QUOTENAME(OBJECT_SCHEMA_NAME(qt.objectid,qt.dbid)) + '.' + QUOTENAME(OBJECT_NAME(qt.objectid,qt.dbid)) as stmt_object_name
, DB_NAME(qt.dbid) stmt_db_name
, r.query_hash
, r.query_plan_hash
,CONVERT(varchar(20),[query_hash],1) as [query_hash]
,CONVERT(varchar(20),[query_plan_hash],1) as [query_plan_hash]
FROM sys.dm_exec_requests r
LEFT OUTER JOIN sys.dm_exec_sessions s ON (s.session_id = r.session_id)
OUTER APPLY sys.dm_exec_sql_text(sql_handle) AS qt
Expand Down

0 comments on commit a86f9cd

Please sign in to comment.