Windows帐户丢失,无论如何启用混合模式身份验证和登录SQL服务器? [英] windows account lost, anyway to enable mix mode authentication and login SQL server?

查看:49
本文介绍了Windows帐户丢失,无论如何启用混合模式身份验证和登录SQL服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,我认为它 以Active 目录问题开始,但我在这个论坛中没有找到AD的任何队列,这也是与SQL服务器相关的,所以我在这里发布。

First, i think it  began with an Active Directory issue, but i don't find any queue for AD in this forum and this is also SQL server related so i post it here.

我目前被困在我回答的一个令人尴尬的情况是:

i am currently stuck at an embarrassing situation i replied at:

https://social.technet.microsoft.com/forums/windowsserver/en-US/fc830e06-c82f-4b62-aa81-a8ecc75684c8/password-changed-安装后广告

好的,我对AD操作并不熟悉,但在降级AD时,为什么它不会只恢复到保存的本地计算机帐户在AD推广之前?为什么它只是创建一个新的本地机器管理员帐户没有太多的通知(也许向导
确实注意到我在某处,我不记得清楚)?它确实提示我输入新的本地机器管理员密码,我认为它只是重置了旧的本地机器管理员密码,但它创建了一个新帐户。

OK, i am not so familiar with AD operation, but when demoting AD, why it does not just revert to the local machine accounts saved before AD promotion? why does it just create a new local machine administrator account without much notices(maybe the wizard does noticed me somewhere, i don't remember clearly)? It does prompt me for a new local machine administrator password, i thought it just reset the old local machine administrator password, but it created a new account.

现在,sql server部分:我看到有人说我可以进行一些注册表更改以启用混合模式,并启用sa帐户。但它也说sa密码是由原来的sql server安装设置的,所以在通过注册表更改启用sa帐户后,
我怎么知道sa密码还是我可以重置它。

Now, the sql server part: I see some one said i can just make some registry change to enable mix mode, and enable sa account. But its also said that sa password was set by the original sql server installation, so after enabling sa account by registry change, how do i know the sa password or can i just reset it.

顺便说一句,我曾尝试将sql server服务帐户设置为新的本地计算机管理员帐户,但我仍然无法使用新的本地计算机管理员帐户登录sql server。

By the way, i had tried to set the sql server service account to the new local machine administrator account, but i still cannot login sql server with the new local machine administrator acount.



更新:无论如何,我重建了master,这与重新安装sql server几乎相同 


update:anyway, i rebuilt master, which is almost the same as reinstall sql server 

C:\Program Files \ Microsoft SQL Server \110\Setup Bootstrap\SQLServer2012> Setup / QUIET / ACTION = REBUILDDATABASE / INSTANCENAME = MSSQLSERVER / SQLSYSADMINACCOUNTS = guyu

minglaptop\Administrator / SAPWD = xxxxxxx

C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\SQLServer2012>Setup /QUIET /ACTION=REBUILDDATABASE /INSTANCENAME=MSSQLSERVER /SQLSYSADMINACCOUNTS=guyu
minglaptop\administrator /SAPWD= xxxxxxx

推荐答案

此处 你去了

Here  you go

https://blogs.technet.microsoft.com/sqlman/2011/06/14/tips-tricks-you-have-lost-access-to-sql-server -now-what /

https://blogs.technet.microsoft.com/sqlman/2011/06/14/tips-tricks-you-have-lost-access-to-sql-server-now-what/

/ *


SQLCMD -S< Server_Name \ Instance_Name>


您现在将以管理员身份登录到SQL Server。

You will now be logged in to SQL Server as an Admin.


3.一旦登录SQL使用SQLCMD的服务器,发出以下命令以创建新帐户或将现有登录添加到SYSADMIN服务器角色。

3. Once you are logged into the SQL Server using SQLCMD, issue the following commands to create a new account or add an existing login to SYSADMIN server role.


创建新登录并将该登录添加到SYSADMIN服务器角色:

To create a new login and add that login to SYSADMIN server role:


1>创建登录'< Login_Name>'与PASSWORD ='<密码>'


2> go


1> SP_ADDSRVROLEMEMBER'< Login_Name>','SYSADMIN'


2> go


要将现有登录添加到SYSADMIN服务器角色,请执行以下命令:

To add an existing login to SYSADMIN server role, execute the following:


1>  SP_ADDSRVROLEMEMBER'< LOGIN_NAME>','SYSADMIN'

1> SP_ADDSRVROLEMEMBER ‘<LOGIN_NAME>’,’SYSADMIN’

* /


这篇关于Windows帐户丢失,无论如何启用混合模式身份验证和登录SQL服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