Resolves an issue where SQL Server does not have sysadmin permissions for all accounts and SQL Server Authentication is not enabled, and the SA account is not enabled

Source: Internet
Author: User
Tags microsoft sql server mssqlserver management studio sql server management sql server management studio

To resolve an issue that does not have SQL Server authentication enabled:

1. Run regedit and go to Registry Editor

2. Open: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL server\mssql14. Mssqlserver\mssqlserver (MSSQL14. MSSQLSERVER This section is selected according to the name of the actual installation instance, if there are multiple instances, open the one that needs to be set.

3. Locate the LoginMode entry with a value of 1 when only Windows authentication, and a value of 2 for mixed authentication.

Resolves an issue in which all SQL Server accounts do not have sysadmin permissions and the SA account is not enabled:

1. Stop the SQL Server service;
2. Run the command prompt with administrator, enter NET start [SQL Server service name]/m, start the SQL Server service with the/m parameter, and SQL Server enters single user mode;
3. Open SQL Server Management Studio, do not connect, click New query directly;
4. Use ALTER LOGIN SA to enable the SA account;
5. Modify the sa password using ALTER LOGIN sa with PASSWORD = N ' 123456 ';
6. Restart the SQL Server service.

Resolves an issue where SQL Server does not have sysadmin permissions for all accounts and SQL Server Authentication is not enabled, and the SA account is not enabled

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.