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 / Storage procedure to p...
Power Apps
Suggested Answer

Storage procedure to production

(1) ShareShare
ReportReport
Posted on by
Hello! 
 
I have a project where I am using storage procedure. 
 
When adding the storage procedures to the app it looks like this in test. I have added with envirement variables. A server name and a database name. 
 
 
I have to write a query like this to call the storage procedure: 
 
'SQL-DB-PowerPlantRegister-006-T'.dbospFilterPlantProduction({PlantIDs: varPlantIDs}).ResultSets.Table1
 
 
When I publish from test to prod it is still 'SQL-DB-PowerPlantRegister-006-T'. How can i make it go to prod? It works fine for tables
 
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,433 Super User 2025 Season 2 on at
     
    Do you mean a stored procedure?
     
    Is this in a Canvas App or Model Driven App or Power Page?
     
    Are you saying you have Environment variables defined, but you do not know how to use them?
     
    Here is a guide to help you create and leverage the environment variables for SQL in your app. What you wrote above looks like you hard coded it, not that you are using an Environment Variable(s) for Server or Database
     
     
    However, when you export your managed solution to you can put it into production you can change them on import of the solution
     
    When you imported into Production, did you remember to Change the environment variable values as part of the import?
     
    If this answers your question, Please mark as such and maybe a like.
     
  • Suggested answer
    stampcoin Profile Picture
    5,058 Super User 2025 Season 2 on at
    I think you have to manually rebind the SP reference with a new SQL Connection in prod.
    for long term, try to use ALM or Devops + Power platfrom CLI.
    here is the article you may know:

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

Last 30 days Overall leaderboard