如何自動清除 SSISDB 記錄

適用於:Azure Data Factory Azure Synapse Analytics

提示

試用 Microsoft Fabric 中的 Data Factory,這是適用於企業的全方位分析解決方案。 Microsoft Fabric 涵蓋從資料移動到資料科學、即時分析、商業智慧和報告的所有項目。 了解如何免費開始新的試用

在 Azure Data Factory (ADF) 或 Synapse Pipelines 中佈建 Azure-SQL Server Integration Services (SSIS) 整合執行階段後,即可用來執行部署至下列位置的 SSIS 封裝:

  • 由 Azure SQL Database 伺服器/受控執行個體 (專案部署模型) 裝載的 SSIS 目錄 (SSISDB)
  • 由 Azure SQL 受控執行個體 (封裝部署模型) 裝載的檔案系統、Azure 檔案儲存體或 SQL Server 資料庫 (MSDB)

在專案部署模型中,Azure-SSIS IR 將 SSIS 專案部署到 SSISDB、從 SSISDB 擷取要執行的 SSIS 封裝,然後將封裝執行記錄寫回 SSISDB。 SSISDB 也用來儲存 SSIS 工作和 IR 作業記錄。 為了管理累積的記錄,我們提供相關的 SSISDB 屬性和預存程序,可透過 ADF、Azure SQL 受控執行個體代理程式或彈性資料庫作業,依排程自動叫用。

SSISDB 記錄清除屬性和預存程序

若要管理 SSIS 封裝執行記錄,您可以使用 SQL Server Management Studio (SSMS) 來連線至由 Azure SQL Database 伺服器/受控執行個體裝載的 SSISDB,以設定 SSISDB 記錄清除屬性,請參閱連線到 SSISDB。 連線之後,您可以在 SSMS 的 [物件總管] 視窗中展開 [Integration Services 目錄] 節點,以滑鼠右鍵按一下 [SSISDB] 子節點,然後選取 [屬性] 功能表項目以開啟 [目錄屬性] 對話方塊。 在 [目錄屬性] 對話方塊中,您可以找到下列 SSISDB 記錄清除屬性:

  • 定期清除記錄檔:啟用清除封裝執行記錄,預設為 True
  • 保留週期 (天):指定保留記錄的最大存留期 (天數),預設為 365,叫用相關的 SSISDB 預存程式時會刪除較舊記錄。
  • 定期移除舊版本:啟用清除已儲存的專案版本,預設為 True
  • 每一專案的版本數目上限:指定儲存的專案版本數目上限,預設為 10,叫用相關的 SSISDB 預存程序時會刪除較舊版本。

SSISDB log clean-up properties

設定 SSISDB 記錄清除屬性之後,您可以叫用相關的 SSISDB 預存程序 [internal].[cleanup_server_retention_window_exclusive],以清除 SSIS 封裝執行記錄。

若要清除 SSIS 作業記錄,您可以叫用相關的 SSISDB 預存程序 [internal].[cleanup_completed_jobs_exclusive]。 保留期間預設為 60 分鐘,叫用此預存程序時會刪除較舊記錄。

若要清除 SSIS IR 作業記錄,您可以叫用相關的 SSISDB 預存程序 [internal].[cleanup_expired_worker]。 保留期間預設為 168 小時,叫用此預存程式時會刪除較舊記錄。

這些 SSISDB 預存程序會清除不同的 SSISDB 資料表:

SSISDB 預存程序 要清除的 SSISDB 資料表
[internal].[cleanup_server_retention_window_exclusive] [internal].[event_message_context_scaleout]
[internal].[event_messages_scaleout]
[internal].[executable_statistics]
[internal].[execution_component_phases]
[internal].[execution_data_statistics]
[internal].[execution_data_taps]
[internal].[execution_parameter_values]
[internal].[execution_parameter_values_noncatalog]
[internal].[execution_property_override_values]
[internal].[execution_property_override_values_noncatalog]
[internal].[executions]
[internal].[executions_noncatalog]
[internal].[extended_operation_info]
[internal].[operation_messages]
[internal].[operation_messages_scaleout]
[internal].[operation_permissions]
[internal].[operations]
[internal].[validations]
[internal].[cleanup_completed_jobs_exclusive] [internal].[job_worker_agents]
[internal].[jobs]
[internal].[tasks]
[internal].[cleanup_expired_worker] [internal].[worker_agents]

