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 Apps / How to handle SQL conn...
Power Apps
Suggested Answer

How to handle SQL connection change from Dev to Prod after Power Apps deployment?

(1) ShareShare
ReportReport
Posted on by 3
Hi everyone,
I have a Power Apps application connected to SQL tables in the Dev environment. I’m deploying the app from Dev to Prod using a managed solution (via Azure DevOps or manual import).
After deployment, I want the app in the Prod environment to connect to the Prod SQL database instead of the Dev one.
Could someone please explain:
  • How the SQL connection reference should be managed during deployment?
  • Do we need to manually create a new SQL connection in the Prod environment and map it?
  • Is there a recommended best practice to automate or streamline this (especially when using Azure DevOps pipelines)?
Thanks in advance for your help!
I have the same question (0)
  • Suggested answer
    wolenberg_ Profile Picture
    1,476 Super User 2026 Season 1 on at
    Hello @PK-31101107-0 , To switch SQL connections from Dev to Prod after deploying a Power Apps solution, use connection references and environment variables. These allow you to dynamically map the correct SQL connection in each environment without modifying the app itself.
     
     

    Answering your questions:

    1. How should the SQL connection reference be managed during deployment?  

    Use connection references inside your solution. These act as placeholders that can be mapped to actual SQL connections in each environment. When deploying to Prod, you simply rebind the connection reference to the correct SQL connector in that environment.

    2. Do we need to manually create a new SQL connection in the Prod environment and map it?  

    Yes, the SQL connection must exist in the Prod environment. You’ll need to manually create it once, then map the connection reference to it during solution import. After that, the app will use the Prod SQL connection automatically.

    3. Is there a recommended best practice to automate or streamline this (especially with Azure DevOps)?  

    Yes. Use Power Platform Build Tools in Azure DevOps. These tools let you:

      Export the solution from Dev.

      Use a deployment settings file to define connection reference mappings and environment variable values.

      Import the solution into Prod with the correct SQL connection and configuration—fully automated.

     
    References:

    🔗 Power Platform Best Practices – Connection References Guide

    🔗 How to work with connection references

    🔗 Microsoft Learn – Pre-populate connection references and environment variables   


    If this helped or could help others in the community, feel free to give it a like or a kudo — it helps surface useful answers for everyone!


     
     

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard