On Premise Gateway for SQL issue in Power BI but not Power Apps
-
On Premise Gateway for SQL issue in Power BI but not Power Apps
Posted by Larry Heimendinger on March 3, 2020 at 2:06 pm-
I installed SQL Server on a domain server and also installed the SQL On=Premise connector.Ā I successfully added a connector to Power Apps to this, and it then also appeared in Power Automate.Ā I use Windows authentication for SQL, and when I create the connector, that is a choice I can make (Azure, SQL or Windows authentication).Ā I then have access to the database and tables via Apps and Automate.
However, when i try to connect to the same on-premise connector via Power BI desktop, things are different.Ā Ā
When I choose Get Data->Database, SQL is an option that I choose.Ā It prompts me for Server (I have used the server name as well as the IP address, on my LAN of course) and the table name as well as leaving it blank.Ā If I clear the credentials and enter the wrong ones (on purpose) I get an invalid user name message.Ā However, under all of the above conditions with correct Windows credentials I get the following message:
Details: “An error happened while reading data from the provider: ‘Could not load file or assembly ‘System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. Either a required impersonation level was not provided, or the provided impersonation level is invalid. (Exception from HRESULT: 0x80070542)'”
FYIĀ I am a global admin for the on-premise domain, created the SQL install and database, and am also an O365 global admin and have a premium Power BI license.
Really need to get this solved, so any help much appeciated.
——————————
Larry Heimendinger
larry@techevents.com
Redmond WA
—————————— -
Lutz Bendlin
MemberMarch 4, 2020 at 8:08 AM
Creating connectors via PowerApps/PowerAutomate is a little frowned upon. Can you create the connector directly on the Power BI On-Premise gateway?Note that gateways are VERY picky about the EXACT spelling of the connection details. For example if your gateway uses FQDN and your Power BI Desktop connection uses IP address then they will not work together
——————————
Lutz
——————————
——————————————- -
Lutz-
Thanks for the reply.Ā But I am still puzzled.Ā Let me explain why:
- You asked if I could create the connector directly on the Power BI On-Premise Gateway.Ā The answer is no I could not using either Power BI Desktop or Online.Ā
- Desktop
- When I try Get Data, the only thing I can seemingly choose is SQL Server.
- When i choose that, I am prompted forĀ server name and optionallyĀ database name,Ā I have tried using the FQDN (Windows server name) as well as the LAN IP address.I have entered the database name exactly as it appears in SQL as well as left it blank.Ā In all four combinations, I get the same error message which I posted in the original on this thread.
- I was expecting to have some indication that an on-premise connector had been installed but nothing I could find indicates that.
- Online
- Under connectors, when I click create a new connection and choose databases, only Azure appears.Ā There seems to be no indication of an on-premise connector I have installed.
- And of course if I choose Azure SQL I am referred to the desktop version.
- Desktop
So the first bit of help I need is to have explained to me the steps to connect via the On-Premise Gateway in Power BI.Ā If I am doing the right thing, then, why the error.
Your response puzzled me as well.Ā Why are connectors n Apps/Automate frowned upon?Ā I need access to the SQL data to use those. Should I have tried first in Power BI with no custom connector yet in Apps/Automate?
The documentation kinda sucks on this, so your help is much appreciated.
——————————
Larry Heimendinger
larry@techevents.com
Redmond WA
——————————
——————————————- - You asked if I could create the connector directly on the Power BI On-Premise Gateway.Ā The answer is no I could not using either Power BI Desktop or Online.Ā
-
Lutz Bendlin
MemberMarch 5, 2020 at 8:23 AM
here’s the process:
– create an on-premise gateway – preferably a cluster with multiple machines in different geographic locations
– on the Power BI Service go to Settings…Manage Gateways
– create the connections to your on-premise data sources and assign access to the developers that should consume these connections (NOT the end users!)
– now use these connections in your Power BI datasets (scheduled refresh settings) and in your Power Apps/Power Automate applicationsNote:Ā Gateway maintenance SUCKS.Ā There is no sorting of connections (CTRL-F is your friend), there is no indication of connection ownership (we have a rule that the connection owner name has to be part of the connection name), and the frequent gateway software updates WILL break your gateway.Ā The load distribution is infantile, it requires the main cluster member to be online at all times,Ā Connectors may disappear if one of the cluster members is unreachable.Ā I could go on and on but this is a family friendly show here, i think.
——————————
Lutz
——————————
——————————————- -
Lutz
Thanks.Ā I was able to make some headway/Ā I found Manage Gateways on the gear wheel drop down and my connector showed up there.Ā I was even able to add another copy of it directly there with a different name.Ā This was in Power BI online.
I then went to Power BI desktop to use the connector and see if I could create a report.
This time, when I did Get Data and chose SQL, I used the name of one of the Gateway connectors and got prompted for type of authentication and credentials.Ā Hurrah I thought I’m on my way.
No such luck.Ā I got the same error messageĀ
Details: “An error happened while reading data from the provider: ‘Could not load file or assembly ‘System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. Either a required impersonation level was not provided, or the provided impersonation level is invalid. (Exception from HRESULT: 0x80070542)'”
as I got from my first attempt and posting of the original message.
Since my gateway showed up I guess just by installing it and using my O365 credentials it was probably intact when I first started.Ā Maybe the issue is with the SQL database itself, a permissions/security setting?
I would point out how incredibly bad the UI is on this.Ā In the online version, Manage Gateways is incredibly obscure.Ā And in the desktop version, it appears not at all.Ā Get Data->Database should give reference to this, not have it be a scavenger hunt game.Ā Ā
Ugh
——————————
Larry Heimendinger
larry@techevents.com
Redmond WA
——————————
——————————————- -
Lutz Bendlin
MemberMarch 6, 2020 at 8:00 AM
You’re holding it wrong.Ā šĀ There is no need for the gateway on the Power BI desktop, since your desktop machine already sits on-premise.Ā (The purpose of a gateway is to allow Azure access to your on-premise data sources)Gateways are only used on the Power BI service, and on the other Power suite apps (Power Apps. Power Automate etc)
Your error message is unrelated to the gateway, you need to investigate and fix it independently.
——————————
Lutz
——————————
——————————————- -
Of course that makes sense because Apps & Automate have both their development and execution platforms as web based while Power BI is localized to create reports.Ā Ā
I had already shifted gears yesterday to investigate the SQL server itself as a culprit.Ā I have been playing with permissions and settings but have not hit on a solution yet.
Thanks for helping with this so far.Ā I will post successful results (hopefully) when I have found them.
——————————
Larry Heimendinger
larry@techevents.com
Redmond WA
——————————
——————————————- -
Steen Schlüter Persson
MemberJune 24, 2020 at 6:15 AM
Hi,I know it has been a while since there have been any update on this thread, but did you ever got any further with the problem?
I’m struggling with the same problem when connecting to a on premise SQL server from Power BI Desktop. I have been around many ideas like running Power BI as Administrator, checking .NET version, using IP adress instead of servername etc., but still with very little luck.Ā
I can make it work most of the times when I work on our DEV SQL server, but I can’t figure out what it is that makes that any different from some of the other servers where it doesn’t work. Furthermore, it also seems to cause troubles running a Scheduled Refresh for that Power BI app on our on-premise Report Server. Here I constantly get an error connecting to datasource (null), and my guess is that it’s related to the problem connecting from desktop.ĀRegards
——————————
Steen Schlüter Persson
Head of BI
——————————
——————————————- -
I never did get it fully working; it was a test project that got put on hold and then canceled, so I never got back to it.Ā I suspect that our experiences are similar in that it is server specific, but did not get around to trying other ones.Ā Thanks for posting.
——————————
Larry Heimendinger
larry@techevents.com
Redmond WA
——————————
——————————————-
Larry Heimendinger replied 6 years, 7 months ago 1 Member · 0 Replies -
-
0 Replies
Sorry, there were no replies found.
The discussion ‘On Premise Gateway for SQL issue in Power BI but not Power Apps’ is closed to new replies.