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 / SQL connection is unin...
Power Automate
Answered

SQL connection is uninitialized

(0) ShareShare
ReportReport
Posted on by 100

when run "Execute SQL statement", it pop-up "SQL connection is uninitialized. Please double-check that the correct SQL connection has been specified and that it's used after 'Open SQL connection' and not after it's been closed".

how do I judge "sql connection" was closed? then I can open again, I don't want to open sql conection every time while "Execute SQL statement".

  • Verified answer
    Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    You do not need to use the Open SQL connection action at all.  You can also use a SQL connection string instead. You will not need to open a connection this way at all. Simply change the "Get connection by" value in the Execute SQL statement action to "Connection string" and pass the string. You can also have the string in a variable. This way you will never have the "SQL connection is uninitialized" error.

     

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

    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

     

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • lion Profile Picture
    100 on at

    Hi, thanks for the info, I loop an excel file (many records) to derive the data for "execute sql statement", per my understand, if use 'connect string' it will reopen connection every time, I think it will downgrade the performance.

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    There is no need to 'open' a connection at all. There's no such thing as a connection to a SQL server that is kept alive. I suggest you test it and see if you have any effect on performance. We never use the Open SQL connection action in our projects at all, regardless of how many items need to be iterated, and have never had any issues with performance.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 424

#2
11manish Profile Picture

11manish 328 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard