0

I have just installed SQL Server 2016 Service Pack 1 Express and SSMS 2017 using the Basic option from the installation wizard. After installation, I wanted to change the mode of authentication from Windows Authentication to SQL Server Authentication. I was following the steps given in the link: Change Server Authentication Mode from docs.Microsoft.com. Upon clicking OK after changing the authentication mode, I am getting the following error:

The EXECUTE permission was denied on the object 'xp_instance_regwrite', database 'mssqlsystemresource', schema 'sys'. (Microsoft SQL Server, Error: 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
------------------------------

What to do?

4

1 回答 1

0

After you rebooted are you logged back in as sa with the correct password for the sa account? If you are then try:

GRANT EXECUTE ON xp_instance_regwrite TO [user]

(user being the user you are logged in as).

There was also an answer posted here: https://www.sqlservercentral.com/Forums/Topic1176585-391-1.aspx

于 2018-02-06T16:05:59.940 回答