Skip to content

Est. 2011ยทMicrosoft Partner 7033487ยทDelivery under 3 minยทSupport 7 days a week

Your vault is empty.

License Error 1412

Error 1412: The Remote Copy Has Not Been Rolled Forward Far Enough

10 min read Updated October 5, 2026 SQL Server

Fix it now

The copy you are joining is behind. Error 1412 is published as the remote copy of the database not having had enough log backups applied to roll forward all of its files to a common point in time. It is not corruption and not a permissions problem, and the gap is filled by restoring the log backups you have not applied yet.

Back up on the principal, restore on the secondary copy, in order

BACKUP LOG [YourDb] TO DISK = 'D:\Backup\YourDb_tail.trn';

RESTORE LOG [YourDb] FROM DISK = 'D:\Backup\YourDb_log_01.trn' WITH NORECOVERY;
RESTORE LOG [YourDb] FROM DISK = 'D:\Backup\YourDb_tail.trn' WITH NORECOVERY;
  1. Take a fresh log backup on the principal first, so the chain is complete up to this moment.
  2. Find out what the secondary copy has already had applied, from msdb.dbo.restorehistory joined to msdb.dbo.backupset for that database, ordered by restore date.
  3. Gather every log backup taken since that point, from wherever they are written, including any taken by a second backup tool that you did not know about.
  4. Restore them in order, each one WITH NORECOVERY, so the copy stays ready for more. Skipping one produces the same error you started with.
  5. Start the session again: set the partner on the secondary side first and then on the principal, or join the database to the availability group.

Do not restore the last one WITH RECOVERY out of habit. A copy that has been recovered is no longer a continuation of the principal and has to be seeded again from a full backup.

If the session reaches a synchronised state, stop here. If the chain itself has been broken, the next section explains how and what to do about it.

Why it happens

Mirroring and availability groups both work by streaming log records from a known point. The secondary copy has to contain everything up to that point already, because the stream carries what comes next and nothing else. A restore sequence that stops short leaves a gap the stream cannot fill, and the engine refuses to start rather than producing a copy that is quietly missing transactions.

Error 1412’s published text is precise about that: the remote copy has not had enough log backups applied to roll forward all of its files to a common point in time. Note “all of its files”. A database with several files can be short on one of them, which is why the error sometimes appears after a restore sequence that looked complete.

Error 1478 is the same shortage seen from the other side of the session. It is published as the mirror database having insufficient transaction log data to preserve the log backup chain of the principal database, and it names the two ways that happens: a log backup from the principal has not been taken, or it has not been restored on the mirror. If you see 1478, take a log backup on the principal and restore it before doing anything more elaborate.

The other two are about the session rather than the chain. Error 1416 is published as the database not being configured for database mirroring, which is what a command assuming a session that is not there returns. Error 1438 is published as the server instance rejecting the configure request, with a reason and state for Microsoft’s use, and it says something useful about itself: this is a transient error, retrying is likely to succeed, and you should read the other instance’s error log for more information.

Log backups taken since the restore have not been applied

You have this one if The straightforward case: the secondary was seeded some hours ago and the principal has been backing up its log ever since.

  1. List the log backups on the principal since the full backup you used, ordered by finish time.
  2. Restore each of them on the secondary WITH NORECOVERY, in order, skipping none.
  3. Take one final log backup, restore it too, and start the session immediately so the gap does not reopen.

Another tool is taking log backups you never see

You have this one if You restore everything you know about and still get 1412, and a third-party backup product protects the same instance.

  1. Query the backup history on the principal and look for log backups your own jobs did not create.
  2. Retrieve those files from the other tool and restore them in sequence with the rest.
  3. Agree which tool owns log backups from now on; two tools taking them independently will keep breaking the chain.

Copy-only backups are the exception, because they do not become part of the chain. Anything else that backs up the log does.

The secondary copy was restored with recovery

You have this one if The secondary database is online and usable rather than sitting in a restoring state.

  1. Accept that no further log can be applied to it; it has been opened and is no longer a continuation of the principal.
  2. Restore the full backup again WITH NORECOVERY, then every log backup since, in order.
  3. Only then set the partner or join the database to the group.

The chain itself has ended

You have this one if The database was in the simple recovery model at some point, or the log backups you need have aged out of retention.

  1. Set the principal to the full recovery model if it is not already, then take a fresh full backup.
  2. Restore that full backup on the secondary WITH NORECOVERY, followed by every log backup since.
  3. Restart the session and confirm it reaches a synchronised state.

The partner rejected the request

You have this one if Error 1438 or 1416 on commands that should be valid, often shortly after mirroring was removed or a failover was attempted.

  1. Read the other instance’s error log, which is exactly what the 1438 message tells you to do, and note the reason and state it printed.
  2. Retry the command. Microsoft describes 1438 as transient and says a retry is likely to succeed once any cause is corrected.
  3. If you are rebuilding rather than repairing, remove mirroring cleanly on both partners with ALTER DATABASE [YourDb] SET PARTNER OFF; before re-seeding.

