Use Code:— 🎁 First Order Exclusive: Take an extra 5% off any annual or lifetime product.
Back to Blog|Database Backupby Mahi Teja 9 min readOctober 02, 2026

How to Schedule SQL Server Express Backups Without SQL Server Agent

SQL Server Express has no SQL Agent, so it cannot schedule its own backups. Learn four working fixes: Task Scheduler with sqlcmd, Ola Hallengren, and a GUI tool.

How to Schedule SQL Server Express Backups Without SQL Server Agent

How to Schedule SQL Server Express Backups Without SQL Server Agent

SQL Server Express does not include SQL Server Agent, so it cannot run scheduled backup jobs or maintenance plans on its own. To schedule SQL Server Express backups without SQL Server Agent, you hand the scheduling to something outside SQL Server, such as Windows Task Scheduler, a script, or a backup tool, and let SQL Server do only the part it is good at: writing the backup.

That sounds simple until you realize that a backup schedule is more than a backup command on a timer. A schedule that runs but never deletes old files fills the disk. A schedule that fails quietly gives you a false sense of safety. A schedule that only writes to the same drive as the database disappears together with that drive.

This guide covers four working ways to do it, in the order most people try them. Every method is explained with the exact commands, the settings that cause silent failures, and a way to prove each backup actually worked.

The quick answer

If you wantUse
Free and you are comfortable with scriptsTask Scheduler + sqlcmd + Microsoft's sp_BackupDatabases (Method 1)
Free, with built-in verification and cleanupOla Hallengren's DatabaseBackup (Method 2)
One schedule for SQL Server plus other databases, with cloud copies and no scriptingA GUI backup tool such as DT Database Backup Wizard (Method 3)
If you only need the short version: create a stored procedure once, call it from a batch file with the -b switch, schedule that batch file in Task Scheduler, delete old files in the same batch file, and check msdb to confirm the backups really exist. The rest of this article shows how, and what goes wrong.

Why SQL Server Express cannot schedule its own backups

SQL Server Agent is the Windows service that runs scheduled jobs inside a SQL Server instance. Every paid edition ships with it. Express does not. Microsoft's own documentation states that without Agent you cannot schedule jobs or maintenance plans, and that the supported workaround is the combination of the sp_BackupDatabases stored procedure, the sqlcmd utility and Windows Task Scheduler.

Two consequences catch people out:

  • Maintenance Plans are gone too. The Maintenance Plan Wizard in SSMS builds jobs that run under SQL Server Agent. No Agent, no wizard-based backup schedule.
  • Nothing warns you. An Express instance will run for years without a single backup unless something outside SQL Server triggers one. There is no job history, no failure alert and no retry, because there is no job engine.
This is why so many Express databases, especially the ones sitting behind line-of-business applications, are discovered to have no recent backup on the day somebody needs a restore.

A note on Express limits that affect backups

Express has long been capped at 10 GB per database (data files, not the log), about 1 GB of memory for the database engine and one socket with up to four cores. Sources indicate SQL Server 2025 Express raises the database cap to 50 GB, so check Microsoft's current edition table for your version. For backups the practical effect is simple: full backups of small Express databases finish quickly and rarely stress the server, so a nightly full backup is realistic for most installations. The bigger risk is not performance. It is that nobody remembers to schedule anything.

What a real backup schedule has to do

Before choosing a method, decide what "done" looks like. A schedule that only runs BACKUP DATABASE at 2 a.m. is missing four things:

1. Run on time, even if nobody is logged in and even if the machine was off at 2 a.m. 2. Fail loudly. A failed backup must be visible without opening a log file by accident. 3. Rotate. Old backups must be deleted automatically, or the drive fills and the next backup fails. 4. Leave the machine. At least one copy must live somewhere that survives the loss of the server (the 3-2-1 rule: three copies, two media types, one offsite).

Microsoft's article is honest about this. It notes that the method does not delete old backup files, has no built-in job history, no retry logic and no failure alerts. The methods below add those missing pieces one at a time.

