cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ginko
Helper III
Helper III

How to get past on-premise gateway limit, Execute a SQL Query (v2)?

Does anyone know how to attach an SQL query to execute OnSelect with ANY PowerApps control that doesn't involve the 'Execute a SQL query (v2)' step in Power Automate?

 

I need a button control in my app to execute a SQL query that averages integer entries collective over time. The average will change frequently so this SQL query will need to be executed on each new entry, which brought me to using a Power Automate flow that simply triggers the query.

 

I've now aware that the 'Execute a SQL query (v2)' step in Power Automate does not support on-premise gateways, which I am bound to use by company IT rules. Therefore using Power Automate feels dead in the water.

 

Ginko_0-1647554280381.png

 

Thank you in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
Pstork1
Dual Super User
Dual Super User

First, if your SQL server is on-premises then a on-premises gateway is required whether you are using Power Apps or Power Automate.  But Power Automate definitely supports connections that make use of an on-premises gateway.  However, you can execute a query against an on-premises SQL server whether you have a gateway or not.  The workaround would be to build your query as a stored procedure in the SQL server.  You can execute a stored procedure in an on-premises SQL server using Power Automate. However,  you can't do it from Power Apps directly.  You have to call a flow since only flows have an action to execute a stored procedure.



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

View solution in original post

2 REPLIES 2
ChristianAbata
Community Champion
Community Champion

hi @Ginko unfortunately it's not possible



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA
Pstork1
Dual Super User
Dual Super User

First, if your SQL server is on-premises then a on-premises gateway is required whether you are using Power Apps or Power Automate.  But Power Automate definitely supports connections that make use of an on-premises gateway.  However, you can execute a query against an on-premises SQL server whether you have a gateway or not.  The workaround would be to build your query as a stored procedure in the SQL server.  You can execute a stored procedure in an on-premises SQL server using Power Automate. However,  you can't do it from Power Apps directly.  You have to call a flow since only flows have an action to execute a stored procedure.



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

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (2,537)