File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -262,6 +262,20 @@ IF @OutputDatabaseName IS NOT NULL AND @OutputSchemaName IS NOT NULL AND @Output
262262 ALTER TABLE ' + @ObjectFullName + N ' ADD JoinKey AS ServerName + CAST(CheckDate AS NVARCHAR(50));' ;
263263 EXEC (@StringToExecute);
264264
265+ /* If the table doesn't have the new cached_parameter_info computed column, add it. See Github #2842. */
266+ SET @ObjectFullName = @OutputDatabaseName + N ' .' + @OutputSchemaName + N ' .' + @OutputTableName;
267+ SET @StringToExecute = N ' IF NOT EXISTS (SELECT * FROM ' + @OutputDatabaseName + N' .sys.all_columns
268+ WHERE object_id = (OBJECT_ID('' ' + @ObjectFullName + N ' '' )) AND name = '' cached_parameter_info'' )
269+ ALTER TABLE ' + @ObjectFullName + N ' ADD cached_parameter_info NVARCHAR(MAX) NULL;' ;
270+ EXEC (@StringToExecute);
271+
272+ /* If the table doesn't have the new live_parameter_info computed column, add it. See Github #2842. */
273+ SET @ObjectFullName = @OutputDatabaseName + N ' .' + @OutputSchemaName + N ' .' + @OutputTableName;
274+ SET @StringToExecute = N ' IF NOT EXISTS (SELECT * FROM ' + @OutputDatabaseName + N' .sys.all_columns
275+ WHERE object_id = (OBJECT_ID('' ' + @ObjectFullName + N ' '' )) AND name = '' live_parameter_info'' )
276+ ALTER TABLE ' + @ObjectFullName + N ' ADD live_parameter_info NVARCHAR(MAX) NULL;' ;
277+ EXEC (@StringToExecute);
278+
265279 /* Delete history older than @OutputTableRetentionDays */
266280 SET @OutputTableCleanupDate = CAST ( (DATEADD (DAY , - 1 * @OutputTableRetentionDays, GETDATE () ) ) AS DATE );
267281 SET @StringToExecute = N ' IF EXISTS(SELECT * FROM '
You can’t perform that action at this time.
0 commit comments