cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jacschZA Frequent Visitor
Frequent Visitor

SQL setup - Direct Query

Hi,

 

We are sruggling with getting a Direct Query Connection to a SQL database on premis. We can complete a LOAD of data from the same SQL database, but when using Direct Query for the exact same Database and using the same SQL username, we are hit by the below. Any ideas?

 

"

  1. 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: SQL Network Interfaces, error: 25 - Connection string is not valid);The parameter is incorrect. The exception was raised by the IDbConnection interface"



Jacques

1 ACCEPTED SOLUTION

Accepted Solutions
v-cherch-msft Super Contributor
Super Contributor

Re: SQL setup - Direct Query

Hi @jacschZA 

Please check if below post could help

https://community.powerbi.com/t5/Power-Query/Schedule-Refresh-doesn-t-work-because-of-port-issues/m-...

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
4 REPLIES 4
v-cherch-msft Super Contributor
Super Contributor

Re: SQL setup - Direct Query

Hi @jacschZA 

I cannot reproduce the same issue.I would suggest you update to latest version of Power BI Desktop ,please follow the instructions in the article below to troubleshoot this connection error.
https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/troubleshoot-connecting-to-th... 

Please check if below post could help.

https://community.powerbi.com/t5/Desktop/Can-t-connect-to-SQL-server/td-p/196782

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
jacschZA Frequent Visitor
Frequent Visitor

Re: SQL setup - Direct Query

@v-cherch-msft  thanks for the response!

 

What we ended up trying and what worked was specifying the server name with 'TCP:' as a prefix, and then instead of using a port number at the end of the server name, used the actual name, and this seems to work now for both Direct Query and with the Gateway.

 

image.png

 

Any idea why this may have been the case?

 

Jacques

v-cherch-msft Super Contributor
Super Contributor

Re: SQL setup - Direct Query

Hi @jacschZA 

Please check if below post could help

https://community.powerbi.com/t5/Power-Query/Schedule-Refresh-doesn-t-work-because-of-port-issues/m-...

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
jacschZA Frequent Visitor
Frequent Visitor

Re: SQL setup - Direct Query

@v-cherch-msft Thats it, the comma instead of the double colon works as well.

 

Dont understand what it does differently, but it solves my query.

Helpful resources

Announcements
Back to School Contest

Back to School Contest

Engage and empower students with Power BI!

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Summit Australia 2019

Summit Australia 2019

Travel to Melbourne and network with thousands of peers!

Top Ideas
Users Online
Currently online: 356 members 3,622 guests
Please welcome our newest community members: