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 Apps / Deploy solution which ...
Power Apps
Unanswered

Deploy solution which contains SQL Server connection through pipeline

(1) ShareShare
ReportReport
Posted on by 2

We have:


  • 3 SQL Server Databases: DB Dev, DB Test, DB Production

  • 3 Power Platform environments: PP Dev, PP Test, PP Production

  • Each Power Platform environment has an SQL connection targeting the database corresponding to the environment type.



  •  
  •  

We developed a Power Apps solution in the PP Dev environment that includes:


  • Canvas apps communicating with DB Dev via a reference connection

  • Power Automate flows communicating with DB Dev via a reference connection

  • A reference SQL Server connection pointing to DB Dev



  •  
  •  
 

The PP Dev environment has a pipeline enabling automated deployment to PP Test and PP Production.

 

Since the pipeline will deploy managed solutions, how can we ensure that the solution in the PP Test environment targets the DB Test database and the solution in PP Production targets the DB Production database?

Do we need to create all 3 SQL Server connections (DB Dev, DB Test, DB Production) in the PP Dev environment and switch the reference connection to DB Test before deploying to PP Test, and then switch to DB Production before deploying to PP Production?

 

Or are there alternative approaches? If so, what are they?

I have the same question (0)
  • Verified answer
    Alexiozo Profile Picture
    7 on at
    Hi,

    In your DEV environment, start by remove all SQL datasource in your canvas app.
    After then, always in your canvas app, enable general setting "Automatically create environment variables when adding data sources" and only add one SQL table. Two environments variables would be generated.
    So you can disable the setting before add another SQL Server tables.
    You can publish your changes and test your app.
    Make sure that your flows (Power Automate) use SQL Server connection reference.
     
    During the deploy process, make sure to select the DB Test (case deployment to PP Test environment) or DB Production (case deployment to PP Production environment) from the SQL Connection.
     
    So you don't need to create 3 SQL Server connections (DB Dev, DB Test, DB Production) in the PP Dev environment.
     

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard