Skip to content

Commit

Permalink
BrentOzarULTD#293 Support for @OutputServerName
Browse files Browse the repository at this point in the history
Removed my code from the global temp tables output block. Can only be
done locally for now.
  • Loading branch information
Haris Khan authored and Haris Khan committed Jul 19, 2016
1 parent 224a6a1 commit d39d2c5
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions sp_Blitz.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5837,14 +5837,8 @@ IF @ProductVersionMajor >= 10 AND NOT EXISTS ( SELECT 1
+ ' (ServerName, CheckDate, CheckID, DatabaseName, Priority, FindingsGroup, Finding, URL, Details, QueryPlan, QueryPlanFiltered) SELECT '''
+ CAST(SERVERPROPERTY('ServerName') AS NVARCHAR(128))
+ ''', SYSDATETIMEOFFSET(), CheckID, DatabaseName, Priority, FindingsGroup, Finding, URL, Details, QueryPlan, QueryPlanFiltered FROM #BlitzResults ORDER BY Priority , FindingsGroup , Finding , Details';
IF @ValidOutputServer = 1
BEGIN
EXEC('EXEC('''+@StringToExecute+''') AT ' + @OutputServerName);
END
ELSE
BEGIN
EXEC(@StringToExecute);
END

EXEC(@StringToExecute);
END
ELSE IF (SUBSTRING(@OutputTableName, 2, 1) = '#')
BEGIN
Expand Down

0 comments on commit d39d2c5

Please sign in to comment.