Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

How to pass server name in a sql query

Hello,

 

I have developed a dashboard which contains  the following tables:

 

Key measure

Sql Agent Job

Sql Agent Jobs History

Sql Agent Jobs Steps

SQL Agent Job Steps History

 

My client is very statisfy about the dashboard.

 

Now the client would like to produce the same dashboard but for two other servers.

I have made some preliminary tests and when I connect to the two other servers, my SQL scripts (those I use in Power BI) works perfectly.

 

So, I have few options to add two other servers.

I could make a copy of the three tabs so at the end I will have nine tabs (3 tabs per server).

 

The other option I have in mind will be to create a Server Slicer and use it as a parameter (if it is possible to do so), the pass the server name to the SQL Script and produce a dashboard but only for the selected server.

 

So is it possible to create a list of server as Parameter, to link this parameter to a slicer and to pass the server name into the SQL Script and most important, how do we do that.

 

Thank in advance for your help.

 

 

1 Reply