다음을 통해 공유


Azure Data Factory Troubleshooting: error code "DeleteFactoryBlockedByIR"


In this post, we can find the steps that need to follow in order to delete an Azure DataFactory. Specifically, the steps below apply to the error code "DeleteFactoryBlockedByIR".

The Problem

When we try to delete the Azure Data factory using the Remove-AzDataFactoryV2 cmdlet we might see the error message below:

Remove-AzDataFactoryV2: HTTP Status Code: BadRequest Error Code: DeleteFactoryBlockedByIR Error Message: Please stop all SSIS Integration Runtimes, remove all Azure VNet Integration Runtimes and remove all Self-Hosted Integration Runtimes sharing before deleting your resource. 0 Azure VNet Integration Runtimes:. 0 Shared Self-hosted Integration Runtimes: . 1 Azure SSIS Integration Runtimes with status: Started: InternalintegrationRuntimeTest ; . Request Id: 756010eb-4df3-4b85-b2f9-50dbf827acbc

The Solution

The main problem is that there is an SSIS IR still running. In order to solve this problem, we must run the below PowerShell commands.

Step 1. List all started Integration Runtimes

$ResourceGroupName = 'RG Name'
$DataFactoryName = 'DF Name'
$IntegrationRuntimeName ='Int Runtime Name'
Get-AzureRmDataFactoryV2IntegrationRuntime -ResourceGroupName $ResourceGroupName  -DataFactoryName $DataFactoryName | where { $_.State -ieq 'Started' }

Step 2. Stop the started Integration Runtimes

Stop-AzureRmDataFactoryV2IntegrationRuntime -ResourceGroupName $ResourceGroupName -DataFactoryName $DataFactoryName -Name $IntegrationRuntimeName

Step 3. Delete the Datafactory

From the Azure portal you can now delete the Datafactory.