What ended up working for me was splitting the primary stored procedure up into multiple procedures. I don't think ADF handles very well the case of a single monolithic procedure that calls many other procedures.
ADF stored procedure executed multiple times
I have a stored procedure activity in a pipeline that is triggered daily. This activity seems to be executing once, but for some reason the procedure itself executes multiple times and causing a deadlock.
The retry value is set to 0, so I am not sure what would be causing this behavior.
{
"name": "Erroring stored procedure",
"description": "Call a Stored Procedure",
"type": "SqlServerStoredProcedure",
"dependsOn": [
{
"activity": "ForEachProductionTable",
"dependencyConditions": [
"Succeeded"
]
}
],
"policy": {
"timeout": "7.00:00:00",
"retry": 0,
"retryIntervalInSeconds": 30,
"secureOutput": false,
"secureInput": false
},
"userProperties": [],
"typeProperties": {
"storedProcedureName": "[dbo].[MyStoredProcedure]"
},
"linkedServiceName": {
"referenceName": "<redacted>",
"type": "LinkedServiceReference"
}
}