SQL Server error 1478 means the mirror database cannot keep up with the transaction log growth on the principal. The fix is to give the mirror's log more room or reduce log generation on the principal. Start by checking free disk space on the mirror server, then grow the mirror's log file or add a log file on another volume, and finally confirm the mirror is synchronizing again. If the mirror is far behind, you may need to pause mirroring, let the log truncate on the principal, and then resume.

What You'll Need

  • SQL Server Management Studio (SSMS) or sqlcmd access to both the principal and mirror instances.
  • An account with ALTER DATABASE and ALTER ANY DATABASE permissions on both servers.
  • Free disk space on the mirror server's log volume, or a second volume to add a log file.
  • The database name and the mirroring endpoint name (if you need to script the changes).
  • A maintenance window if you must pause mirroring or restart the SQL Server service.

Step-by-Step

  1. Confirm the error and identify the mirror database. In SSMS, connect to the principal instance, open Object Explorer, and expand Databases. Right-click the database, choose Properties, and select Mirroring. The status should show the mirror as disconnected or suspended. Alternatively, run SELECT DB_NAME(database_id), mirroring_state_desc FROM sys.database_mirroring; to see the state. Error 1478 usually appears in the SQL Server error log or in the mirroring monitor.
  2. Check free space on the mirror server's log drive. On the mirror instance, open File Explorer or run EXEC xp_fixeddrives; to see free space per drive. If the log volume is nearly full, the mirror cannot accept more log records. Free space by moving backups or other files off that volume, or add a new disk.
  3. Grow the mirror's transaction log file. On the mirror instance, right-click the database, choose Properties, select Files, and increase the initial size of the log file (for example, by 1–2 GB). Alternatively, run ALTER DATABASE [YourDB] MODIFY FILE (NAME = N'YourDB_log', SIZE = 2048MB); on the mirror. Use a size that gives headroom for the principal's log generation rate.
  4. Add a second log file on another volume if the current drive cannot grow. On the mirror instance, run ALTER DATABASE [YourDB] ADD LOG FILE (NAME = N'YourDB_log2', FILENAME = N'D:\Logs\YourDB_log2.ldf', SIZE = 2048MB, FILEGROWTH = 512MB); Replace the path with a volume that has free space. SQL Server will use both log files.
  5. Check whether the principal's log is also constrained. On the principal, run DBCC SQLPERF(LOGSPACE); to see log space used. If the principal's log is full, back it up or switch recovery mode as appropriate. Error 1478 is about the mirror, but a full principal log can prevent log truncation and make the mirror fall further behind.
  6. Resume or restart mirroring if it is paused. In SSMS, right-click the database on the principal, choose Tasks, then Mirror, and click Resume. If the mirror is disconnected, you may need to restart the mirroring endpoint or reinitialize the mirror. Reinitialization restores the full database to the mirror and can take time.
  7. Verify synchronization. Run SELECT DB_NAME(database_id), mirroring_state_desc, mirroring_safety_level_desc FROM sys.database_mirroring; on the principal. The state should be SYNCHRONIZED or SYNCHRONIZING. Check the mirroring monitor for any remaining errors.
  8. Monitor log growth and set alerts. Create a SQL Server Agent alert for error 1478 and a job that checks free disk space on both servers. Set the log file growth to a fixed size (for example, 512 MB) rather than a percentage, and ensure autogrow is enabled.

Common Mistakes

  • Growing the principal's log instead of the mirror's log. Error 1478 is reported on the mirror; the fix must be applied there.
  • Adding a log file on the same full drive. This does not help; add it to a different volume with free space.
  • Forgetting that the mirror database must be in NORECOVERY or RESTORING state before mirroring can resume. Do not bring it online.
  • Pausing mirroring without checking whether the principal's log will grow unchecked. Pausing can cause the principal's log to fill.
  • Using percentage-based autogrow on busy databases. It can cause long growth pauses and uneven file sizes.

Tips

  • Pre-size the mirror's log to match the principal's expected log generation for at least a day of peak activity.
  • Keep the mirror's log file on a dedicated volume separate from data files.
  • Use the Database Mirroring Monitor to track unsent log and send queue size.
  • Schedule regular log backups on the principal; they are required for log truncation in full recovery model.
  • Test failover after resolving the error to confirm the mirror is healthy.

Troubleshooting

If error 1478 persists after growing the mirror's log, check the SQL Server error log on the mirror for disk errors or permission issues on the log file path. If the mirror is disconnected, verify the mirroring endpoint is started with SELECT name, state_desc FROM sys.database_mirroring_endpoints; and that the ports are open between servers. If the mirror cannot catch up, consider pausing mirroring, backing up the principal's log, and then resuming; if the gap is too large, reinitialize the mirror. Reinitialization overwrites the mirror database, so back up the mirror first if it contains any data you need. If the principal's log is full, back it up or switch to simple recovery temporarily, but note that this breaks the log chain and requires a full backup afterward. For disk space, move backups or add a volume; do not shrink the log file while mirroring is active.

Frequently Asked Questions

What does error 1478 mean exactly?

It means the mirror database's transaction log does not have enough space to accept the log records being sent from the principal. The mirror cannot apply changes until it has room.

Can I fix it by shrinking the principal's log?

No. Shrinking the principal's log does not give the mirror more space and can cause fragmentation. Fix the mirror's log capacity instead.

Will mirroring resume automatically after I grow the log?

If mirroring is suspended, you must resume it manually. If the mirror was disconnected, you may need to restart the endpoint or reinitialize the mirror.

Do I need to restart SQL Server after adding a log file?

No. Adding or growing a log file takes effect immediately. A restart is only needed if the service is unresponsive.

Does this error affect the principal database?

The principal continues to accept transactions, but its log cannot truncate until the mirror catches up, so the principal's log may grow. Monitor both servers.

Can I use a different drive letter for the mirror's log?

Yes. Add a log file on any volume with free space. The path must be valid on the mirror server and the SQL Server service account must have permission to write there.