90

My problem is I cannot login into SQL Server after I've created a user. The user creation is successful, since the new user is listed under security/logins.

How to solve this issue ???

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

marc_s
  • 704,970
  • 168
  • 1,303
  • 1,425
ksg
  • 3,637
  • 5
  • 47
  • 92
  • 1
    Possible duplicate of [SQL Server 2008 can't login with newly created user](http://stackoverflow.com/questions/1719399/sql-server-2008-cant-login-with-newly-created-user) – bob esponja Feb 17 '17 at 08:37

3 Answers3

152

SQL Server was not configured to allow mixed authentication. Here are steps to fix:

  1. Right-click on SQL Server instance at root of Object Explorer,
  2. click on Properties.
  3. Select Security from the left pane.
  4. Select the SQL Server and Windows Authentication mode radio button, and
  5. click OK.
  6. Open up Services and restart the SQL Service (SQLEXPRESS) Windows service.
Vijay Nirmal
  • 4,076
  • 4
  • 21
  • 52
NG.
  • 5,439
  • 2
  • 17
  • 30
142

Try setting your authentication mode to mixed mode. Your server does probably not accept logins using sql server accounts.

  1. Open properties
  2. Go to "Security"
  3. Select "SQL Server and Windows Authentication mode"
stb
  • 3,145
  • 2
  • 15
  • 24
  • Thankyou very much for your wonderful answer.It works correctly.I've no more doubt how to give permission to a user to access only particular database... – ksg Jul 24 '12 at 07:42
  • You pointed to actual error that is Mixed mode needs to be on and that saved my hours... Thank you... – Jenish Rabadiya Mar 02 '18 at 09:48
  • Here is a step by step guide: https://help.blacknight.com/hc/en-us/articles/212511129-Set-MS-SQL-to-mixed-mode-Authentication-on-Windows-Cloud-VM – Pouya BCD Nov 13 '18 at 14:37
  • 5
    This requires the service to be restarted after committing the changes. – Chris Cruz Jun 20 '19 at 17:44
  • Yep, go into the services app and restart the sql server service – Nick Turner Sep 07 '21 at 14:52
29

Right click Server for properties...

enter image description hereproperties

Halis Yılboğa
  • 772
  • 9
  • 12