Renamed sa account


Job details

Name: Renamed sa account
Platform: Sqlserver
Category: Security
Premium package: Security and compliance package
Description: Checks if the standard ‘sa’ login account (principal_id=1 and sid=0×01) has been renamed.
Long description: Checks if the standard ‘sa’ login account (principal_id=1 and sid=0×01) has been renamed. ‘sa’ is the original login account created during installation, and with sysadmin privileges.
Version: 1.2
Default schedule: 25 1 1 *
Requires engine install: Yes
Compatibility tag: .[type=‘instance’ & databasetype=‘sqlserver’]/instance[maj_version > ‘2005′ & hasengine=‘YES’ & eng_inst_priv = 0 & (engine_edition = ‘Microsoft SQL Server’ engine_edition = ‘Azure SQL Managed Instance’)]

Parameters

Name Default value Description
return status 1 Return status value (ALARM – 2, WARNING – 1, or OK – 0) when the “sa” login account is not renamed.
new login name change_me If parameter “rename sa login” is set to “YES“ the alert will rename “sa” login account to this parameter value.
rename sa login NO If set to “YES“ the alert will rename “sa” login account using “new login name” parameter value.
history threshold 365 The maximum number of days to keep statistics for in the historic tables.

Job Summary

SELECT name FROM sys.server_principals WHERE sid = 0x01

Implementation Details

Job Configuration and Dependencies

Reporting and Maintenance

Security and Compliance

Tables and Indices

Name Purpose
dbw_renamed_sa_account_info Stores the current “sa” name usage value and history date
dbw_renamed_sa_account_histr Aggregates the historical data regarding the “sa” account name changes
Name Table Applied Purpose
dbw_disabled_sa_idx01 dbw_renamed_sa_account_info Optimizes queries on history date
dbw_disabled_sa_h_idx01 dbw_renamed_sa_account_histr Enhances performance for historical data retrieval

This monitoring job is crucial for maintaining security standards and ensuring that database administration practices adhere to prescribed security policies.