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 / Managing SQL Connector...
Power Apps
Unanswered

Managing SQL Connector DB when deploying Solutions across different env.

(0) ShareShare
ReportReport
Posted on by 84

Hi,

 

I have an app that I would like to manage across three environment's. (DEV-TEST-PROD) My app is deployed in solution form and connects to my database via flows as well as directly in my app by the SQL connector. I have a DB for each environment and would like to switch to the correct DB when I deploy the solution to each respective environment. I have been able to successfully do that for the flows using an environmental variable. However, I cant seem to find a way to change from one DB to the other for the connections that directly reference the DB in my PowerApp. Surely, this must be possible. Does anyone have any advice?

Categories:
I have the same question (0)
  • ANB Profile Picture
    7,223 Super User 2025 Season 2 on at

    Hi @DeeCiii15 ,

    Yes it is possible. Are you doing your deployment manually (export and import) or by using Ci/CD pipeline?

     

    For manually, you need to first create connection in target environment: E.g. Go to Test environment and the create SQL server connection using the db credentials that you have for test environment (Test db). Same applies to production also. Then while manually importing the solution to test environment, it will ask you to choose connection that you have created. Same applies for prod also.

     

    For CI/CD pipeline, you need to mention the connection reference details with the connection ID in deployment setting file. Please check this https://learn.microsoft.com/en-us/power-platform/alm/conn-ref-env-variables-build-tools for prepopulate the deployment setting file.

     

    ------------------------------------------------------------------------------------------------------------------------------

    I hope this helps.

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs up.

    Thanks,

    ANB

     

     

     

  • DeeCiii15 Profile Picture
    84 on at

    Hi,

     

    I tried doing that, but it seems only applicable to the SQL references that I use in my flows that are tied to the app. It seems that the SQL references that are used directly in the app (i.e. FILTER SQL_TABLE) are only maintained in the PowerApp itself. 

  • ANB Profile Picture
    7,223 Super User 2025 Season 2 on at

    Hi @DeeCiii15 , For PowerApps apps, you need to use the connection which is meant for the specific environment and when you deploy that to target environment, the connection which will be already created in target environment will pick while importing. I mean you need to pick it manually.

     

    Flow used connection reference.

    ------------------------------------------------------------------------------------------------------------------------------

    I hope this helps.

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs up.

    Thanks,
    ANB

  • DeeCiii15 Profile Picture
    84 on at

    Sorry if I am missing something here. What I'm confused about is the creating connection in the target env. When I create an SQL connection in the environment (outside of my PowerApp), I'm not asked for a server or database name. How will it know what database to use? Below is all it asks for.

    DeeCiii15_0-1696532508680.png

     

    Secondly, I currently have a solution deployed to my environment. The PowerApp is connected to my DEV db, but there is no connection existing in the environment for this SQL connection. The only reference I can find is directly in the app. The highlighted SQL connection below is in my env, but seems to be only related to the SQL connections existing in my Power Automate flows based on the dependencies. 

    DeeCiii15_1-1696532681516.png

     

     

     

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 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard