The SQL Server account is disabled.
What should I do if I find that all sqlsrver accounts are accidentally disabled? Is it reinstalled? No. Let's take a closer look at how Tom solves this puzzle step by step.
First, you need to add a new account in Windows account settings. Add it to the Administrator group and perform the following operations (note that/m is switched to the logon mode of a single user. After modification, we recommend that you switch to the multi-user mode ):
(1) Go to "SQL SQL SQL SQL SQL" and select "SQL Serve service" to stop all SQL services.
(2.exe run cmd.exe with the administrator ID and execute the following command:
Net stop sqlserver Instance name (you can select SQL Server (...) under the SQL Serve Service (...) right-click the attribute to find) net start sqlserver Instance name/m (you can select SQL Server (...) under SQL Serve (...) right-click the attribute to find)
(3) Next, run the sqlcmd command (you can use Baidu sqlcmd if you don't know how to use it), enter the command in the following order, and press enter to execute it.
Create login kk with password = 'kk #12345 '; go sp_addsrvrolemember 'kk', 'sysadmin' go
(4) Repeat (2) and remove/m. After successful logon, you can use the kk account to log on and enable the account you want.
Summary
The preceding section describes how to disable an SQL Server account!