Forum Discussion
Connect Linked SQL Server to Power BI Desktop
Background and Problem:
I am trying to create a Power BI report using data pulled from MSSQL server to which I have access. I am able to successfully connect to the primary SQL server using the regular connection steps. However, the dbo which has the data I need for this particular report lives on a linked server which is connected to my primary MSSQL server (I can access it on MSSQL management studio under the path >>'Server Objects' > 'Linked Servers' > 'My Linked server').
Anticipated Solution:
I am hoping to establish a connection to the linked server so I can access the dbo which has the data that i need for my report.
TIA!
In your connection definition try running a SQL query against the linked server.
6 Replies
- lbendlinSuper User
In your connection definition try running a SQL query against the linked server.
- HumanoidhumanFrequent Visitor
I tried running the a SQL script under advanced options while establishing connection to the server (picture below), but it asks for a database. For this I tried entering the linked server name as well but it doesn't establish connection saying authentication failed. I double checked my credentials and permissions all the server they seem to be all there.
I am also attaching the script I used below for referenceSELECT * FROM linkedserver.Runtime.dbo.History WHERE TagName = 'SysTimeSec' AND DateTime >= '2023-09-12 12:59:00' AND DateTime <= '2024-01-12 13:00:00'
Please let me know what I am doing wrong. TIA!- lbendlinSuper User
Use the initial server and database for the connection. The database is NOT optional, that dialog title is faulty.
Then run the query as you listed it.