Search This Blog

Wednesday 4 January 2017

SQL SERVER – DISABLE and ENABLE user SA

“How can I modify permissions for SA user? I tried to modify dbo user’s permission but now I am having problems.”

First of all, there may be no relation between dbo user and SA user. They are different and should be left separate.

Modifying the permission of SA user is not possible. However, SA can be disable or enabled using following script. Make sure that you are logged in using windows authentication account.

/* Disable SA Login */
ALTER LOGIN [sa] DISABLE
GO
/* Enable SA Login */
ALTER LOGIN [sa] ENABLE
GO

3 comments: