Cannot connect remote SQL Express server (Linux) to power BI using DirectQuery - sql-server

Dear stackoverflow community,
I have a problem using Direct Query connect in Power BI. I have an SQL Express server running on a remote server with a Linux operating system. I connect to this server using a VPN. I can connect to this SQL server with my local MS SQL Express installation no problem. I can also import the data to my local Power BI desktop installation using Get Data>SQL Server>Import.
However when I try to use Direct Query, it fails after executing for a while and setting up the Direct Query connections. I receive the following Error Message:
"A network-related or instance-specific error occurred while
establishing a connection to SQL Server. The server was not found or
was not accessible. Verify that the instance name is correct and that
SQL Server is configured to allow remote connections. (provider: Named
Pipes Provider, error: 40 - Could not open a connection to SQL
Server);The network path was not found. The exception was raised by
the IDbConnection interface."
It's also interesting that it appears like something is loading in the fields pane
I feel it could be a problem with allowing remote connections in the Linux remote MS SQL Express Server, but have found no way of allowing this in Linux. On my Windows installation it's no problem.
I'm really excited to solve this issue and start building my dashboard. But I need a live connection for that...
Thank you for your time reading this and your replies in advance.

This was solved by using the 64 bit version Power BI from the microsoft store and not adding the portnumber when making the sql connection. I recommend admins not to delete this as finding this solution wasn't too straightforward.

Related

Unable to refresh Power BI from Azure Virtual Machine connected to an on-premises SQL

I posted this issue in the Power BI community and Azure community but no answer at all. I hope someone can give me some light. I apologize if it's not the right forum but I am really stuck and I do not know how to solve it...
I am developing a report for a customer in Power BI. The source is a on-premises SQL Database. The customer gave me credentials and open the SQL Database just for my Static IP. From my computer or any other physical computer through my VPN works fine.
The customer doesn't want to install a Gateway in the server or any other computer, so as alternative, I thought using a Azure Virtual Server that I can automatically start and stop once a day just for the update of the report.
This Azure VM is connected with a OpenVPN Client to my VPN. So it's the same static IP (I've tested it).
When I open the report in the VM and go to Power Query, all the queries against the SQL Database work fine but the ones that have some Merge step. It breaks when the merge is expanded:
*DataSource.Error: Microsoft SQL: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
Details:
DataSourceKind=SQL
DataSourcePath=app.sciomac.com;SciomacProd
Message=A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
ErrorCode=-2146232060
Number=53
Class=20*
The source of the queries are:
*QUERY1
Source = Sql.Databases("app.sciomac.com"),
SciomacProd = Source{[Name="SciomacProd"]}[Data],
dbo_Calls = SciomacProd{[Schema="dbo",Item="Calls"]}[Data]
QUERY2
Source = Sql.Databases("app.sciomac.com"),
SciomacProd = Source{[Name="SciomacProd"]}[Data],
dbo_Videos = SciomacProd{[Schema="dbo",Item="Videos"]}[Data]*
Individually both queries connect to the SQL Database without any problem, but when I make a merge step the query breaks when expanded.
I have the same issue if I tried to connect to a PostgreSQL db
Any idea how to solve it?
Thank you for your help.
Miguel

Unable to connect to another connection in SSAS Tabular

