SQL Server Error 1484: Database Mirroring Fix
In this article
SQL Server error 1484 means the database you are trying to mirror is not in the FULL recovery model, or its transaction log has never been backed up, so mirroring cannot be enabled. The fix is to switch the database to FULL recovery, take a full backup, take a log backup, and then start the mirroring session again. No data is lost by changing recovery models, but you must do the backup sequence in that order or the mirroring wizard will keep failing.
What You'll Need
- SQL Server Management Studio (SSMS) or sqlcmd access to both the principal and mirror server instances.
- An account with ALTER DATABASE and BACKUP DATABASE permissions on the principal, and CREATE DATABASE plus ALTER DATABASE on the mirror.
- Network connectivity between the two instances on the mirroring endpoint port (typically 5022, but confirm your endpoint configuration).
- Sufficient disk space on both servers for a full backup and a log backup of the database.
- The database must not be in SIMPLE or BULK_LOGGED recovery model, and it must not be read-only.
Step-by-Step
- Confirm the current recovery model. In SSMS, right-click the database, choose Properties, and open the Options page. The Recovery model drop-down shows the current setting. If it says SIMPLE or BULK_LOGGED, that alone is enough to trigger error 1484. You can also run
SELECT name, recovery_model_desc FROM sys.databases WHERE name = 'YourDatabase';in a query window. - Switch the database to FULL recovery. Run
ALTER DATABASE YourDatabase SET RECOVERY FULL;against the principal instance. This is an online operation and does not take the database offline. If the database is part of an Always On availability group, change the recovery model on the primary replica only. - Take a full backup of the database. Run
BACKUP DATABASE YourDatabase TO DISK = 'C:\Backups\YourDatabase_FULL.bak' WITH INIT;using a path that exists on the server. The full backup establishes the starting point for the log chain. Without it, a log backup will fail with its own error. - Take a transaction log backup. Run
BACKUP LOG YourDatabase TO DISK = 'C:\Backups\YourDatabase_LOG.trn' WITH INIT;. This is the step most people skip. A database in FULL recovery that has never had a log backup still cannot be mirrored, because the log chain has no starting point. - Verify the recovery model stuck. Re-run the query from step 1 and confirm recovery_model_desc now reads FULL. If it reverted, check for a startup procedure, policy, or automation job that resets recovery models, and disable it temporarily.
- Create the mirroring endpoint if it does not exist. On both instances, check
SELECT * FROM sys.database_mirroring_endpoints;. If the result is empty, create one withCREATE ENDPOINT Mirroring STATE = STARTED AS TCP (LISTENER_PORT = 5022) FOR DATABASE_MIRRORING (ROLE = ALL);. Use ROLE = PARTNER on both servers if you are not using a witness. - Back up the database and log again and restore them to the mirror. Restore the full backup on the mirror server with
WITH NORECOVERY, then restore the log backup withWITH NORECOVERY. The mirror database must be in the RESTORING state before mirroring can start. - Start mirroring from the principal. In SSMS, right-click the database, choose Tasks, then Mirror, and click Start Mirroring after entering the mirror server address. Alternatively run
ALTER DATABASE YourDatabase SET PARTNER = 'TCP://MirrorServer:5022';on the principal, then the matching statement on the mirror pointing back to the principal. - Confirm the session is synchronized. Run
SELECT database_id, mirroring_state_desc, mirroring_safety_level_desc FROM sys.database_mirroring;. You want SYNCHRONIZED and FULL for a high-safety session. If it says DISCONNECTED, recheck endpoint ports, firewall rules, and service account permissions.
Common Mistakes
- Switching to FULL recovery but forgetting the log backup. The recovery model alone is not enough; error 1484 will persist until a log backup exists.
- Restoring the mirror database WITH RECOVERY instead of WITH NORECOVERY. That brings the database online and mirroring cannot attach to it.
- Taking the full backup before switching to FULL recovery, then assuming the log chain is valid. The backup must come after the recovery model change.
- Running the ALTER DATABASE statement against the mirror instead of the principal. Recovery model changes belong on the principal only.
- Using a database name or file path that does not exist on the mirror server, which produces a different error but is often mistaken for 1484.
- Leaving the database in read-only mode. Mirroring requires a writable principal database.
Tips
- Run the full and log backup to a share both servers can reach, or copy the files manually, so the mirror restore uses identical file paths.
- Script the recovery model change and backups so the sequence is repeatable across databases.
- Check
sys.database_mirroringafter every change rather than relying on the SSMS wizard, which sometimes reports a generic failure. - If the database is in an availability group, use the availability group wizard instead of manual mirroring statements; the recovery model requirements are the same but the setup path differs.
- Keep the log backup frequency in mind after enabling mirroring: a FULL recovery database with no log backups will grow its log file until the disk fills.
Troubleshooting
If error 1484 persists after the steps above, run SELECT name, recovery_model_desc, log_reuse_wait_desc FROM sys.databases WHERE name = 'YourDatabase';. A log_reuse_wait_desc of LOG_BACKUP means the log has still never been backed up, so repeat step 4 and confirm the backup file was actually written. If the recovery model reverts to SIMPLE on its own, look for a maintenance plan, startup stored procedure, or third-party tool that enforces a recovery model policy, and exclude this database. If mirroring starts but immediately disconnects, verify the endpoint state is STARTED on both servers, that the service accounts can authenticate to each other, and that no firewall rule is blocking the listener port. If the mirror restore fails with a file path error, restore with WITH MOVE to valid paths on the mirror. If you are on SQL Server Express, note that database mirroring is not supported there at all, so error 1484 will never resolve on that edition; use a supported edition or a different high-availability method. For any step that involves changing server-level configuration or firewall rules, coordinate with your network or security team, and take a verified backup before making changes to production databases.
Frequently Asked Questions
Does changing to FULL recovery model affect performance?
It increases log growth because log records are retained until a log backup runs. Schedule regular log backups to keep the log file manageable.
Can I enable mirroring on a SIMPLE recovery database?
No. Mirroring requires the FULL recovery model, and the database must have had at least one full and one log backup.
Will error 1484 go away after just a full backup?
Usually not. The log backup is the step that completes the log chain, so do both backups in order.
Does this work on SQL Server Express?
No. Database mirroring is not available on Express editions, so the error cannot be resolved there.
Can I mirror a database that is in an availability group?
Not simultaneously. A database can be in an availability group or a mirroring session, not both. Use the availability group setup instead.
What if the recovery model keeps reverting to SIMPLE?
Something is resetting it. Check maintenance plans, startup procedures, and any monitoring or deployment tool that enforces recovery model settings.