"User SA logon failed, this user is not associated with a trusted SQL server connection" error Solution

Source: Internet
Author: User
Tags microsoft sql server 2005 management studio microsoft sql server management studio sql server management sql server management studio

If you encounter a problem, the problem may be different. You can try the following solutions. Maybe you may have set it wrong. If you configure it a little bit, it will be OK, and there is nothing complicated. My efficiency is very low, so I am not able to draw pictures and texts. Sorry.

 

1. Set SQL Server Configuration Management

(1) start SQL Service: SQL Server Configuration Management-> SQL Server 2005 service-> SQL Server (sqlexpress)-> right-click to start

 

(2) Enable the TCP/IP protocol: SQL Server Configuration Management-> SQL Server 2005 network configuration-> sqlexpress protocol-> TCP/IP-> right-click to enable

 

(3) set TCP/IP attributes

SQL Server Configuration Management-> SQL Server 2005 network configuration-> sqlexpress protocol-> double-click TCP/IP-> ip address-> ipall-> TCP port to set the port number you want to set.

 

2. Set Microsoft SQL Server Management studio Express

(0) Start-> All Programs-> Microsoft SQL Server 2005-> Microsoft SQL Server Management studio Express

 

(1) Right-click the server in the left-side Navigation Pane and choose Properties> Security> Server Authentication> SQL Server and Windows Authentication mode.

 

(2) security in the left-side Navigation Pane-> login name-> select the user name you want to set, double-click-> General-> "default database" to change to the database you want to connect

 

(3) security in the left-side Navigation Pane-> login name-> select the user name you want to set, double-click-> server role-> select public and SysAdmin

 

(4) security in the left-side Navigation Pane-> login name-> select the user name you want to set, double-click-> User ing-> database role member identity-> select db_owner and public

 

(5) security in the left-side Navigation Pane-> login name-> select the user name you want to set, double-click-> Status-> whether to allow connection to the database engine, and select "authorize". log in, select "enable".

 

3. Check whether the connection port is enabled.

(1) Verification Method: Start-> Run-> cmd-> Telnet localhost port number.

(2) If a black screen is displayed, it is normal. If an error message is displayed, you must change the port number.

(3) change method: SQL Server Configuration Management-> SQL Server 2005 network configuration-> sqlexpress protocol-> double-click TCP/IP-> ip address-> ipall-> TCP port, set the port number you want to set.

 

4. Check the local hosts file

If the system is on drive C, the address is/Windows/system32/Drivers/etc/hosts under C.

If the system is not on disk C, the address is the same as the directory on the disk where your system is located.

Open hosts in notepad or another editor and add the following line:

127.0.0.1 localhost

Note that there are no symbols before, and if there is no special reason, delete other unannotated hosts lines.

 

5. Operating System network name problems

Related Article

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.