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