cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RayConsella
Advocate I
Advocate I

Auto-Resume SQL DB

I have an Azure SQL Server databases that is on the serverless tier, which pauses after an hour of inactivity.  We only use the database a few times a day so this works well for us.  The problem is that when the database is paused, our flows fail when they try to connect to a paused database.  The Azure SQL DB will auto-resume after a minute or two, but the flow has already failed and will not retry because it thinks it a bad gateway.

 

I have tried setting up a bogus query to run first, so that the server will auto-resume, but then of course that query fails too.  I can't simply have my flow be triggered on a failed query attempt.  Is there some way to simply have a flow try to log on to the server and then my flow if it works but wait 60-90 seconds if it doesn't? 

2 REPLIES 2
manuelstgomes
Community Champion
Community Champion

Hi @RayConsella 

There's a way to introduce a delay in Power Automate.

Here's anothe thread that answers that question

https://powerusers.microsoft.com/t5/Using-Flows/Is-there-a-way-to-sleep-or-wait-in-a-flow/m-p/18825#...

Is this what you need?

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Cheers
Manuel

It appears that you can put a delay in before you execute a step or after you execute a step, but not during.  So I don't think that helps. 

 

It's like knocking on a door and leaving if the person doesn't answer in 1 second.  The flow pings the DB but since it takes the DB a minute to auto-resume, the flow thinks no one is home and fails.  How can I get the flow to keep retrying the step if it fails, but move on to the next step if it succeeds?

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (5,480)