Job step:
SSIS Server Operation Records Maintenance
Job step properties
| Id | Name |
| Name | SSIS Server Operation Records Maintenance |
| ID | 1 |
| Type | TSQL |
| Run as user | |
| Database | msdb |
| On success action | 3 (goto next step) |
| Retry attempts | 3 |
| Retry interval(minutes) | 3 |
| On fail action | 2 (quit with failure) |
| Output file |
Command
DECLARE @role int SET @role = (SELECT [role] FROM [sys].[dm_hadr_availability_replica_states] hars INNER JOIN [sys].[availability_databases_cluster] adc ON hars.[group_id] = adc.[group_id] WHERE hars.[is_local] = 1 AND adc.[database_name] ='SSISDB') IF DB_ID('SSISDB') IS NOT NULL AND (@role IS NULL OR @role = 1) EXEC [SSISDB].[internal].[cleanup_server_retention_window] |
See also