web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / SQL Server stored proc...
Power Automate
Unanswered

SQL Server stored procedure.v2 runs twice on failure

(0) ShareShare
ReportReport
Posted on by 234

We have a simple button that launches a flow:

 

 

UpdateContext({showLoadingCancellation: true});
'PA>usp_SiteVisitCancellation_AddUpdate'.Run(SiteVisitID, CancelledByID, UserID, Reason.Text);
UpdateContext({showLoadingCancellation: false});

 

 

The flow has been created brand new for testing purposes and consists of 2 steps:

DarkLiteOne_0-1626767718760.png

When pressing the button once we see the flow is correctly triggered once:

DarkLiteOne_1-1626767794631.png

The failure is expected as we do a "THROW" within the SQL Stored procedure on the server.

DarkLiteOne_2-1626767916043.png

 

 

However, we do notice on the SQL server that the stored procedure is called TWICE. This only happens when the SPROC fails, when it is successful it is only triggered once. It seems to be related to this issue

 

After analyzing this further the problem is easily replicated without using PowerApps and simply doing a "Test" run within the flow. The same issue happens and we can see on the server that the SPROC is ran TWICE on failure. 

 

This must be a bug in the action "Execute stored proedure (V2)". 

 

Categories:
I have the same question (0)
  • eric-cheng Profile Picture
    5,171 on at

    Hi @DarkLiteOne ,

     

    Someone may have a better answer but I found this online here.  This is for Logic Apps but should be the same for Power Automate.

     

    ericcheng_1-1626770530044.png

     

    --------------------------------------------------------------------------
    If I have answered your question, please mark my post as a solution
    If you have found my response helpful, please give it a thumbs up

  • DarkLiteOne Profile Picture
    234 on at

    Thanks for your help but it's not a timeout issue.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 632

#2
Haque Profile Picture

Haque 458

#3
Valantis Profile Picture

Valantis 357

Last 30 days Overall leaderboard