SQL Server – Disable and enable SA account

Received request to disable all sql server SA account from DEV, UAT and PROD, Can we modify permissions of SA account ? answer is not possible. We cant modify permissions of sql server SA account. SA account can be disable or enable using script or sql server management studio.

How to disable or enable sql server SA account ?

To disable and enable SA account, you should be logged in using window account having SA permission.

Example to Disable and enable SA account

Use below script to disable and enable sql server SA account
ALTER LOGIN sa Disable
ALTER LOGIN sa Enable

Leave a Reply

  

  

  


8 − 6 =