Skip to content

Commit 5a4201a

Browse files
authored
Merge pull request #2403 from BrentOzarULTD/2377_sp_BlitzCache_add_LastCompletionTime
#2377 sp_BlitzCache new LastCompletionTime
2 parents 1c7e81b + 3d74d14 commit 5a4201a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sp_BlitzCache.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6932,11 +6932,11 @@ BEGIN
69326932

69336933
EXEC sp_executesql @insert_sql ;
69346934

6935-
/* If the table doesn't have the new JoinKey computed column, add it. See Github #2162. */
6935+
/* If the table doesn't have the new LastCompletionTime column, add it. See Github #2377. */
69366936
SET @ObjectFullName = @OutputDatabaseName + N'.' + @OutputSchemaName + N'.' + @OutputTableName;
69376937
SET @insert_sql = N'IF NOT EXISTS (SELECT * FROM ' + @OutputDatabaseName + N'.sys.all_columns
6938-
WHERE object_id = (OBJECT_ID(''' + @ObjectFullName + N''')) AND name = ''JoinKey'')
6939-
ALTER TABLE ' + @ObjectFullName + N' ADD JoinKey AS ServerName + CAST(CheckDate AS NVARCHAR(50));';
6938+
WHERE object_id = (OBJECT_ID(''' + @ObjectFullName + N''')) AND name = ''LastCompletionTime'')
6939+
ALTER TABLE ' + @ObjectFullName + N' ADD LastCompletionTime DATETIME NULL;';
69406940
EXEC(@insert_sql);
69416941

69426942

0 commit comments

Comments
 (0)