Method 1: Task Scheduler + sqlcmd + sp_BackupDatabases (Microsoft's method)

This is the officially documented route and it works on every Express version. You need sysadmin rights on the instance, a backup folder with enough free space, and permission to create scheduled tasks.

Step 1: Create the stored procedure once

Download Microsoft's SQL_Express_Backups.sql script (linked from the Microsoft article above), then run it against the master database. From a command prompt:

sqlcmd -S .\SQLEXPRESS -E -i "C:\Temp\SQL_Express_Backups.sql"

Confirm it exists:

SELECT name, create_date FROM master.sys.procedures WHERE name = 'sp_BackupDatabases';

The procedure takes three parameters: @backupLocation (the folder, which must already exist), @backupType (F full, D differential, L log) and an optional @databaseName. If you leave out the database name, it backs up every online database on the instance. It never backs up tempdb, and it skips master for differential and log backups.

One trap worth knowing: the script has hardcoded exclusions for the sample databases Northwind, pubs and AdventureWorks. If your production database happens to carry one of those names, it is skipped without any error.

Step 2: Write the batch file (with logging and cleanup)

Microsoft's examples are a single line. A batch file you can trust in production needs a bit more. Save this as D:\SQLBackups\Sqlbackup.bat:

@echo off
set BACKUPDIR=D:\SQLBackups
set LOG=%BACKUPDIR%\backup_log.txt

echo [%date% %time%] Backup started >> "%LOG%"

sqlcmd -S .\SQLEXPRESS -E -b -Q "EXEC sp_BackupDatabases @backupLocation='%BACKUPDIR%\', @backupType='F'" >> "%LOG%" 2>&1

if errorlevel 1 (
  echo [%date% %time%] BACKUP FAILED >> "%LOG%"
  exit /b 1
)

echo [%date% %time%] Backup finished >> "%LOG%"

REM Delete backups older than 14 days, only after a successful run
forfiles /p "%BACKUPDIR%" /m *.bak /d -14 /c "cmd /c del @path" >> "%LOG%" 2>&1

exit /b 0

Three details in that file matter more than they look:

1. The -b switch. Without it, sqlcmd returns exit code 0 even when the backup fails, and Task Scheduler happily reports success. With -b, any SQL error with severity above 10 returns code 1. Microsoft calls this out explicitly. It is the single most common reason people believe they have backups when they do not. 2. Cleanup runs only after success. If tonight's backup fails, the script exits before deleting anything, so your last good backup is never the one that gets rotated out. 3. Windows Authentication (-E) means the account that runs the scheduled task needs a login with backup rights in SQL Server. If you use SQL authentication instead, the password sits in the batch file in clear text, so lock down the folder permissions.

For transaction log backups, change @backupType to 'L'. Log backups need the database in the full or bulk-logged recovery model and at least one earlier full backup. Check which model each database uses:

SELECT name, recovery_model_desc FROM sys.databases ORDER BY name;

If a database is in the simple recovery model, log backups are not possible and not needed. Your recovery point is the time of the last full or differential backup.

If a newer sqlcmd build refuses to connect with a certificate error on a local instance, adding the -C switch (trust server certificate) is the usual fix.

Run the batch file by hand once, from a command prompt opened as the same user that will own the scheduled task, and confirm .bak files appear. Fixing problems now is far easier than decoding Task Scheduler codes later.

Step 3: Schedule it in Task Scheduler (and set the options people skip)

Create the task with Create Basic Task, choose Daily, pick a quiet hour, select Start a program and browse to Sqlbackup.bat. Tick Open the Properties dialog before finishing, then change these settings:

SettingWhereWhy it matters
Run whether user is logged on or notGeneralWithout it the backup only runs while that user is signed in
Run with highest privilegesGeneralAvoids permission surprises on protected folders
Run task as soon as possible after a scheduled start is missedSettingsA server that was off at 2 a.m. still takes its backup when it comes back
If the task fails, restart every 10 minutes, up to 3 timesSettingsThis is the retry logic Microsoft's method does not otherwise have
Stop the task if it runs longer than 2 hoursSettingsStops a stuck backup from blocking tomorrow's run
Use a UNC path (\\server\share\SQLBackups) rather than a mapped drive letter if you back up to a network share. Mapped drives belong to an interactive session, and a task that runs while nobody is logged in cannot see them.

The permission mistake that wastes an afternoon: The backup file is written by the SQL Server service account, not by the user who runs the task. If you point the backup at a new folder and get "Operating system error 5 (Access is denied)", the fix is to grant the service account (for a default Express install, NT Service\MSSQL$SQLEXPRESS) modify rights on that folder. Giving your own user full control changes nothing.

Step 4: Prove it ran

After the first scheduled run, check three things:

1. New .bak files exist in the folder, with a date and time stamp in the name. 2. In Task Scheduler, the task's Last Run Result shows 0x0. With -b in place, 0x1 means the backup command failed. 3. The backup history in msdb has a fresh row:

SELECT 
    bs.database_name, 
    bs.type, 
    bs.backup_start_date, 
    bs.backup_finish_date, 
    bmf.physical_device_name 
FROM msdb.dbo.backupset AS bs 
JOIN msdb.dbo.backupmediafamily AS bmf 
    ON bs.media_set_id = bmf.media_set_id 
ORDER BY bs.backup_start_date DESC;

Microsoft puts it bluntly: a task that Task Scheduler reports as successful is not proof that the backup succeeded. Always confirm the files and the history.

Where Method 1 falls short: no alerts, no built-in verification, cleanup by file age only, and no offsite copy unless you add another step. For one or two small databases, that is often acceptable. For anything a business depends on, move to Method 2 or 3.

Method 2: Ola Hallengren's Maintenance Solution

Ola Hallengren's free SQL Server Maintenance Solution is the standard DBA answer on every edition, including Express. The DatabaseBackup stored procedure covers what the Microsoft procedure leaves out: backup checksums, post-backup verification, per-database folders, and automatic cleanup by age.

Install it by running MaintenanceSolution.sql on the instance. The script's variable block has a @CreateJobs option that creates SQL Server Agent jobs. Express has no Agent, so set it to 'N' before running the script. You only need the stored procedures.

Then call it from a batch file, exactly like Method 1:

sqlcmd -E -S .\SQLEXPRESS -d master -b -Q "EXECUTE dbo.DatabaseBackup @Databases = 'USER_DATABASES', @Directory = N'D:\SQLBackups', @BackupType = 'FULL', @Verify = 'Y', @CheckSum = 'Y', @CleanupTime = 336, @LogToTable = 'Y'"

What each option does:

  • @Databases = 'USER_DATABASES' backs up every user database and skips system databases. Use a comma-separated list to be specific.
  • @Verify = 'Y' runs a verify-only check on the backup file after it is written.
  • @CheckSum = 'Y' writes page checksums into the backup so corruption is detected.
  • @CleanupTime = 336 deletes backups older than 336 hours (14 days) after a successful backup.
  • @LogToTable = 'Y' writes each run to a command log table, which gives you the run history that Express otherwise lacks.
Schedule the batch file with the same Task Scheduler settings from Method 1. For log backups, run the same command with @BackupType = 'LOG' on a shorter interval.

Where Method 2 falls short: it is excellent, but it is still a script. There is still no failure email, still no offsite copy, and someone has to understand it well enough to maintain it after you move on. In small companies that "someone" is often nobody.

Method 3: A GUI backup tool (no scripts, with cloud copies)

If you would rather not own a pile of batch files, a dedicated backup tool replaces the scripts, the scheduler and the cleanup with one screen. Several commercial tools exist for this. Here is how it looks with DT Database Backup Wizard, a Windows application that connects to SQL Server (any edition) and runs scheduled backups without T-SQL or SQL Server Agent.

1. Connect the database. Choose SQL Server as the engine, enter the instance details and test the connection. Nothing is scheduled against a connection that has not been verified. Connect the database

2. Preview the data (optional). A live preview lists the tables and records so you can see what is being backed up. Configure the backup

3. Configure the backup. Choose a native full backup in the database's own format (the right choice if you plan to restore with SQL Server), pick schema only, data only or both, and optionally turn on compression and encryption. Set a retention policy so old backups delete themselves, and choose whether file names carry a timestamp or overwrite the previous file. Configure the backup

4. Choose a destination. Save locally, or send the backup to FTP, SFTP, Amazon S3, OneDrive, Google Drive or MEGA. FTP is unencrypted, so use SFTP for anything sensitive. Choose a destination

5. Schedule it. Pick hourly, daily, weekly or a custom interval. The Backup Control Center lists every schedule, and the run history records each run with its time, trigger, status and message, so a failed run shows up as failed with the actual error. Scheduled Backup That covers the four gaps from earlier: it runs on a schedule, failures are visible in the run history, retention is automatic, and a cloud destination gives you the offsite copy.

Be honest about the trade-offs. It is a paid tool: the free demo lets you test the connection and run a limited number of manual backups, while scheduled automation, cloud destinations and retention are in the full version. It is also a Windows application, so it suits Windows-hosted Express instances. Its real advantage is not that scripts cannot do the job. They can. It is that one schedule, one dashboard and one set of retention rules also cover MySQL, PostgreSQL, MongoDB and other engines if your stack is mixed.

Which method should you use?

FeatureTask Scheduler + sqlcmdOla HallengrenGUI tool (DT Database Backup Wizard)
CostFreeFreePaid for scheduling
Setup time30 to 40 minutes45 to 60 minutesAbout 10 minutes
Skill neededBasic T-SQL and batch filesComfortable with stored proceduresNone
Old backup cleanupManual (forfiles)Built in (@CleanupTime)Built in (retention policy)
Backup verificationManualBuilt in (@Verify, @CheckSum)Test restores recommended
Run historyTask Scheduler + msdbCommand log tableBackup Control Center
Offsite or cloud copyExtra step you buildExtra step you buildBuilt in (S3, SFTP, OneDrive and more)
Covers other enginesNoNoYes
Best forOne or two small databasesDBAs who want controlMixed environments, no-script teams

How to check that your backups actually work

A backup you have never restored is a hope, not a backup. Three checks, in rising order of confidence:

1. Find databases that were never backed up. This query lists every database with the time of its last full backup. NULL means it has never had one.

SELECT 
    d.name, 
    MAX(b.backup_finish_date) AS last_full_backup 
FROM sys.databases AS d 
LEFT JOIN msdb.dbo.backupset AS b 
    ON b.database_name = d.name 
    AND b.type = 'D' 
WHERE d.name <> 'tempdb' 
GROUP BY d.name 
ORDER BY last_full_backup;

Run it monthly. It catches the database someone added after you set up the schedule.

2. Verify the file.

RESTORE VERIFYONLY FROM DISK = N'D:\SQLBackups\YourDB_FULL.bak';

This confirms the file is readable and complete. It does not prove the data inside is restorable.

3. Do a real restore. Restore the latest backup to a different name on a test instance and run a few queries:

RESTORE DATABASE YourDB_Test 
FROM DISK = N'D:\SQLBackups\YourDB_FULL.bak' 
WITH MOVE 'YourDB' TO N'D:\Data\YourDB_Test.mdf', 
     MOVE 'YourDB_log' TO N'D:\Data\YourDB_Test_log.ldf';

Do this at least once per quarter. Check the logical file names first with RESTORE FILELISTONLY.

Mistakes that break Express backup schedules

  • Backing up to the same drive as the database. One disk failure takes both. Keep one copy on a different disk and one offsite.
  • Forgetting the -b switch. Failed backups look like successes.
  • Mapped network drives in a scheduled task. They are invisible to a task running without a logged-in session. Use UNC paths.
  • Granting folder rights to the wrong account. SQL Server's service account writes the file, not you.
  • Never deleting old files. Microsoft's procedure does not clean up. Add retention yourself or the disk fills.
  • Running only full backups on a database that changes all day. If you cannot afford to lose a day of data, use the full recovery model with log backups every 15 to 60 minutes.
  • Never testing a restore. The most expensive mistake on this list.

Frequently asked questions

Q

Does SQL Server Express include SQL Server Agent?

A
No. SQL Server Agent is not included in any edition of SQL Server Express, including Express with Advanced Services. That is why you cannot create scheduled jobs or Maintenance Plans in Express and must use an external scheduler such as Windows Task Scheduler.
Q

Can I use Maintenance Plans in SQL Server Express?

A
No. Maintenance Plans depend on SQL Server Agent to run, so they are unavailable in Express. Use a script-based method (Task Scheduler with sqlcmd, or Ola Hallengren's procedures) or a third-party backup tool.
Q

Will Task Scheduler run my backup if nobody is logged in?

A
Yes, if you choose "Run whether user is logged on or not" on the General tab. Combine it with a UNC path for network shares and make sure the account has the SQL Server and folder permissions it needs.
Q

How do I know if a scheduled backup failed?

A
Use the -b switch in your sqlcmd command so failures return exit code 1, then check Task Scheduler's Last Run Result (0x1 means failure) and the msdb.dbo.backupset history. Neither method sends an alert by itself, so add a monthly check query or use a tool that shows failures in a run history.
Q

How often should I back up SQL Server Express?

A
Match it to how much data you can afford to lose. A nightly full backup is enough for data that changes slowly. For a busy application database, use the full recovery model, take a daily full backup and log backups every 15 to 60 minutes. Databases in the simple recovery model cannot take log backups.
Q

Does this work for SQL Server Express LocalDB?

A
No. Microsoft's scheduling method applies to SQL Server Express editions and does not apply to Express LocalDB.
Q

Can I back up SQL Server Express to the cloud?

A
Not with the built-in scripts alone. The simple route is to write the backup to a local or network folder and then copy it to cloud storage, either with a second scripted step or with a backup tool that has cloud destinations built in, such as Amazon S3, SFTP, OneDrive or Google Drive.
Q

Does DT Database Backup Wizard work with SQL Server Express?

A
It connects to Microsoft SQL Server and lists support for any edition, so Express instances can be scheduled the same way as other editions. Run a test backup and restore on your own version before relying on it.

Conclusion

SQL Server Express saves real money, and the missing SQL Server Agent is a gap you can close in an afternoon. For one or two small databases, Microsoft's Task Scheduler method with the -b switch, a cleanup line and a monthly msdb check is enough. If you want verification and tidy retention for free, Ola Hallengren's procedures are the standard answer. And if you would rather have one dashboard with built-in retention, cloud destinations and a run history, with no scripts to maintain, a tool like DT Database Backup Wizard does that job, including for the other database engines in your stack.

Whichever you choose, finish with the same two steps: put a copy somewhere other than the server, and restore it at least once to prove it works.