login failed for user 'sa'. The user is not associated with a trusted SQL Server connection. (Microsoft SQL Server, Error: 18452) in sql 2008

后端 未结 7 2653
长发绾君心
长发绾君心 2021-01-03 22:12

I use windows 7 ultimate. I can login with windows authentication mode but SQL authentication with user sa doesn\'t work. sa user is enabled. So wh

相关标签:
7条回答
  • 2021-01-03 22:20
    1. Click on Start menu > Programs > Microsoft Sql Server > Configuration Tools

    2. Select Sql Server Surface Area Configuration.

    3. Now click on Surface Area configuration for services and connections

    4. On the left pane of pop up window click on Remote Connections and Select Local and Remote connections radio button.

    5. Select Using both TCP/IP and named pipes radio button.

    6. click on apply and ok.

    Now when try to connect to sql server using sql username and password u'll get the error mentioned below

    Cannot connect to SQLEXPRESS.

    ADDITIONAL INFORMATION:

    Login failed for user 'username'. The user is not associated with a trusted SQL Server connection. (Microsoft SQL Server, Error: 18452) ation To fix this error follow steps mentioned below

    1. connect to sql server using window authentication.

    2. Now right click on your server name at the top in left pane and select properties.

    3. Click on security and select sql server and windows authentication mode radio button.

    4. Click on OK.

    5. restart sql server servive by right clicking on server name and select restart.

    Now your problem should be fixed and u'll be able to connect using sql server username and password.

    Have fun. Ateev Gupta

    0 讨论(0)
  • 2021-01-03 22:20

    I was stuck in same problem for many hours. I tried everything found on internet.

    At last, I figured out a surprising solution : I had missed \SQLEXPRESS part of the Server name: MY-COMPUTER-NAME\SQLEXPRESS

    I hope this helps someone who is stuck in similar kind of problem.

    0 讨论(0)
  • 2021-01-03 22:22

    I faced the very same error when I was trying to connect to my SQL Server 2014 instance using sa user using SQL Server Management Studio (SSMS). I was facing this error even when security settings for sa user was all good and SQL authentication mode was enabled on the SQL Server instance.

    Finally, the issue turned out to be that Named Pipes protocol was disabled. Here is how you can enable it:

    Open SQL Server Configuration Manager application from start menu. Now, enable Named Pipes protocol for both Client Protocols and Protocols for <SQL Server Instance Name> nodes as shown in the snapshot below:

    Note: Make sure you restart the SQL Server instance after making changes.

    P.S. I'm not very sure but there is a possibility that the Named Pipes enabling was required under only one of the two nodes that I've advised. So you can try it one after the other to reach to a more precise solution.

    0 讨论(0)
  • 2021-01-03 22:25
    1. Go to services.msc from run prompt.
    2. Restart the services of SQL server(MSSQLSERVER)
    3. Restart the services of SQL server(SQLEXPRESS)
    0 讨论(0)
  • 2021-01-03 22:26

    Go to Start > Programs > Microsoft SQL Server > Enterprise Manager

    Right-click the SQL Server instance name > Select Properties from the context menu > Select Security node in left navigation bar

    Under Authentication section, select SQL Server and Windows Authentication

    Note: The server must be stopped and re-started before this will take effect

    Error 18452 (not associated with a trusted sql server connection)

    0 讨论(0)
  • 2021-01-03 22:26
    1. First make sure sa is enabled
    2. Change the authontication mode to mixed mode (Window and SQL authentication)
    3. Stop your SQL Server
    4. Restart your SQL Server
    0 讨论(0)
提交回复
热议问题