03-27-2025 06:13 AM - edited 03-27-2025 06:37 AM
Hi All,
I am connecting Remote SQL Server Instance using JDBC Driver, I have enabled TCP/IP and Setup the Firewall Rule. When i am querying the instance i am getting this error:
(com.microsoft.sqlserver.jdbc.SQLServerException) The TCP/IP connection to the host 192.168.x.x, port 1433 has failed. Error: "Connect timed out. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall."
Here is my code:
03-27-2025 11:21 AM
192.168.x.x is a local ip address, it will not work in databricks notebook. First try to find your public ip address and try to connect through SQL Server management studio or .udl file. If it works, then you can use the same ip in notebook.
03-28-2025 04:12 AM
I am able to connect using is ip address through another laptop where ssms is installed and i have tested the connection using udl file, i am able to connect. i think this is not the problem.
03-28-2025 05:06 AM
Yes, that will work because you are on the same local network. To connect from the outside network, you have to use the public ip address.
03-27-2025 09:31 PM
If you want to access a local SQL server, you'll need a Private Link to access the server. If it's on your own local machine, that's likely not possible. Creating a VPN to your machine is a unique problem, and you would be better off using a VM or a PAAS SQL database as the source.
03-28-2025 04:13 AM - edited 03-28-2025 04:14 AM
Thank You for the reply but the solution should be on-prem ssms or any other rdbms direct connection with azure databricks.
Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!
Sign Up Now