An error occurred while writing the Java Connection database today: TCP/IP connection to host localhost via port 1433 failed. Error: "Connection refused:connect. Verify the connection properties and check that the instance of SQL Server is running on the host, accept TCP/IP connections on this port, and make sure that the firewall does not block TCP connections to this port. ".
Baidu went down and said yes to enable TCP/IP through SQL Server Configuration Manager
So open the window Start menu → All programs →microsoft SQL Server 2008→ Configuration tool →sql Server Configuration Manager
The result was that TCP/IP for the MSSQLServer instance could not be found, and then the SQL Server Configuration Manager that enabled the service found TCP/TP
computer right → manage → select SQL Server protocol →tcp/ip→ right-click Enable
Note: The default fixed port for TCP is 1433, if you set the fixed port manually, empty the value of the TCP dynamic port
Configuring SQL Server Ports