cancel
Showing results for 
Search instead for 
Did you mean: 
Databricks Free Edition Help
Engage in discussions about the Databricks Free Edition within the Databricks Community. Share insights, tips, and best practices for getting started, troubleshooting issues, and maximizing the value of your trial experience to explore Databricks' capabilities effectively.
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to connect to Azure database from Databricks free edition

mk222
New Contributor

Hello Databricks community,

I am trying to connect to Azure SQL DB from Databricks free edition, however ran into below error-

[FAILED_JDBC.CONNECTION] Failed JDBC on the operation: Failed to connect to the database. SQLSTATE: HV000

I have tried adding the firewall rules by allowing the IPs from different ranges as searched in internet and also gave range from 0.0.0.0 to 255.255.255.255 as well. Enabled Allow Azure services as well, but still getting the same error.

However I am able to access the same Azure SQL DB from local VS code with same credentials.

Can someone help me in resolving this issue and let me know if any specific IPs I need to add under Azure SQL server Firewall rule? Thanks in advance.

2 REPLIES 2

Niyojit
New Contributor II

Hi @mk222  can you share the SS of the JDBC connection code that you have written? it will clarify exact what issue you are facing?

Niyojit

Brahmareddy
Esteemed Contributor II

Hi  ,

How are you doing today? as per my understanding, this isn't an Azure firewall problem, so adding IP ranges won't help. That's also why opening 0.0.0.0 to 255.255.255.255 made no difference.

The real reason is on the Databricks side. Free Edition runs only on serverless compute, and its outbound access is locked down to a small set of trusted domains. So your connection to Azure SQL never actually leaves Databricks, and Azure never even sees the request. Your local VS Code works because your laptop has normal internet access.

Free Edition also doesn't allow private networking or stable outbound IPs, so there's no specific IP you can whitelist to fix this.

If you just need to test the connection, try it from a Databricks trial or paid workspace. There you can set up a Network Connectivity Config (NCC) to get stable egress IPs, and those are the IPs you'd add to your Azure SQL firewall rule. On Free Edition, the safer path is to stick with data that already lives inside Databricks, like Unity Catalog, sample datasets, or file uploads.

Official limitations doc for reference: https://docs.databricks.com/aws/en/getting-started/free-edition-limitations

Hope this helps!