无法在SQL Server中更改身份验证模式:Microsoft SQL Server,错误:229

时间:2018-02-06 15:55:32

标签: sql-server ssms sql-server-2016-express ssms-2017

我刚刚使用安装向导中的基本选项安装了SQL Server 2016 Service Pack 1 Express和SSMS 2017。安装后,我想将身份验证模式从 Windows身份验证更改为 SQL Server身份验证。我正在按照链接中给出的步骤进行操作:Change Server Authentication Mode from docs.Microsoft.com。在更改身份验证模式后单击确定,我收到以下错误:

  

对象'xp_instance_regwrite',数据库'mssqlsystemresource',架构'sys'上的EXECUTE权限被拒绝。 (Microsoft SQL Server,错误:229)

TITLE: Microsoft SQL Server Management Studio
------------------------------

Alter failed for Server 'SHASHANK-PC\SQLEXPRESS'.  (Microsoft.SqlServer.Smo)

For help, click: http://go.microsoft.com/fwlink?
ProdName=Microsoft+SQL+Server&ProdVer=14.0.17213.0+((SSMS_Rel).171128-2020)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Alter+Server&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

------------------------------

The EXECUTE permission was denied on the object 'xp_instance_regwrite', database 'mssqlsystemresource', schema 'sys'. (Microsoft SQL Server, Error: 229)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=13.00.4001&EvtSrc=MSSQLServer&EvtID=229&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------

怎么办?

1 个答案:

答案 0 :(得分:0)

重新启动后,您是否以sa帐户的正确密码重新登录? 如果你那么试试:

GRANT EXECUTE ON xp_instance_regwrite TO [user]

(用户是您登录的用户)。

此处还有一个答案:https://www.sqlservercentral.com/Forums/Topic1176585-391-1.aspx