Skip to content

Commit 7363ca5

Browse files
BrentOzarclaude
andcommitted
#3888 Fix sp_kill kill-loop UPDATE to use 2-part naming on Azure
The post-kill UPDATE at line 853 was unconditionally rebuilding @ObjectFullName as a 3-part name, which would fail on Azure SQL DB. Apply the same @AzureSQLDB branching used in Section 10. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e5e2225 commit 7363ca5

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

sp_kill.sql

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -850,7 +850,10 @@ For more info, visit http://FirstResponderKit.org
850850
IF @OutputDatabaseName IS NOT NULL AND @OutputSchemaName IS NOT NULL AND @OutputTableName IS NOT NULL
851851
AND EXISTS (SELECT * FROM sys.databases WHERE QUOTENAME([name]) = @OutputDatabaseName)
852852
BEGIN
853-
SET @ObjectFullName = @OutputDatabaseName + N'.' + @OutputSchemaName + N'.' + @OutputTableName;
853+
IF @AzureSQLDB = 1
854+
SET @ObjectFullName = @OutputSchemaName + N'.' + @OutputTableName;
855+
ELSE
856+
SET @ObjectFullName = @OutputDatabaseName + N'.' + @OutputSchemaName + N'.' + @OutputTableName;
854857
SET @StringToExecute = N'UPDATE ot
855858
SET ot.KillStartedTime = t.KillStartedTime,
856859
ot.KillEndedTime = t.KillEndedTime,

0 commit comments

Comments
 (0)