YourSqlDba
YourSqlDba is an open-source maintenance and automation tool for Microsoft SQL Server, developed by Maurice Pelchat. Written entirely in T-SQL, it is distributed as a single script that creates a database named YourSqlDba on the SQL Server instance. It automates backups, integrity checks, index and statistics maintenance, cleanup, diagnostics, and reporting. It can also delegate selected database-management operations to non-sysadmin users under explicit controls.
Start here: What is YourSqlDba? provides the canonical project overview. Who YourSqlDba Is For explains the needs that led to the project and how its approach serves different types of database administrators.
Documentation française : YourSqlDba (fr)
Summary
The project provides a single installable script that creates a database named YourSqlDba on the target SQL Server instance. That database contains stored procedures, functions, and supporting objects used to schedule and run backups, integrity checks, index maintenance, metrics collection, and diagnostics.
YourSqlDba is designed around SQL Server components that DBAs already use: T-SQL, SQL Server Agent, and Database Mail for reporting. Its default jobs provide a direct starting point, while their schedules and calls to Maint.YourSqlDba_DoMaint remain visible and configurable.
Why use YourSqlDba
- It combines backups, integrity checks, statistics updates, selective index maintenance, cleanup, and reporting in one maintenance workflow.
- It limits unnecessary work by spreading suitable operations across runs and maintaining indexes according to their condition.
- It scales from the default two-job setup to database groups with different actions and schedules through SQL Agent job steps and database-name filters.
- Detailed reporting and
Maint.HistoryViewexpose the commands, messages, execution context, status, and errors produced by maintenance. - Its restore-based mirroring can validate backup chains, maintain recoverable copies on another instance, and prepare a side-by-side SQL Server migration.
QuickLinks
- Version history and release notes: Releases
- Canonical project overview: What is YourSqlDba?
- Project README: README.md
- Who YourSqlDba is for: Introduction
- Installation and first-time setup: Installation guide
- Main maintenance entry point:
Maint.YourSqlDba_DoMaint - Delegated database management: Controlled backup, restore, database refresh, cleanup, and application-upgrade operations for selected non-sysadmin users
- Mirror and migration preparation: Restore-based mirroring, migration testing, and failover
- Job reporting and diagnostics:
Maint.HistoryView, Database Mail, and performance diagnostics - Latest install script: YourSQLDba_InstallOrUpdateScript.sql
How to get started
- Read the installation guide.
- Run
YourSQLDba_InstallOrUpdateScript.sqlon the SQL Server instance where you want to install YourSqlDba. - Complete the SQL Server Agent and Database Mail setup described in the installation guide.
For a shorter project overview, see the repository README.