SQL Server Administration
Overview
SQL Server administration covers the tasks required to install, configure, monitor, and maintain a SQL Server environment.
- Installation & Configuration
- Security Management
- Backup & Recovery
- Performance Optimization
- High Availability & Disaster Recovery
Installation & Configuration
Use the SQL Server Installation Center or command‑line options for silent installs.
After installation, configure the server settings via sp_configure or the SQL Server Configuration Manager.
Security & Auditing
Implement the principle of least privilege using roles and permissions.
- Create logins:
CREATE LOGIN [app_user] WITH PASSWORD='StrongP@ssw0rd'; - Map to database user:
CREATE USER [app_user] FOR LOGIN [app_user]; - Grant role:
EXEC sp_addrolemember 'db_datareader', 'app_user';
Enable SQL Server Audit to capture security‑relevant events.
Backup & Restore
Schedule regular full, differential, and transaction‑log backups.
Restore sequence:
Performance Tuning
Monitor key metrics with sys.dm_exec_query_stats, sys.dm_os_wait_stats, and SQL Server Profiler.
Use the Database Engine Tuning Advisor to generate index recommendations.
High Availability
Choose from Always On Availability Groups, Failover Cluster Instances, or Log Shipping based on business needs.
- AGs: Automatic failover, readable secondary replicas.
- FCI: Shared storage, Windows Server failover clustering.
- Log Shipping: Simple, asynchronous standby.
Monitoring & Alerts
Set up SQL Server Agent jobs for routine checks and configure alerts for critical errors.