[Turn] 'user' sa 'login failures. The user and trusted SQL Server connection is not associated

2011-09-25  来源:本站原创  分类:Database  人气:106 

JSP project to connect the database to do today, the result error, error reason: 'user' sa 'login failures. The user and the trusted SQL Server connection is not associated 'today on the online search for a long time or get it working, and finally through the Internet and a summary of the book, specific methods are: 1: Open SQL Server Manager Manager! On the left to find the 'safety' right click select 'New', "Login" pops up a dialog box, enter the login name of your login number, select 'SQLSERVER authentication' and enter a password, can the 'users next login password for account 'cancel Click on' User Mapping ', the right to select mapped in the database, and in front of check! in the following column' db-owner 'and' public 'in front of check and then click on' state 'in the right column select "grant", "Enable", the two usually is the default, but if the default is not to be changed over these two, or Rom's! click' OK '. 2: find SQL Server in the left column above, right-click pop-up menu, select "Properties" command pops up a dialog box, click the "Security" in the "Server Authentication" you select "SQL SERVER and WINDOWS identity authentication mode "in front of check! remember this step is very important, if not this step you can never log on success! and then click" OK "on it! 3: Restart the service can select the SQL SERVER Authentication Mode login a! results to find online all the way to or useless, and finally found on or in a hurry forget to start the server, the key moment, is not cool you do not learn from me ah remember: You must SQL2005 service restart to take effect. find several ways to and your reference

SQL Server2005 common errors and solutions

One problem, forget your Microsoft SQL Server 2005 login password for the sa

Solution: use windows authentication to log in, then the 'security' - 'login' - right-click 'sa'-' Properties', change the password click OK on it.

Second problem, has successfully connected to the server, but error occurred during the login process to take. (Provider: Shared Memory Provider, error: 0 - on the other end of the pipe without any process.) (Microsoft SQL Server, Error: 233)

Solution: Open the 'Programs' - 'All Programs' - 'Microsoft SQL Server 2005' - 'configuration tool' - 'SQL Server Configuration Manager' in the pop-up form, find the 'SQL Server 2005 Network Configuration', the 'MSSQLSERVER agreement' under the "Named Pipes" and "TCP / IP" start, and then restart the Microsoft SQL Server 2005 on it.

The three, can not open user default database. Login failed. User 'sa' login failures. (Microsoft SQL Server, Error: 4064)

Solution: use windows authentication to log in, then the 'security' - 'login' - right-click 'sa'-' Properties', the default database set to master, click OK on it.

Question four, sql server 2005 error 18452

Unable to connect to server Server: Msg 18452, Level 16, State 1
[Microsoft] [ODBC SQL Server Driver] [SQL Server] user 'sa' login failed. Reason: Not associated with trusted SQL Server connection associated with the cause of the error is because SQL Server uses the "only Windows" authentication mode, so users can not use SQL Server login account (such as sa) to connect, the solution is as follows

Setting allows the SQL Server log (basically this is useful)
Steps:
1. In Enterprise Manager, expand "SQL Server Group", right-click the name of the SQL Server server
2. Select "Properties"
3. Then select the "Security" tab
4. In the "Authentication", select "SQL Server and Windows"
5. OK, and restart the SQL Server service

Question 5, the user 'sa' login failures. The user and the trusted SQL Server connection is not associated.

Solution: Check your database authentication mode, windows and mixed mode, you need to select the SA login mixed mode.
Check your computer port 1433, 1434 data port is open

Manager for sql 2005 into the "safe "=="" user" == "double-click Users (pop-up properties dialog )=="" state" into the state enable, exit the manager to re-login (user authentication mode)

Namely: Right Database Properties dialog box, select the "Security" tab, select Server Authentication mode "SQL Server and Windows Authentication mode and then reconfigure the sa login information you can.

SQL SERVER 2005 using the sa login failed - prompt the user and is not associated trusted SQL Server connection error:
sa login failed, the user is prompted with trusted SQL Server connection is not associated solutions:
Open SQL Server Management Studio Express,
Right-click the server, select Properties (attributes), the pop-up window, click Security (safety) switch to the security panel,
The server authentication server authentication from windows authentication mode (windows user authentication mode)
Revised to Sql Server and Windows Authentication mode (Sql server and windows authentication mode), ok.
Open the security (safety) - logins (login name), right-select sa, choose properties (attributes), click on Status (Status) switch to the state panel, the Login (login) is set to Enabled (enabled).

If that does not just come to a last resort ... ...
Change the connection string to the server what the default is as follows:

Code:

Data Source=./SQLEXPRESS;

After change:

Code:

Data Source=localhost;

Transfer: http://blog.csdn.net/freefly123/article/details/3710152

相关文章