The SQL Server account is disabled.

Source: Internet
Author: User

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!

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.