Forum Discussion
Connect Linked SQL Server to Power BI Desktop
- 2 years ago
In your connection definition try running a SQL query against the linked server.
In your connection definition try running a SQL query against the linked server.
- Humanoidhuman2 years agoFrequent 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!- lbendlin2 years agoSuper 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.
- Humanoidhuman2 years agoFrequent Visitor
Thank you for that. However, as you can see below, the linked servers do not fall under the any database. For this purpose I am unable to discern what to enter as a database when linking to the SQL server