Hi @Imran Maqsood ,
Thanks for your response and sorry for the delay.
To start a database, use the Resume Database REST API. The following example starts a database named Database02 hosted on a server named Server01. The server is in an Azure resource group named ResourceGroup1.
POST https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Sql/servers/{server-name}/databases/{database-name}/resume?api-version=2020-08-01-preview HTTP/1.1
For more info please refer to this doc: Resume compute
In the past I have noticed the above issue occurs when two simultaneous jobs starts immediately after resuming the DW. One of the jobs executed successfully, however the other one fails with the following error: Execution fail against sql server. Sql error number: 40892. Error Message: Cannot connect to database when it is paused.
Please try with sequential processing in your ForEach activity and hopefully that should help avoid this issue.
Do let us know how it goes.
Thank you
----------
Please don’t forget to Accept Answer
and Up-Vote
wherever the information provided helps you, this can be beneficial to other community members.