No sa password failed to integrate Windows Authentication logon resolution _MSSQL

Source: Internet
Author: User
Tags management studio sql management studio

If Windows Integrated authentication is used at SQL logon, the login box will display the login in the format "machine name \ Current system username", and the login and password are grayed out and user input is not allowed.

Understand that colleagues have just modified the server's machine name, so the "new machine name \ Current system user name" is displayed in the SQL login box. You should know that Windows Integrated authentication can log on because the user name is already included in the SQL login name. The original username was recorded in SQL at the time of SQL installation, and if the machine name is changed, the new machine name \ Current system username must not log on correctly.

Online see someone said that can be used osql–s instancename–e (input in the Command Line window) and then to modify the sa password, after some attempt to find that is a talk, because the premise of this approach is required Windows integration identity to be able to log in.

Later on Microsoft's official website to see a document, as long as in the SQL startup parameters with a "-M" option (remember to-M before the semicolon), and then need to restart the SQL service, again with SQL Management Studio Windows Integrated authentication Log on.

-M represents a single user login. Attentive readers may query: Just add-M, but the final adoption of Windows Integrated authentication, theory and the previous use of Sqlos–s instancename–e what is the difference?

This is a very professional question. At that time I did not understand, I feel a little strange, but the result is this, there must be a reason. It was later found on Microsoft's official web site.

Start the instance of SQL Server in Single-user mode by using either The-m or-f options. Any member of the computer ' s local Administrators group can then connect to the instance of SQL Server as a The sysadmin fixed server role.

Probably means that when the-M or-f parameter is added to the startup parameters of the SQL, any user of the local Administrators group of the computer can log in to SQL as sysadmin. Believe that the reader sees this place to understand. This doesn't actually check to see if the logged-on user exists in SQL, just checking that the user is a user in the administrative group of the local computer.

Well, I'm sure there's no need to be too cumbersome, just to remind readers: after modifying the sa password, remember to remove the original-m from the SQL startup parameter, and then restart the SQL service.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.