Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

Is it posible to invoke an stored procedure directly from the ConnectionString?

Hi all,

 

Is it posible to invoke an stored procedure directly from the ConnectionString?

This is an example of my Connection String:

- Data Source=SERVERNAME;

- User Id=myUsername;Password=myPassword;

 

Is it posible to do the following?

Data Source=SERVERNAME;

User Id=myUsername;Password=myPassword;Invoke='EXEC SP_PROCEDURE'

 

Thank you.

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

When connecting to Database like SQL SERVER, you can find the connector in Power BI Desktop,

Select Get data->SQL SERVER-> enter server name/database name, expand "Advanced option", enter the"EXEC stored procedure name" in the "SQL Statement" window.

Capture15.JPG

Reference:

https://community.dynamics.com/crm/b/crmchap/posts/utilising-sql-server-stored-procedures-with-powerbi

Execute SQL Server Stored Procedure With User Parameter In Power BI

 

After clicking on "ok", it will pop out a window where you can select authetication to connect to the database.

Capture16.JPG

 

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-juanli-msft
Community Support
Community Support

Hi 

Is this problem sloved? 
If it is sloved, could you kindly accept it as a solution to close this case?
If not, please let me know.
 
Best Regards
Maggie
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

The connection string would be

  1. let  
  2.   
  3. Source = Sql.Database("DHRUVIN\SQLEXPRESS""WMS_201", [Query="EXEC stored procedure "])  
  4.   
  5. in  
  6.   
  7. Source

But i don't see any method to write the password in the connection string, it is easy with a direct way as my last post shown.

 

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

When connecting to Database like SQL SERVER, you can find the connector in Power BI Desktop,

Select Get data->SQL SERVER-> enter server name/database name, expand "Advanced option", enter the"EXEC stored procedure name" in the "SQL Statement" window.

Capture15.JPG

Reference:

https://community.dynamics.com/crm/b/crmchap/posts/utilising-sql-server-stored-procedures-with-powerbi

Execute SQL Server Stored Procedure With User Parameter In Power BI

 

After clicking on "ok", it will pop out a window where you can select authetication to connect to the database.

Capture16.JPG

 

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.