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 / How to handle ALM when...
Power Automate
Suggested Answer

How to handle ALM when a flow needs SQL connections to DEV, QA, and PROD simultaneously?

(1) ShareShare
ReportReport
Posted on by 4

Hi everyone,

I’m working on a Power Automate ALM scenario and I’m trying to understand the correct approach for moving my flows through DEV → QA → PROD without manually updating connectors or hard‑coding SQL details.

Here’s my setup:

Flow #1
This flow inserts a row into SQL tables on all three SQL servers: DEV, QA, and PROD.
Each server has its own server name and database name.
I created three SQL connections (Windows auth) and added them to my solution, so they appear as three connection references.

Flow #2
This flow reads from SQL using a connection that should depend on the current environment.
Since I built it in DEV, the “Get rows” action currently uses the DEV SQL connection reference, along with the DEV server name and database name.


What happened when I imported the solution into QA (managed):

  • Flow #2 still pointed to the DEV connection reference
  • The Get Rows action still contained the DEV server name and database name
  • I know server and database values can be handled using environment variablesbut I do not understand how to switch the connection reference itself during import
  • Since I had all 3 SQL connection references in the flow, I couldn’t repoint them all to QA during import
  • Updating the SQL action in QA created an unmanaged layer, which I want to avoid

  •  

My main questions:

1. How many SQL connection references do I actually need?

  • Right now, I have 3 (DEV, QA, PROD). Is that correct?
  • Should I have one per server? One per environment? Something else?

2. What is the correct ALM approach when:

  • One flow needs to use all three SQL servers at the same time
  • Another flow should automatically switch the SQL connector when moved between environments

3. How should I manage:

  • Multiple SQL connection references
  • Server name and database name (environment variables?)
  • Deployment across DEV/QA/PROD
  • Avoiding unmanaged layers after import

Any best practices, examples, or explanations would be greatly appreciated.

Thank you!

Categories:
I have the same question (0)
  • Suggested answer
    11manish Profile Picture
    2,430 on at
    For standard ALM:
     
    Use:
    • ONE SQL connection reference per logical connector
    • Environment variables for server/database names
    • Connection remapping during import
    Avoid:
    • separate DEV/QA/PROD connection references inside the same deployable flow
    • post-import editing
    • unmanaged layer creation
    Only use multiple SQL connection references when a single flow genuinely needs to connect to multiple SQL servers simultaneously.
  • Suggested answer
    Valantis Profile Picture
    5,479 on at
     
    To answer your questions directly:

    Flow 1 (needs all 3 servers simultaneously): 3 connection references is correct, one per server.

    Flow 2 (should switch per environment): 1 connection reference only. Rebind it to the correct SQL connection during import using a deploymentSettings.json file. This avoids any post-import editing and no unmanaged layers.

    For server name and database name: yes, use environment variables. Set the Current Value per environment after import, that's not a customization and won't create unmanaged layers.

    To generate the deployment settings template: pac solution create-settings --solution-zip solution.zip --settings-file deploymentSettings.json
    Then populate the ConnectionId for QA/PROD and pass it during import.
     

     

    Best regards,

    Valantis

     

    ✅ If this helped solve your issue, please Accept as Solution so others can find it quickly.

    ❤️ If it didn’t fully solve it but was still useful, please click “Yes” on “Was this reply helpful?” or leave a Like :).

    🏷️ For follow-ups  @Valantis.

    📝 https://valantisond365.com/

    💼 LinkedIn

    ▶️ YouTube

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