2.17 Ensure no login exists with the name 'sa'

Warning! Audit Deprecated

This audit has been deprecated and will be removed in a future update.

View Next Audit Version


The sa login (e.g. principal) is a widely known and often widely used SQL Server account. Therefore, there should not be a login called sa even when the original sa login (principal_id = 1) has been renamed.


Enforcing this control reduces the probability of an attacker executing brute force attacks against a well-known principal name.


It is not a good security practice to code applications or scripts to use the sa account. Given that it is a best practice to rename and disable the sa account, some 3rd party applications check for the existence of a login named sa and if it doesn't exist, creates one. Removing the sa login will prevent these scripts and applications from authenticating to the database server and executing required tasks or functions.


Execute the appropriate ALTER or DROP statement below based on the principal_id returned for the login named sa. Replace the <different_name> value within the below syntax and execute to rename the sa login.

USE [master]
-- If principal_id = 1 or the login owns database objects, rename the sa login
ALTER LOGIN [sa] WITH NAME = <different_name>;
-- If the login owns no database objects, then drop it
-- Do NOT drop the login if it is principal_id = 1

Default Value:

The login with principal_id = 1 is named sa by default.

See Also