Enable, Disable or Rename login SA in SQL Server
You also can’t drop the login SA:
You can disable the login SA:
ALTER LOGIN sa DISABLE
GO
…or enable it:
ALTER LOGIN sa ENABLE
GO
You can rename SA login (renaming will not change the default SID which is 0×01):
ALTER LOGIN sa WITH NAME = [new_name];
To check the name of a login when you know the SID, run the following query:
SELECT * FROM sys.syslogins WHERE sid = 0x01
No comments:
Post a Comment