USE SSISDB
GO
--get SSISDB catalog properties - to be able to cleanup the following settings must be set to TRUE
--OPERATION_CLEANUP_ENABLED TRUE
--VERSION_CLEANUP_ENABLED TRUE
select * from [catalog].catalog_properties
--execute data retention cleanup (you will need to set RETENTION_WINDOW setting to lower setting (default 356) gradually (small steps)
--, because usualy there is not enough disk space when you do this for transaction log to grow)
EXEC [internal].[cleanup_server_retention_window]
EXEC [internal].[cleanup_server_project_version]
--inspect LOG size
DBCC SQLPERF('logspace')