Because port 1433 of sqlserver is vulnerable to attacks, the port number is changed to 1533, but the server port is changed and the problem occurs.
1. Why can't I connect to the client using the Enterprise Manager?
2. InProgramAccessing the database on the server always says "sa Login Failed ".
At first, I thought the SA password was changed. After checking, I confirmed that the SA password was not changed. It must have been changed after the port was changed, and the connection and login methods should be modified.
Solution
1. Use notepad to open the hosts file (usually in c: \ winnt \ system32 \ drivers \ etc ).
Add a record corresponding to the IP address and server name, for example:
Your machine IP myserver
2. You can also configure it in the SQL Server Client Network utility:
Program> Microsoft SQL Server> Client Network Tools
Here we can see which protocols are enabled on the client. In general, we also need to enable the named pipe and TCP/IP protocol.
Click TCP/IP protocol and select "properties" to check the default connection port settings of the client, as shown in.
The port must be the same as that of the server and be modified to 1533.
Reconnect in Enterprise Manager.
3 when setting the connection string in the program, it should be similar to "Server = 192.168.6.10, 1533; database = .... "