User 'sa' login failed. The user is not associated trusted SQL Server connection '. Error code: 18452 Solution

Original: https://blog.csdn.net/wuxianwei/article/details/6330270

 

SQLSERVER 2005 using 'SQLSERVER authentication' to log on, the cause of the error is: 'user' sa 'login failed. The user is not associated trusted SQL Server connection '. Error code: 18452

SQL Server 18452 can not connect to the server login error Server: Msg 18452.

Level 16, State 1 [Microsoft] [ODBC SQL Server Driver] [SQL Server] user 'sa' login failed.

Reason: Not associated with a trusted SQL Server, generate the cause of the error is due to SQL Server using the "only Windows" authentication method, so users can not connect using SQL Server login account (such as sa).


Solutions are as follows

1, setting allows SQL Server Log steps:  

1. Log in to the windows log on, right-clicking on the name server SQL Server     

2. Select the "Properties"     

3. then select the "Security" tab     

4. Under the "Authentication", select "SQL Server and Windows", this time also need to set a password for the sa login.

5. Click OK, and then restart the SQL Server service.

2, if still not resolved, you can check whether the user is open SA:

1. Right-SA users, open the properties.

2. Select the "Status" tab, check Enable landed in.

SA is not enabled, it is easy to appear when the database started using often do not become known.

After setting, go to Control Panel, Administrative Tools, Services to find the SQL Server (MSSQLSERVER) stop, restart, and then restart the SQL, on it.

 

To set up additional users only need to log about the operation:

Specific method is:    

1: Open the SQL Server Manager Manager! Find the 'Security' right-click and select 'New', 'login' pop up a dialog box, enter your login number, select the login name 'SQLSERVER authentication' and enter the password, you can put 'next time the user on the left you must modify the login password 'cancel. click on' user mapping ', select the database to be mapped on the right, and check in front! in the following column' db-owner 'and' public 'in front of check. then click' state 'selected "granted", "enable", both general is the default, but if the default is not changed over these two have, or is Rom! click on the right bar' OK '.  

2: Find SQL Server, in the top left-hand column, right-click, the pop-up menu, select "Properties" command. A dialog box pops up, click "Security" in the "Server Authentication" below select "SQL SERVER and WINDOWS authentication mode," tick in front! Remember that this step is very important, if not this step you can never log on success! Then click "OK" on it!  

3: Restart the service you can choose the authentication mode SQL SERVER logged in! Just enter the user name and password to log a success! (Restart the service)
---------------------
Author: wuxianwei
Source: CSDN
Original: https://blog.csdn.net/wuxianwei/article/details/ 6330270
Disclaimer: This article is a blogger original article, reproduced, please attach Bowen link!

Guess you like

Origin www.cnblogs.com/hi3254014978/p/10984158.html