Login to Microsoft SQL Server Error: 18456

前端 未结 21 2050
醉话见心
醉话见心 2020-11-27 10:11

I am getting this error while trying to connect to the SQL Server.

Microsoft SQL Server Error: 18456

Can anybody tell me what th

相关标签:
21条回答
  • 2020-11-27 10:52

    you can do in linux for mssql change password for sa account

    sudo /opt/mssql/bin/mssql-conf setup

    The license terms for this product can be downloaded from
     http://go.microsoft.com/fwlink/?LinkId=746388 Jump Jump
    and found in /usr/share/doc/mssql-server/LICENSE.TXT.
    Do you accept the license terms? [Yes/No]:yes
      Setting up Microsoft SQL Server
    Enter the new SQL Server system administrator password:  --Enter strong password
    Confirm the new SQL Server system administrator password: --Enter strong password
     starting Microsoft SQL Server...
     Enabling Microsoft SQL Server to run at boot...
    Setup completed successfully.
    
    0 讨论(0)
  • 2020-11-27 10:53

    If you change a login user credential or add new login user then after you need to log in then you will have to restart the SQL Server Service. for that

    GO to--> Services

    Then go to SQL Server(MSSQLSERVER) and stop and start again

    Now try to log in, I hope You can.

    Thanks

    0 讨论(0)
  • 2020-11-27 10:54

    SQL Server connection troubleshoot

    In case you are not able to connect with SQL Authentication and you've tried the other solutions.

    You may try the following:

    Check connectivity

    • Disable Firewall.
    • Run PortQry on 1434 and check the answer.

    Check the state

    • Try to connect with SSMS or sqlcmd and check the message.
    • State 1 is rarely documented but it just mean you don't have the right to know the true state.
    • Look at the log file in the directory of SQL server to know what is the state.

    The State 5

    What ? my login doesn't exist ? it's right there, I can see it in SSMS. How can it be ?

    The most likely explanation is the most likely to be the right one.

    The state of the login

    • Destroy, recreate it, enable it.
    • reset the password.

    Or...

    "You don't look at the right place" or "what you see is not what you think".

    The Local DB and SQLEXPRESS conflict

    If you connect with SSMS with Windows authentication, and your instance is named SQLEXPRESS, you are probably looking at the LocalDb and not the right server. So you just created your login on LocalDb.

    When you connect through SQL Server authentication with SSMS, it will try to connect to SQLEXPRESS real server where your beloved login doesn't exist yet.

    Additional note: Check in the connection parameters tab if you've not forgotten some strange connection string there.

    0 讨论(0)
提交回复
热议问题