About Me

Barking, Essex, United Kingdom
MCITP DBA ,MCITP BI & Oracle OCP 11G

Tuesday, November 10, 2015

SA accounts security consideration

The T-SQL to disable SA account

ALTER LOGIN sa DISABLE;

To check the status of the SA account..

SELECT name,is_disabled from sys.server_principals where name='sa'

To rename the sa login

ALTER LOGIN sa WITH NAME = [xxxx];

This sql can be used to lookup the name for the SA account based on the SID.


SELECT * FROM sys.syslogins WHERE sid = 0x01

No comments:

Post a Comment