You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -399,7 +401,7 @@ function Invoke-DbaDiagnosticQuery {
399
401
Name=$scriptpart.QueryName
400
402
Description=$scriptpart.Description
401
403
DatabaseSpecific=$scriptpart.DBSpecific
402
-
Database=$null
404
+
Database=$currentdb
403
405
Notes="Empty Result for this Query"
404
406
Result=$null
405
407
}
@@ -410,17 +412,21 @@ function Invoke-DbaDiagnosticQuery {
410
412
Write-Message-Level Verbose -Message ('Some error has occured on Server: {0} - Script: {1} - Database: {2}, result will not be saved'-f$instance,$scriptpart.QueryName,$currentDb) -Target $currentdb-ErrorRecord $_
0 commit comments