Saturday, November 22, 2008

Login Problem In Microsoft SQL Server

Many of you may have faced this problem I think.You have created a new account using management studio and now trying to log in using the new account.This sounds easy and should be easy - but what most of the beginners see???

Login failed for user 'username'. The user is not associated with a trusted SQL Server connection. (Microsoft SQL Server, Error: 18452)

This is a kind of problem which dont get old.Here is the solution.

Actually the SQL server has been configured to operate in "Windows Authentication Mode (Windows Authentication)" and doesn't allow the use of SQL accounts.Just change the Authentication Mode of the SQL server from "Windows Authentication Mode (Windows Authentication)" to "Mixed Mode (Windows Authentication and SQL Server Authentication)".

Now how to do this:-
1.In SQL Server Management Studio Object Explorer, right-click the server, and then click Properties.
2.On the Security page, under Server authentication, select the new server authentication mode, and then click OK.
3.In the SQL Server Management Studio dialog box, click OK to acknowledge the requirement to restart SQL Server.

Now you need to restart the SQL Server:-
1.In Object Explorer, right-click your server, and then click Restart. If SQL Server Agent is running, it must also be restarted.

Thats all.Please put your valuable comments and feel free to add any important information regarding this topic.

No comments: