Solution to the "Sa logon Failure" problem after the server modifies the port

Source: Internet
Author: User

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 = .... "

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.