Full reference

Working out what is missing

What you check What it tells you
Restore history on the secondary The last backup applied, and whether it was applied with recovery
RESTORE HEADERONLY on a candidate file The log sequence numbers that file covers, so you can order files correctly
Backup history on the principal Every log backup taken, including ones written by another tool
The state of the secondary database It must sit in a restoring state, ready to accept more
Whether the database has several files 1412 talks about rolling all files forward to a common point

Restoring a chain without breaking it

  1. Take the fresh log backup first, so you are not chasing a moving target.
  2. Restore in log sequence order, not filename order. Filenames are a convention; log sequence numbers are the truth.
  3. Use WITH NORECOVERY on every restore, including the last one.
  4. Start the session immediately afterwards, because the principal keeps producing log while you work.
  5. If the sequence is long, script it rather than clicking through it; a missed file costs you the whole run.

Turning the partner off leaves the secondary copy in a restoring state that cannot be used without recovering it, and recovering it makes it useless as a mirror. Decide before you run it whether that copy is being rebuilt or being kept, because you rarely get both.

Things that break the chain quietly

  • A switch to the simple recovery model, even briefly, ends the chain outright.
  • A second backup tool taking log backups on its own schedule.
  • Someone restoring the secondary WITH RECOVERY to check something.
  • Retention that deletes log backups faster than you can apply them.
  • A full backup used for seeding that was taken after a log backup you then restored.

The same rule in an availability group

Joining a database to an availability group carries the same requirement as setting a mirroring partner, so the same restore sequence applies to a secondary replica: full backup with no recovery, then every log backup since, then join. Where the version supports it, automatic seeding removes the manual sequence entirely by streaming the database to the secondary, which is worth considering if you are rebuilding these copies regularly rather than once.

When a licence is the actual fix

Nothing in this article is fixed by a purchase. Restoring the outstanding log backups costs nothing and is the whole answer in most cases. Licensing only comes into it when you are rebuilding rather than repairing. The SQL Server 2025 edition table lists database mirroring as deprecated, available on Standard with full safety only and on Express as a witness only, and its replacement, availability groups, as Enterprise; Standard offers basic availability groups of two replicas and one database instead. If your standby has been running on an edition that cannot do what you now need, Arco supplies SQL Server 2025 Standard (2-core pack) licences and will check which edition covers the configuration you are planning before you order.

Every code this article covers

Code What it points at Source
1412 The remote copy of the database has not had enough log backups applied to roll all of its files forward to a common point in time Microsoft Learn
1478 The mirror database has insufficient transaction log data to preserve the log backup chain, because a log backup has not been taken on the principal or not restored on the mirror Microsoft Learn
1416 The database is not configured for database mirroring, so the command has no session to act on Microsoft Learn
1438 The partner instance rejected the configure request; read its error log. Microsoft describes this as transient and says a retry is likely to succeed Microsoft Learn

Confirm the fix worked

  1. The session reports synchronised on both sides, or the availability database shows as joined and synchronising.
  2. The secondary database no longer accepts manual restores, which shows the session owns it.
  3. The log send and redo queues are draining rather than growing.
  4. A log backup on the principal leaves the session unaffected.
  5. Only one tool is taking log backups of this database.

Questions people ask about this

Can I skip a log backup if the next one covers the same period?

No. Each log backup continues from where the last stopped, so the sequence has to be applied whole. Restoring out of order or with a file missing produces the same error you started with.

How do I know which file to restore next?

Run RESTORE HEADERONLY against the candidates and compare their log sequence numbers with what the secondary has already applied. Ordering by filename works until somebody renames a file.

Is this a licensing problem?

No, and it costs nothing to resolve. The error is about the state of a restore sequence, and every step uses commands available in the edition you already have.

Will the same thing happen to an availability group secondary?

Yes. Joining a database to an availability group carries the same requirement, so the same restore sequence applies. Automatic seeding, where your version supports it, avoids the manual sequence altogether.

I got 1438 rather than 1412. Is that worse?

Not necessarily. Microsoft describes 1438 as a transient error where retrying is likely to succeed, and the message tells you to read the other instance’s error log for the reason. Read that log, correct anything it names, and try again.

Related error codes

Was this article helpful?

Your feedback helps us improve our documentation.

Related articles

License Error SSIS Error 0xC0047062: Packages Fail as Agent Jobs but Run in Visual Studio License Error Error 912: Script Level Upgrade Failed After a Cumulative Update Free Fix Error 18452 and SSPI Handshake Failures: Kerberos, SPNs and Trust Free Fix Error 15404: Could Not Obtain Information About Windows Group or User
โ† Back to Knowledge Base