Hello, I am trying to connect Netbeans with a database but I have the following error
Cannot establish a connection to jdbc:sqlserver://CRONOPIO:1433;databaseName=ppm using com.microsoft.sqlserver.jdbc.SQLServerDriver (Could not make TCP/IP connection to host CRONOPIO, port 1433. Error: "Connection refused : connect Check the connection properties, verify that there is an instance of SQL Server running on the host and accepting TCP/IP connections on the port, and verify that there are no firewalls blocking TCP connections on the port.".)
My SQL Server has no instance, but the database exists and my port is enabled:
The only thing that occurs to me, since I tried several things, is that perhaps not having an instance name, the empty field is what generates the error. Greetings.
You must go to the configuration manager of
SQL Server
.Where you choose the network configuration
SQL Server
and the protocols of your instance where the list of protocolsTCP/IP
will appear, select a window will appear and choose the addresses tabIP
.Then you assign the ports
TCP
and the dynamic portsTCP
the port 1433 of your respective IP address, restart your server. After this try to connect again with your database. If it helped you, don't forget to approve my answer. Thank youI recently worked with SQLServer in Spring Boot on startup with Jetty and it gave me the same error. My solution was the following, go to the window:
and all that is with
Habilitado
select the ComboBox and place it inSI
. Note: If you don't know which IP addresses are associated with your instance configuration, putSI
them all without exception.