您也可以透過 ADF、Azure SQL 受控執行個體代理程式或彈性資料庫作業,依排程自動叫用這些 SSISDB 預存程序。

透過 ADF 或 Synapse Pipelines 自動清除 SSISDB 記錄

不論是否使用 Azure SQL 資料庫伺服器/受控執行個體來裝載 SSISDB,您都可以使用 ADF 依排程自動清除 SSISDB 記錄。 作法是在 ADF 管線中準備「執行 SSIS 封裝」活動,並指定內嵌封裝,其中包含單一「執行 SQL 工作」來叫用相關的 SSISDB 預存程序。 請參閱此部落格中的範例 4):在 Azure Data Factory 中使用 SSIS 以 3 個簡易步驟隨處執行任何 SQL

SSISDB log clean-up via ADF

針對 SQLStatementSource 參數,您可以輸入 EXEC internal.cleanup_server_retention_window_exclusive 來清除 SSIS 封裝執行記錄。

若要清除 SSIS 作業記錄,您可以新增 EXEC internal.cleanup_completed_jobs_exclusive [@minutesToKeep=’Number of minutes to set as retention period’]

若要清除 SSIS IR 作業記錄,您可以新增 EXEC internal.cleanup_expired_worker [@hoursToKeep=’Number of hours to set as retention period’]

ADF 管線備妥之後,您可以附加排程觸發程序來定期執行管線,請參閱如何依排程觸發 ADF 管線

透過 Azure SQL 受控執行個體代理程式自動清除 SSISDB 記錄

如果您使用 Azure SQL 受控執行個體來裝載 SSISDB,則也可以使用其內建的作業協調器/排程器「Azure SQL 受控執行個體代理程式」,依排程自動清除 SSISDB 記錄。 如果您最近在 Azure SQL 受控執行個體中建立 SSISDB,我們也已在 Azure SQL 受控執行個體代理程式下建立名為 SSIS 伺服器維護作業的 T-SQL 作業,以特別清除 SSIS 封裝執行記錄。 預設為停用,並以排程設定為每日執行。 如果要啟用,或重新設定其排程,作法是使用 SSMS 來連線到 Azure SQL 受控執行個體。 連線之後,您可以在 SSMS 的 [物件總管] 視窗中展開 [SQL Server Agent] 節點、展開 [作業] 子節點,然後按兩下 [SSIS 伺服器維護作業] 以啟用/重新設定。

SSISDB log clean-up via Azure SQL Managed Instance Agent

如果您的 Azure SQL 受控執行個體代理程式之下尚未建立 SSIS 伺服器維護作業,您可以在 Azure SQL 受控執行個體上執行下列 T-SQL 指令碼,以手動新增此作業。

USE msdb
IF EXISTS(SELECT * FROM sys.server_principals where name = '##MS_SSISServerCleanupJobLogin##')
   DROP LOGIN ##MS_SSISServerCleanupJobLogin##

