SQL Server Error 1491: Mirroring Fix Guide
In this article
SQL Server error 1491 means you tried to enable database mirroring on a database that is not eligible for it. The most common cause is that the database is still in the SIMPLE recovery model, or it has never had a full backup taken. To fix it, set the recovery model to FULL, take a full database backup and a transaction log backup, then enable mirroring again. You cannot skip the log backup: mirroring needs a log chain that starts with a full backup and continues with log backups.
This guide walks through the fix step by step, explains why each step matters, and covers the other reasons error 1491 can appear so you are not stuck if the recovery model was already correct.
What You'll Need
- SQL Server Management Studio (SSMS) or sqlcmd connected to the principal server, with permission to alter the database and its recovery model.
- The database name and, if you are setting up mirroring, the mirror server name and the endpoint details.
- Enough disk space for a full backup and a transaction log backup, plus a backup folder the SQL Server service account can write to.
- For a full mirroring setup, both servers should be the same SQL Server version and edition that supports mirroring, and the mirror database must already be restored WITH NORECOVERY.
Step-by-Step
- Confirm the current recovery model. In SSMS, right-click the database, choose Properties, and look at the Options page. The Recovery model drop-down shows SIMPLE, FULL, or BULK_LOGGED. You can also run
SELECT name, recovery_model_desc FROM sys.databases WHERE name = 'YourDatabase';. If it says SIMPLE, that alone explains error 1491. - Switch to the FULL recovery model. Run
ALTER DATABASE YourDatabase SET RECOVERY FULL;or change it in the Options page of the database properties. This is the setting mirroring requires because mirroring depends on the transaction log stream. - Take a full database backup. Right-click the database, choose Tasks, then Back Up. Choose Full as the backup type and a destination file. Or run
BACKUP DATABASE YourDatabase TO DISK = 'C:\Backups\YourDatabase.bak' WITH INIT;. Without a full backup after switching to FULL, the log chain is broken and mirroring still cannot start. - Take a transaction log backup. Right-click the database, choose Tasks, then Back Up, and select Transaction Log as the type. Or run
BACKUP LOG YourDatabase TO DISK = 'C:\Backups\YourDatabase.trn' WITH INIT;. This establishes the log sequence that mirroring will use. Skipping this step is the second most common reason error 1491 keeps appearing. - Check for other blocking conditions. Mirroring also refuses to start if the database is read-only, if it is set to single-user mode, if it is a system database, or if it is already involved in an availability group. Run
SELECT name, state_desc, user_access_desc, is_read_only FROM sys.databases WHERE name = 'YourDatabase';and fix anything unexpected. - Enable mirroring again. In SSMS, right-click the database, choose Tasks, then Mirror, and click Start Mirroring. Or use the ALTER DATABASE ... SET PARTNER statement with the mirror server's TCP address. If the recovery model and backup steps are done, the command should now succeed.
- Verify the mirror state. Right-click the database, choose Tasks, then Mirror, and confirm the status shows Synchronized or Synchronizing rather than Disconnected. You can also query
sys.database_mirroringfor the mirroring_state_desc column.
Menu labels in SSMS can differ slightly between versions, so if a label does not match exactly, look for the closest equivalent under the database's Tasks menu.
Common Mistakes
- Switching to FULL recovery but never taking a full backup afterward. The recovery model change alone does not create a usable log chain.
- Taking the full backup but skipping the transaction log backup. Mirroring needs both.
- Taking the backups before changing the recovery model. The order matters: change the model first, then back up.
- Restoring the mirror database WITH RECOVERY instead of WITH NORECOVERY. The mirror must stay in restoring state until mirroring starts.
- Assuming error 1491 is always about recovery model. Read the full error message: it often names the specific condition, such as the database being read-only or in single-user mode.
- Leaving the database in SIMPLE after a failed attempt and retrying without checking. Always re-check the recovery model before trying again.
Tips
- Run the recovery model query and the backup commands from the same connection so you can see each result immediately.
- Keep the full and log backup files until mirroring is confirmed working; you may need them to restore the mirror database.
- If you are setting up mirroring from scratch, restore the full backup and at least one log backup to the mirror server WITH NORECOVERY before enabling the partner.
- Use the same collation and compatibility level on principal and mirror; mismatches cause failures later even if error 1491 is resolved.
- Document the recovery model change: databases switched from SIMPLE to FULL will grow their log until regular log backups run, so schedule them.
Troubleshooting
If error 1491 persists after the recovery model and backup steps, read the entire error text rather than just the number. It usually points to the exact blocker. Check that the database is not read-only, not in single-user mode, and not already part of an availability group. Confirm the full backup completed successfully by checking the backup history or the SQL Server error log. If the log backup failed because the log is full, back up the log to free space, then retry. If you are enabling mirroring and get a different error after 1491 clears, the problem has moved on to endpoint, permissions, or network connectivity, which are separate issues. When in doubt, run the recovery model query again: if it still shows SIMPLE, the ALTER statement did not commit, possibly because it ran against the wrong database context.
Frequently Asked Questions
Does error 1491 always mean the recovery model is wrong?
No. It is the most common cause, but the same error appears when the database is read-only, in single-user mode, is a system database, or is already in an availability group. The full error message names the specific condition.
Can I enable mirroring on a SIMPLE recovery model database?
No. Database mirroring requires the FULL recovery model because it relies on the transaction log stream. You must switch to FULL and take the required backups first.
Do I need a transaction log backup or is a full backup enough?
You need both. The full backup starts the log chain, and the log backup continues it. Mirroring will not start without a log backup after the full backup.
Will switching to FULL recovery model affect performance?
The main effect is log growth. In FULL recovery, the transaction log grows until you take log backups, so schedule them regularly to keep the log manageable.
Can I switch back to SIMPLE after fixing the error?
Only if you are not using mirroring or another feature that requires FULL. Mirroring itself requires FULL, so switching back will break it.
Does this fix apply to Azure SQL Database?
Database mirroring is a SQL Server feature; Azure SQL Database uses different high-availability mechanisms. This guide applies to on-premises or IaaS SQL Server instances.