Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

SQL Server Error 1484: Fix Database Mirroring

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

SQL Server error 1484 means the database you are trying to mirror is not in the FULL recovery model, or you have not taken a full backup and a log backup to establish the log chain. Database mirroring requires the FULL recovery model and a complete backup history so the principal and mirror can stay in sync. The fastest fix is to switch the database to FULL recovery, take a full backup, take a transaction log backup, and then start the mirroring session again. This guide walks through the exact steps, the common mistakes that trigger 1484, and what to check when the error persists.

What You'll Need

  • SQL Server Management Studio (SSMS) or sqlcmd access to the principal server.
  • ALTER DATABASE permission on the database, and CONTROL SERVER or sysadmin rights to configure mirroring endpoints.
  • Both the principal and mirror server instances running the same SQL Server major version and edition that supports mirroring (Standard or Enterprise; Express does not support mirroring).
  • A full backup and a transaction log backup of the database, or permission to create them.
  • The mirror server prepared with a copy of the database restored WITH NORECOVERY.

Step-by-Step

  1. Confirm the recovery model. In SSMS, right-click the database, choose Properties, and check the Options page. The Recovery model must be FULL. If it is SIMPLE or BULK_LOGGED, change it with ALTER DATABASE [YourDB] SET RECOVERY FULL; in a query window. Error 1484 is most often caused by this single setting.
  2. Take a full backup. Right-click the database, select Tasks > Back Up, choose Full as the backup type, and write to a file. This starts the log chain that mirroring depends on. Without it, SQL Server will not accept the mirroring partner.
  3. Take a transaction log backup. Right-click the database, select Tasks > Back Up, choose Transaction Log as the type, and back up to a file. A full backup alone is not enough; the log backup proves the log chain is intact and is required before mirroring can begin.
  4. Restore the backups on the mirror server. Copy the full and log backup files to the mirror instance. Restore the full backup WITH NORECOVERY, then restore the log backup WITH NORECOVERY. The database on the mirror stays in the RESTORING state, which is correct. If you restore WITH RECOVERY by mistake, you must start over.
  5. Create the mirroring endpoints if they do not exist. On both servers, run CREATE ENDPOINT Mirroring STATE = STARTED AS TCP (LISTENER_PORT = 5022) FOR DATABASE_MIRRORING (ROLE = PARTNER); if no endpoint exists. Check existing endpoints with SELECT * FROM sys.database_mirroring_endpoints;. Only one mirroring endpoint is allowed per instance.
  6. Start mirroring from the principal. In SSMS, right-click the principal database, choose Tasks > Mirror, click Configure Security, and follow the wizard. Alternatively, run ALTER DATABASE [YourDB] SET PARTNER = 'TCP://MirrorServer:5022'; on the principal after the mirror is set as a partner. If error 1484 appears here, go back to step 1; the recovery model or log chain is still wrong.
  7. Verify the session. Run SELECT mirroring_state_desc, mirroring_role_desc FROM sys.database_mirroring WHERE database_id = DB_ID('YourDB'); on both servers. The principal should show SYNCHRONIZED or SYNCHRONIZING, and the mirror should show SYNCHRONIZED or SYNCHRONIZING with the mirror role.

Common Mistakes

  • Leaving the database in SIMPLE recovery. This is the number one cause of error 1484. Mirroring cannot track log records in SIMPLE mode, so the setting must be FULL before you configure the partner.
  • Skipping the log backup. A full backup alone does not satisfy mirroring. The log chain must be established with a transaction log backup, and that backup must also be restored on the mirror WITH NORECOVERY.
  • Restoring the mirror WITH RECOVERY. The mirror database must stay in RESTORING. If it comes online, mirroring cannot attach to it and you will need to redo the restore sequence.
  • Mismatched endpoints or ports. The partner address must use the exact TCP port the endpoint listens on. A firewall blocking port 5022 is a common follow-on failure after 1484 is resolved.
  • Using a database that is already in an availability group. A database cannot be in both an Always On availability group and a mirroring session. Remove it from the group first if you are switching technologies.

Tips

  • Run SELECT name, recovery_model_desc FROM sys.databases; to audit recovery models across all databases before you start.
  • Keep the full and log backups in a shared location both servers can reach, or copy them before restoring on the mirror.
  • Use the Configure Database Mirroring Security Wizard in SSMS if you are unsure about endpoint creation; it handles the endpoint and partner setup in one pass.
  • Test the mirroring session with a small database first if you are new to mirroring; the same steps apply and mistakes are cheaper to undo.
  • Remember that mirroring is a deprecated feature in recent SQL Server versions. If you are planning new high-availability work, check the current documentation for supported alternatives before investing time in mirroring.

Troubleshooting

If error 1484 persists after switching to FULL recovery and taking both backups, check the following in order. First, confirm the database is not in BULK_LOGGED mode; switch it back to FULL and take another log backup. Second, verify the log backup you restored on the mirror is the most recent one and was restored WITH NORECOVERY. Third, check that the mirror database is in the RESTORING state with SELECT state_desc FROM sys.databases WHERE name = 'YourDB'; on the mirror. Fourth, confirm both instances can reach each other on the endpoint port using telnet MirrorServer 5022 from the principal. Fifth, look at the SQL Server error log on both instances for endpoint or login errors that may be masking the real problem. If the principal database was recently restored from another server, its log chain may be broken; take a fresh full and log backup and redo the mirror restore. If none of this resolves the error, drop the mirroring configuration with ALTER DATABASE [YourDB] SET PARTNER OFF; and start the wizard again from a clean state.

Frequently Asked Questions

What does SQL Server error 1484 actually mean?

It means the database is not in the FULL recovery model, or the log chain has not been established with a full backup followed by a log backup. Mirroring needs both before it can start.

Can I mirror a database in SIMPLE recovery?

No. Database mirroring requires the FULL recovery model. Switch the database to FULL and take a full and log backup before configuring the partner.

Do I need a log backup if I already took a full backup?

Yes. The full backup starts the log chain, but mirroring also requires a transaction log backup to confirm the chain is intact. Restore both on the mirror WITH NORECOVERY.

Why does the mirror database need to stay in RESTORING?

The mirror must remain in the RESTORING state so SQL Server can apply log records from the principal. If it is brought online with WITH RECOVERY, mirroring cannot attach and you must redo the restore.

Does SQL Server Express support database mirroring?

No. Mirroring requires Standard or Enterprise edition. Express edition does not include the mirroring endpoint or partner features.

Is database mirroring still supported?

Mirroring is deprecated in recent SQL Server versions and is not recommended for new deployments. It still works in versions that include it, but check current documentation for supported high-availability alternatives before building new systems.