DECLARE @loginPassword nvarchar(256)
SELECT @loginPassword = REPLACE (CONVERT( nvarchar(256), CRYPT_GEN_RANDOM( 64 )), N'''', N'''''')
EXEC ('CREATE LOGIN ##MS_SSISServerCleanupJobLogin## WITH PASSWORD =''' +@loginPassword + ''', CHECK_POLICY = OFF')
ALTER LOGIN ##MS_SSISServerCleanupJobLogin## DISABLE

USE master
GRANT VIEW SERVER STATE TO ##MS_SSISServerCleanupJobLogin##

USE SSISDB
IF EXISTS (SELECT name FROM sys.database_principals WHERE name = '##MS_SSISServerCleanupJobUser##')
    DROP USER ##MS_SSISServerCleanupJobUser##
CREATE USER ##MS_SSISServerCleanupJobUser## FOR LOGIN ##MS_SSISServerCleanupJobLogin##
GRANT EXECUTE ON [internal].[cleanup_server_retention_window_exclusive] TO ##MS_SSISServerCleanupJobUser##
GRANT EXECUTE ON [internal].[cleanup_server_project_version] TO ##MS_SSISServerCleanupJobUser##

USE msdb
EXEC dbo.sp_add_job
    @job_name = N'SSIS Server Maintenance Job', 
    @enabled = 0,
    @owner_login_name = '##MS_SSISServerCleanupJobLogin##',
    @description = N'Runs every day. The job removes operation records from the database that are outside the retention period and maintains a maximum number of versions per project.'

DECLARE @IS_server_name NVARCHAR(30)
SELECT @IS_server_name = CONVERT(NVARCHAR, SERVERPROPERTY('ServerName'))
EXEC sp_add_jobserver  @job_name = N'SSIS Server Maintenance Job',
                       @server_name = @IS_server_name

EXEC sp_add_jobstep
    @job_name = N'SSIS Server Maintenance Job',
    @step_name = N'SSIS Server Operation Records Maintenance',
    @subsystem = N'TSQL',
    @command = N'
       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_exclusive]',
    @database_name = N'msdb',
    @on_success_action = 3,
    @retry_attempts = 3,
    @retry_interval = 3;

EXEC sp_add_jobstep
    @job_name = N'SSIS Server Maintenance Job',
    @step_name = N'SSIS Server Max Version Per Project Maintenance',
    @subsystem = N'TSQL',
    @command = N'
       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_project_version]',
    @database_name = N'msdb',
    @retry_attempts = 3,
    @retry_interval = 3;

EXEC sp_add_jobschedule
    @job_name = N'SSIS Server Maintenance Job',
    @name = 'SSISDB Scheduler',
    @enabled = 1,
    @freq_type = 4, /*daily*/
    @freq_interval = 1,/*every day*/
    @freq_subday_type = 0x1,
    @active_start_date = 20001231,
    @active_end_date = 99991231,
    @active_start_time = 0,
    @active_end_time = 120000

您也可以設定現有的 SSIS 伺服器維護作業或修改上述 T-SQL 指令碼,叫用相關的 SSISDB 預存程序來額外清除 SSIS 工作/IR 作業記錄。

透過彈性資料庫作業清除 SSISDB 記錄

如果您使用 Azure SQL Database 伺服器來裝載 SSISDB,因為沒有內建的作業協調器/排程器,您必須使用外部元件,例如 ADF (見上文) 或彈性資料庫作業 (請參閱本節的其餘部分),以依排程自動清除 SSISDB 記錄。

「彈性資料庫作業」是可以對一個資料庫或一組資料庫自動執行作業的 Azure 服務。 您可以使用 Azure 入口網站、Azure PowerShell、Transact-SQL 或 REST API,以排程、執行和監視這些作業。 使用彈性資料庫作業來叫用相關的 SSISDB 預存程序,以只清除一次記錄或依排程清除。 您可以根據 SSISDB 資源使用量選擇排程間隔,以避免資料庫負載過重。

如需詳細資訊,請參閱使用彈性資料庫作業管理資料庫群組

下列各節說明如何叫用相關的 SSISDB 預存程序 [internal].[cleanup_server_retention_window_exclusive]/[internal].[cleanup_completed_jobs_exclusive]/[internal].[cleanup_expired_worker],以移除超出特定保留期間的 SSISDB 記錄。

使用 Azure PowerShell 設定彈性資料庫作業

重要

使用 PowerShell 中的 Azure 功能需要安裝 AzureRM 模組。 這是一個較舊的模組,僅適用於 Windows PowerShell 5.1,而且不會再取得新的功能。 若在相同版本的 PowerShell 上安裝 AzAzureRM 模組,這兩個模組不會相容。 如果您需要這兩個版本:

  1. 從 PowerShell 5.1 工作階段中解除安裝 Az 模組
  2. 從 PowerShell 5.1 工作階段中安裝 AzureRM 模組
  3. 下載並安裝 PowerShell Core 6.x 或更新版本
  4. 在 PowerShell Core 工作階段中安裝 Az 模組

下列 Azure PowerShell 指令碼建立新的彈性作業,以叫用您選取的 SSISDB 記錄清除預存程序。 如需詳細資訊,請參閱使用 PowerShell 建立彈性作業代理程式

建立參數

# Parameters needed to create your job database
param(
$ResourceGroupName = $(Read-Host "Please enter an existing resource group name"),
$AgentServerName = $(Read-Host "Please enter the name of an existing Azure SQL Database server, for example myjobserver, to hold your job database"),
$SSISDBLogCleanupJobDB = $(Read-Host "Please enter a name for your job database to be created in the given Azure SQL Database server"),
$StoredProcName = $(Read-Host "Please enter the name of SSISDB log clean-up stored procedure to be invoked by your job (internal.cleanup_server_retention_window_exclusive/internal.cleanup_completed_jobs_exclusive/internal.cleanup_expired_worker)"), 

# Your job database should be a clean, empty S0 or higher service tier. We set S0 as default.
$PricingTier = "S0",

# Parameters needed to create your Elastic Job agent
$SSISDBLogCleanupAgentName = $(Read-Host "Please enter a name for your Elastic Job agent"),

# Parameters needed to create credentials in your job database for connecting to SSISDB
$PasswordForSSISDBCleanupUser = $(Read-Host "Please provide a new password for the log clean-up job user to connect to SSISDB"),

# Parameters needed to create the login and user for SSISDB
$SSISDBServerEndpoint = $(Read-Host "Please enter the name of target Azure SQL Database server that contains SSISDB, for example myssisdbserver") + '.database.windows.net',
$SSISDBServerAdminUserName = $(Read-Host "Please enter the target server admin username for SQL authentication"),
$SSISDBServerAdminPassword = $(Read-Host "Please enter the target server admin password for SQL authentication"),
$SSISDBName = "SSISDB",

# Parameters needed to set the job schedule for invoking SSISDB log clean-up stored procedure
$RunJobOrNot = $(Read-Host "Please indicate whether you want to run your job that cleans up SSISDB logs outside their retention period immediately (Y/N). Make sure the specific retention period is set properly before running the following scripts as deleted logs cannot be recovered."),
$IntervalType = $(Read-Host "Please enter the interval type for SSISDB log clean-up schedule: Year, Month, Day, Hour, Minute, Second are supported."),
$IntervalCount = $(Read-Host "Please enter the count of interval type for SSISDB log clean-up schedule."),

# The start time for SSISDB log clean-up schedule is set to current time by default. 
$StartTime = (Get-Date)

叫用 SSISDB 記錄清除預存程序

# Install the latest PowerShell PackageManagement module that PowerShellGet v1.6.5 depends on
Find-Package PackageManagement -RequiredVersion 1.1.7.2 | Install-Package -Force

# You may need to restart your PowerShell session
# Install the latest PowerShellGet module that adds the -AllowPrerelease flag to Install-Module
Find-Package PowerShellGet -RequiredVersion 1.6.5 | Install-Package -Force

# Install AzureRM.Sql preview cmdlets side by side with the existing AzureRM.Sql version
Install-Module -Name AzureRM.Sql -AllowPrerelease -Force

# Sign in to your Azure account
Connect-AzureRmAccount

# Create your job database for defining SSISDB log clean-up job and tracking the job history
Write-Output "Creating a blank SQL database to be used as your job database ..."
$JobDatabase = New-AzureRmSqlDatabase -ResourceGroupName $ResourceGroupName -ServerName $AgentServerName -DatabaseName $SSISDBLogCleanupJobDB -RequestedServiceObjectiveName $PricingTier
$JobDatabase

# Enable Elastic Database Jobs preview in your Azure subscription
Register-AzureRmProviderFeature -FeatureName sqldb-JobAccounts -ProviderNamespace Microsoft.Sql

# Create your Elastic Job agent
Write-Output "Creating your Elastic Job agent..."
$JobAgent = $JobDatabase | New-AzureRmSqlElasticJobAgent -Name $SSISDBLogCleanupAgentName
$JobAgent

# Create job credentials in your job database for connecting to SSISDB in target server
Write-Output "Creating job credentials for connecting to SSISDB..."
$JobCredSecure = ConvertTo-SecureString -String $PasswordForSSISDBCleanupUser -AsPlainText -Force
$JobCred = New-Object -TypeName "System.Management.Automation.PSCredential" -ArgumentList "SSISDBLogCleanupUser", $JobCredSecure
$JobCred = $JobAgent | New-AzureRmSqlElasticJobCredential -Name "SSISDBLogCleanupUser" -Credential $JobCred

# Create the job user login in master database of target server
Write-Output "Grant permissions on the master database of target server..."
$Params = @{
  'Database' = 'master'
  'ServerInstance' = $SSISDBServerEndpoint
  'Username' = $SSISDBServerAdminUserName
  'Password' = $SSISDBServerAdminPassword
  'OutputSqlErrors' = $true
  'Query' = "CREATE LOGIN SSISDBLogCleanupUser WITH PASSWORD = '" + $PasswordForSSISDBCleanupUser + "'"
}
Invoke-SqlCmd @Params

# Create SSISDB log clean-up user from login in SSISDB and grant it permissions to invoke SSISDB log clean-up stored procedure
Write-Output "Grant appropriate permissions on SSISDB..."
$TargetDatabase = $SSISDBName
$CreateJobUser = "CREATE USER SSISDBLogCleanupUser FROM LOGIN SSISDBLogCleanupUser"
$GrantStoredProcedureExecution = "GRANT EXECUTE ON " + $StoredProcName + " TO SSISDBLogCleanupUser" 

$TargetDatabase | ForEach-Object -Process {
  $Params.Database = $_
  $Params.Query = $CreateJobUser
  Invoke-SqlCmd @Params
  $Params.Query = $GrantStoredProcedureExecution
  Invoke-SqlCmd @Params
}

# Create your target group that includes only SSISDB to clean up
Write-Output "Creating your target group that includes only SSISDB to clean up..."
$SSISDBTargetGroup = $JobAgent | New-AzureRmSqlElasticJobTargetGroup -Name "SSISDBTargetGroup"
$SSISDBTargetGroup | Add-AzureRmSqlElasticJobTarget -ServerName $SSISDBServerEndpoint -Database $SSISDBName 

# Create your job to invoke SSISDB log clean-up stored procedure
Write-Output "Creating your job to invoke SSISDB log clean-up stored procedure..."
$JobName = "CleanupSSISDBLog"
$Job = $JobAgent | New-AzureRmSqlElasticJob -Name $JobName -RunOnce
$Job

# Add your job step to invoke SSISDB log clean-up stored procedure
Write-Output "Adding your job step to invoke SSISDB log clean-up stored procedure..."
$SqlText = "EXEC " + $StoredProcName 
$Job | Add-AzureRmSqlElasticJobStep -Name "Step to invoke SSISDB log clean-up stored procedure" -TargetGroupName $SSISDBTargetGroup.TargetGroupName -CredentialName $JobCred.CredentialName -CommandText $SqlText

# Run your job to immediately invoke SSISDB log clean-up stored procedure once
if ($RunJobOrNot -eq 'Y')
{
Write-Output "Invoking SSISDB log clean-up stored procedure immediately..."
$JobExecution = $Job | Start-AzureRmSqlElasticJob
$JobExecution
}

# Schedule your job to invoke SSISDB log clean-up stored procedure periodically, deleting SSISDB logs outside their retention period
Write-Output "Starting your schedule to invoke SSISDB log clean-up stored procedure periodically..."
$Job | Set-AzureRmSqlElasticJob -IntervalType $IntervalType -IntervalCount $IntervalCount -StartTime $StartTime -Enable

使用 T-SQL 設定彈性資料庫作業

下列 T-SQL 指令碼建立新的彈性作業,以叫用您選取的 SSISDB 記錄清除預存程序。 如需詳細資訊,請參閱使用 T-SQL 建立及管理彈性資料庫作業

  1. 識別 Azure SQL Database 的空白 S0/更高服務層級,或為您的作業資料庫建立新的服務層級。 然後在 Azure 入口網站中建立彈性作業代理程式。

  2. 在您的作業資料庫中,建立認證以連線到目標伺服器中的 SSISDB。

    -- Connect to the job database specified when creating your job agent.
    -- Create a database master key if one doesn't already exist, using your own password.
    CREATE MASTER KEY ENCRYPTION BY PASSWORD= '<EnterStrongPasswordHere>';
    
    -- Create credentials for SSISDB log clean-up.
    CREATE DATABASE SCOPED CREDENTIAL SSISDBLogCleanupCred WITH IDENTITY = 'SSISDBLogCleanupUser', SECRET = '<EnterStrongPasswordHere>'; 
    
  3. 定義目標群組,其中只包含要清除的 SSISDB。

    -- Connect to your job database.
    -- Add your target group.
    EXEC jobs.sp_add_target_group 'SSISDBTargetGroup'
    
    -- Add SSISDB to your target group
    EXEC jobs.sp_add_target_group_member 'SSISDBTargetGroup',
    @target_type = 'SqlDatabase',
    @server_name = '<EnterSSISDBTargetServerName>',
    @database_name = 'SSISDB'
    
    -- View your recently created target group and its members.
    SELECT * FROM jobs.target_groups WHERE target_group_name = 'SSISDBTargetGroup';
    SELECT * FROM jobs.target_group_members WHERE target_group_name = 'SSISDBTargetGroup';
    
  4. 在 SSISDB 中從登入建立 SSISDB 記錄清除使用者,並授與叫用 SSISDB 記錄清除預存程序的權限。 如需詳細指引,請參閱管理登入

    -- Connect to the master database of target server that hosts SSISDB 
    CREATE LOGIN SSISDBLogCleanupUser WITH PASSWORD = '<strong_password>';
    
    -- Connect to SSISDB
    CREATE USER SSISDBLogCleanupUser FROM LOGIN SSISDBLogCleanupUser;
    GRANT EXECUTE ON '<internal.cleanup_server_retention_window_exclusive/internal.cleanup_completed_jobs_exclusive/internal.cleanup_expired_worker>' TO SSISDBLogCleanupUser 
    
  5. 建立作業並新增作業步驟,以叫用 SSISDB 記錄清除預存程序。

    -- Connect to your job database.
    -- Add your job to invoke the relevant SSISDB log clean-up stored procedure.
    EXEC jobs.sp_add_job @job_name='CleanupSSISDBLog', @description='Remove SSISDB logs outside their specific retention period'
    
    -- Add your job step to invoke the relevant SSISDB log clean-up stored procedure
    EXEC jobs.sp_add_jobstep @job_name='CleanupSSISDBLog',
    @command=N'<EXEC internal.cleanup_server_retention_window_exclusive/EXEC internal.cleanup_completed_jobs_exclusive/EXEC internal.cleanup_expired_worker>',
    @credential_name='SSISDBLogCleanupCred',
    @target_group_name='SSISDBTargetGroup'
    
  6. 在繼續之前,請確定您已正確設定特定的保留期間。 將會刪除超出此期間的 SSISDB 記錄,且無法復原。 然後,您可以立即執行作業,以開始清除 SSISDB 記錄。

    -- Connect to your job database.
    -- Run your job immediately to invoke SSISDB log clean-up stored procedure.
    declare @je uniqueidentifier
    exec jobs.sp_start_job 'CleanupSSISDBLog', @job_execution_id = @je output
    
    -- Watch SSISDB log clean-up results 
    select @je
    select * from jobs.job_executions where job_execution_id = @je
    
  7. 您可以選擇依排程刪除超出保留期間的 SSISDB 記錄。 如下所示設定您的作業參數。

    -- Connect to your job database.
    EXEC jobs.sp_update_job
    @job_name='CleanupSSISDBLog',
    @enabled=1,
    @schedule_interval_type='<EnterIntervalType(Month,Day,Hour,Minute,Second)>',
    @schedule_interval_count='<EnterDetailedIntervalValue>',
    @schedule_start_time='<EnterProperStartTimeForSchedule>',
    @schedule_end_time='<EnterProperEndTimeForSchedule>'
    

使用 Azure 入口網站監視 SSISDB 記錄清除作業

您可以在 Azure 入口網站中監視 SSISDB 記錄清除作業。 您可以看到每一次執行的狀態、開始時間和結束時間。

Monitor SSISDB log clean-up job in Azure portal

使用 T-SQL 監視 SSISDB 記錄清除作業

您也可以使用 T-SQL 來檢視 SSISDB 記錄清除作業的執行歷程記錄。

-- Connect to your job database.
-- View all SSISDB log clean-up job executions.
SELECT * FROM jobs.job_executions WHERE job_name = 'CleanupSSISDBLog' 
ORDER BY start_time DESC

-- View all active executions.
SELECT * FROM jobs.job_executions WHERE is_active = 1
ORDER BY start_time DESC

若要管理和監視您的 Azure-SSIS IR,請參閱下列文章。