Home > Database > Mysql Tutorial > How to deal with the sqlserver account being disabled

How to deal with the sqlserver account being disabled

小云云
Release: 2018-01-05 17:40:28
Original
2319 people have browsed it

What should I do if I find that all sqlsrver accounts have been accidentally disabled? Reinstall? This article mainly introduces how to deal with the disabled sqlserver account. Friends in need can refer to it. I hope it can help everyone.

First, you need to add a new account in Windows account settings. And add it to the administrator group, and then follow the following steps (note that /m is switched to single-user login mode. After the modification is completed, it is recommended to switch to multi-user mode):

(1) Go to Sqlserver's "Configuration Tools" SQL Server Configuration Manager", select "Sql Serve Service" to expand and stop all sql services

(2) Run cmd.exe as an administrator and execute the following command:


net stop sqlserver实例名(可以在Sql Serve服务下选择SQL Server(...)右键属性里找到)
  net start sqlserver实例名 /m(可以在Sql Serve服务下选择SQL Server(...)右键属性里找到)
Copy after login

(3) Next execute the sqlcmd command (if you don’t know how to use it, you can use Baidu sqlcmd), enter it in the following order, and press Enter to execute.


 create login kk with password='kk#12345';
  go
  sp_addsrvrolemember 'kk', 'sysadmin'
  go
Copy after login

(4) Repeat (2) and remove /m. After success, you can log in with your kk account, and then enable the account you want

Related recommendations:

sqlserver query to lock sql and unlock it

Explain the sqlserver paging query processing method

MYSQL synchronizes Sqlserver database data

The above is the detailed content of How to deal with the sqlserver account being disabled. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template