I have a very weird issue with SSAS Tabular connecting to a SQL Server source database. I've spent almost the entire day on this, and searched online in various ways to find a helpful answer, but none of the suggestions solved this mysterious problem for me.
It used to work fine, but I tried various connection settings (Windows vs SQL authentication, and different impersonation modes), but now I no longer can get it to work (even if I revert back to the previous bim file in source control).
When I process a table from the WORKSPACE database (through SSMS), it works. But when I process a table from the DEPLOYED database (still through SSMS), it does NOT work.
The connection I am using is:
-SQL Server Native Client 11.0
-Windows Authentication
-Impersonation mode of a Windows account (which has the appropriate permissions)
The source database is in a SQL Server database located on a different server (but in the same network).
I have searched everywhere online, but didn't find anything that could help me.
I have tried changing the connection driver (OLE DB Provider for SQL Server), and I have restarted the SSAS Tabular service.
The full error message I get when trying to process a table on the deployed database is:
Failed to save modifications to the server. Error returned: 'OLE DB or ODBC error: Login timeout expired; HYT00; A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.; 08001; Named Pipes Provider: Could not open a connection to SQL Server [5]. ; 08001.
A connection could not be made to the data source with the Name of 'DataWarehouse'.
'.
In fact, after I tried a second time to restart the SSAS Tabular service, the error message I get after attempting to process a table is slightly different:
Failed to save modifications to the server. Error returned: 'OLE DB or ODBC error: A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.; 08001; SSL Provider: The requested security package does not exist
; 08001; Client unable to establish connection; 08001; Encryption not supported on the client.; 08001.
A connection could not be made to the data source with the Name of 'DataWarehouse'.
'.
According to your description, it seems to be related to connection problem. You need to check whether corresponding SQL server service and SSAS Service is running(check server which contains "DataWarehouse" is running and can be connected). You could go to "SQL Server Configuration Manager " to restart them.
In addition, you also need to make sure your current windows credential can access this database(if you use window credential). And check whether this server enable remote connect.
Zoe

ODBC can connect to our SQLServer, but SQL Management Studio cannot

We have an older machine that hosts a bunch of test databases. It was working fine for years. One day a few months ago, we could no longer open SQL Admin on that machine. When you tried, you get the dreaded:
A network-related or instance-specific error occurred while
establishing a connection to SQL Server. The server was not found or
was not accessible. Verify that the instance name is correct and that
SQL Server is configured to allow remote connections. (provider: Named
Pipes Provider, error: 40 - Could not open a connection to SQL Server)
Note that we are running everything on this one machine. We are not trying to connect over the network from another machine. I tried variations on MS's page and on various SO threads on the topic:
the firewall is off
the server is running, as is the name service
it is configured for remote connections
we've rebooted it
Again, this was all working fine, and we changed nothing on that machine. I suppose a Win update may have occurred.
On a lark, today I tried making a new DSN to the same server, using SQL Client 11. It saw the server in the combo (took a while), and the test connection worked fine. But SQLSM still fails!
Does anyone know what connection type the Native Client would use, and what that driver uses to populate the server list?
My suspicion is that something is wrong with the named pipes service. If ODBC uses named pipes, then I'm a bit stumped.

SQL Server Alias stopped working

I have configured a SQL Server 2016 alias following this post and it was working, but suddenly it stopped working.
Error message:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - The wait operation timed out.) (.Net SqlClient Data Provider)
I created the alias using the SQL Server Configuration Manager and created it in the 32 and 64bit:
When I go to the Protocols for SQL Server Express, all of them are enabled, thus TCP/IP is enabled. Also, the SQL Server Browser service is running.
Looking at the system log there is no relevant message about it, so I'm a bit lost about what could be causing it to stop working. My OS is Windows 10 Pro.
Would you have any clues to help me solve it? Thanks for any help
Check that the SQLEXPRESS instance's port number hasn't changed, which is likely after a reboot or service restart.
Regarding the use of instance aliases, this is pretty much useless if you're also using dynamic ports for this very reason. To me it's more cumbersome to maintain this configuration than it is to maintain a connection string in your program IMHO.

Cant connect to the Azure SQL Database

For the past month I have been using Microsoft SQL Server Management Studio tool to connect to my database which created on the Azure portal. Recently I received updates from Microsoft related to Microsoft Visual Studio. After I installed these, I can't connect to my SQL database (previously it was working fine). Update History Screenshot I attached the screenshot of recent updates (which I installed) and the error message for your view.Error Message
Please help to solve this issue.
note: I am an SQL beginner, so I don't know many technical things related to tools, so please keep your answers to my level, Thanks!
Update: Error Message
TITLE: Connect to Server
Cannot connect to abcxyz.database.windows.net.
ADDITIONAL INFORMATION:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53)
The network path was not found
This error means that you tried to create a connection to an endpoint and you were expecting a acknowledgment from sql server, however, that acknowledgement did not occur. This means that you are either blocked by your own network, a network in route, or the endpoint network (which all three could be your own if, running locally). I would start by pinging that server ip address and seeing what you come up with.
that problem solved automatically, when I tried to keep connecting. really I don't know what was the problem..thanks for ur reply guys.

Resources