When I use intellij idea to connect to SQL Server 2005 through sqljdbc4.jar today, port 1433 cannot be connected.
Check whether the TCP port 1433 is listening and the firewall is blocked.
1. Enter the netstat-An command in the DOS console after "cmd" and check whether port 1433 is in the listening status. If not, perform step 4;
2. TCP/IP configuration:
2. 1. Enable TCP/IP under SQL Server Configuration Manager> SQL SERVER network configuration> MSSQLServer protocol;
2. Double-click TCP/IP. In the displayed window, click the "ip address" tab. Multiple IP addresses and numbers are listed below,
A. Find the corresponding IP address and configure it as follows:
Dynamic TCP port: left empty
TCP port: 1433
Activity: Yes
Enabled: Yes
B. Configure ipall as follows:
Dynamic TCP port: left empty
TCP port: 1433
Restart SQL Server Browser;
3. After all configurations are complete, restart or start the ms SQL Server service.
4. Activate TCP 1433 in the firewall you are using.