From df5f99146138a73641c786d1e14e1dd3e1ca76d3 Mon Sep 17 00:00:00 2001 From: Andreas Jordan <66946165+andreasjordan@users.noreply.github.com> Date: Wed, 5 Jun 2024 12:14:10 +0200 Subject: [PATCH] Get-DbaProcess: Fix for empty most_recent_sql_handle (#9375) --- public/Get-DbaProcess.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/Get-DbaProcess.ps1 b/public/Get-DbaProcess.ps1 index fe04deecb7..ad63aeeaed 100644 --- a/public/Get-DbaProcess.ps1 +++ b/public/Get-DbaProcess.ps1 @@ -121,7 +121,7 @@ function Get-DbaProcess { on c.session_id = s.session_id JOIN sys.endpoints e ON c.endpoint_id = e.endpoint_id - CROSS APPLY sys.dm_exec_sql_text(c.most_recent_sql_handle) t" + OUTER APPLY sys.dm_exec_sql_text(c.most_recent_sql_handle) t" if ($server.VersionMajor -gt 8) { $results = $server.Query($sql)