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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Set sql server connect...
Power Automate
Unanswered

Set sql server connection Dynamically

(0) ShareShare
ReportReport
Posted on by 8

In the power automate flow, I need to establish multiple connection with the sql database Dynamically(on the Run time). Is there any way to establish connection in power automate flow on the run time?

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

    Hi @HarshYadav ,

     

    Can you elaborate what you are trying to achieve?  Do you need to connect to different SQL servers at runtime?

     

    You can create multiple connections and use that within the same flow.  Similarly, you should be able to use multiple SQL actions to connect to different SQL servers within the same flow.

     

    --------------------------------------------------------------------------
    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

    Connect on LinkedIn

  • HarshYadav Profile Picture
    8 on at
    Hello Eric,
    Thanks for your reply.
    As we have a multi tenant environment and we have multiple database for respective customer. So we need to establish the connection to multiple database on the same power automate flow. But the case is, its not pre decided that when the power automate will run for which customer(Database). So the requirement is to create the database connection dynamically. Is there anyway to Achieve that?
  • eric-cheng Profile Picture
    5,171 on at

    Hi @HarshYadav ,

     

    When you say multiple databases, I am assuming you mean multiple databases across multiple SQL servers right?

     

    I don't really know if there is a feasible option to achieve what you want to do that can remain both scalable and maintainable.

     

    Assuming you don't want to write any APIs using code, one approach which I haven't tested and honestly don't know if it will work would be to create linked servers and then use Power Automate to execute stored procedures against linked servers.  You would need to pass in parameters to act as the linked server name etc.  Again, no idea if it will work in the context of Power Automate.

     

    --------------------------------------------------------------------------
    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

    Connect on LinkedIn

     

  • HarshYadav Profile Picture
    8 on at

    @eric-cheng, Multiple database on the single sql server.

  • HarshYadav Profile Picture
    8 on at

    Yes, I don't want to write API using code.

  • Casper Profile Picture
    41 on at

    Has anyone figured out a way around this?

  • olivierSOFILEC Profile Picture
    3 on at

    Do you know a way to create a connection on a SQL server that can use the differents bases of this server?
    And, in a flow, change dynamicly the data base (not the serveur, juste data base).

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard