Course contentsShow
← Databases & SQL
Lesson 1583 of 1,95315. Database Security and GovernanceFree lesson

Managing Database Administrative Privileges

You will be able to create a split-privilege model for standard database management versus infrastructure maintenance.

In this lesson, you will learn how to design a split-privilege model that separates operational database management from underlying infrastructure maintenance to minimize your attack surface.

The Problem with "God-Mode"

In many environments, a "Database Administrator" (DBA) account is granted unrestricted access. This creates a single point of failure: if a DBA account is compromised, the attacker gains both the ability to manipulate sensitive business data and the power to reconfigure the physical server, storage, or network settings. To improve security, we must decouple Data-Layer Management from Infrastructure-Layer Maintenance.

Implementing the Split-Privilege Model

A split-privilege model creates two distinct "lanes" of administrative authority:

  1. Data Administrator (DBA_Role): This role has permissions restricted to the database engine. They can perform schema changes, manage user access, run backups, and monitor query performance. They have no access to the OS-level files, server configuration, or underlying hardware.
  2. Infrastructure Custodian (SysAdmin_Role): This role focuses on the "plumbing." They handle OS patches, disk volume management, storage optimization, and network security. Crucially, they lack the permissions to log into the database engine or query business data.

Conceptual Implementation:

-- Role for Data Management (Limited to DB Engine)
CREATE ROLE DataAdmin;
GRANT ALTER ANY TABLE, BACKUP DATABASE, SELECT ON sys.dm_exec_sessions TO DataAdmin;

-- Role for Infrastructure Custodian (Limited to OS/Service)
-- No database-level granular permissions granted
CREATE ROLE InfrastructureCustodian;
-- Permissions here are handled via OS groups, not SQL

Why This Matters

By separating these roles, you prevent "privilege escalation" attacks. If a malicious actor compromises an infrastructure account, they cannot export the database or dump internal tables. Conversely, a compromised DBA account cannot wipe the server logs or modify the physical disk configuration to hide their tracks. This architecture enforces the Principle of Least Privilege—a concept we previously explored—by ensuring that no single human identity possesses the keys to both the kingdom’s data and the fortress’s walls.

Key Takeaway: A split-privilege model enhances security by separating data-management tasks from infrastructure-maintenance duties, ensuring that no single administrative account holds absolute control over both the content and the container.