Smart Systems for Home

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

SQL Server Error 1455: Fix Forced Mirroring Failures

· 5 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

Error 1455 ("The database mirroring service cannot be forced") appears when you try a forced failover with ALTER DATABASE ... SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS but SQL Server refuses to bring the mirror database online, usually because it cannot prove the principal is really offline or the mirror's redo queue and witness state make the failover unsafe. The fix is to verify the mirroring endpoints and witness, resolve the quorum situation, and only then force the service again — accepting that committed transactions may be lost.

What You'll Need

  • SYSADMIN or database owner permissions on the mirror server instance
  • Access to SQL Server Management Studio or sqlcmd on the mirror server
  • Knowledge of your mirroring topology: principal, mirror, and witness (if configured)
  • Network access between the servers so you can test endpoint connectivity
  • A verified recent backup, because a forced failover can lose committed data

Step-by-Step

  1. Confirm the current role and state. On the mirror server, run SELECT database_id, mirroring_role_desc, mirroring_state_desc, mirroring_witness_state_desc FROM sys.database_mirroring WHERE database_id = DB_ID('YourDB'); If the database is already the principal, there is nothing to force.
  2. Check why the force is blocked. The most common cause is a witness in place: with a witness, the mirror needs a quorum with either the witness or the principal to force service. If the witness is running but the mirror cannot contact it, error 1455 occurs.
  3. If you want a forced failover with a witness, remove the witness first. Run ALTER DATABASE YourDB SET WITNESS OFF; from the mirror server (this works even when the principal is unreachable, as long as you connect to the mirror). Removing the witness switches the session to high-safety mode without automatic failover and removes the quorum requirement.
  4. Retry the forced failover. On the mirror server run ALTER DATABASE YourDB SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS; The mirror recovers and comes online as the new principal.
  5. Verify the new role. Re-run the query from step 1. The database should now show PRINCIPAL and state SYNCHRONIZED or SUSPENDED.
  6. Bring the old principal back carefully. When the original server returns, its copy of the database is now the mirror and may be SUSPENDED. If the old principal had transactions that never reached the mirror, the session suspends on reconnect. You can either resume mirroring (keeping the new principal's copy as authoritative) or, if you cannot afford the data loss, stop and restore from the old copy instead — but do not resume until you have decided.
  7. Re-establish the witness if you use automatic failover. Once the pair is synchronized again, run ALTER DATABASE YourDB SET WITNESS = 'TCP://WitnessServer:7024'; from the current principal.
  8. Take a fresh full backup of the database on the new principal as soon as it is online, since the failover changed the recovery history.

Note: the exact T-SQL syntax above applies to SQL Server 2005 and later; the wording of error messages can differ slightly by version, but the commands are stable.

Common Mistakes

  • Forcing before removing the witness. With a witness configured, the mirror must reach a quorum; if it cannot, error 1455 keeps coming back until you run SET WITNESS OFF.
  • Running the command on the wrong server. FORCE_SERVICE_ALLOW_DATA_LOSS must run against the mirror instance, not the disconnected principal.
  • Resuming the session automatically after failover. If the old principal held unsent transactions, resuming overwrites that data permanently. Decide deliberately whether the old copy matters first.
  • Ignoring endpoint problems. A stopped endpoint, blocked port, or changed service account password will make the session fail to reconnect after the force. Check with SELECT * FROM sys.database_mirroring_endpoints; and verify the state is STARTED.
  • Not re-adding the witness. Forgetting this leaves the database in synchronous mode without automatic failover, silently changing your protection level.

Tips

  • Treat FORCE_SERVICE_ALLOW_DATA_LOSS as a disaster-recovery command. If the principal is merely slow, not down, wait or fix connectivity instead.
  • Check the SQL Server error log on the mirror for events around the failure — it usually names the quorum or connection reason explicitly.
  • After any forced failover, re-verify logins, jobs, and linked servers on the new principal; these are instance-level objects that mirroring does not copy.
  • If you no longer need automatic failover, consider running without a witness in high-safety mode, which makes forced failover simpler next time.
  • If your environment has outgrown mirroring, plan a migration to Always On availability groups, the successor technology, during a maintenance window.

Troubleshooting

  • Error 1455 persists even with the witness off: confirm the database on the mirror is actually in the MIRROR role and in a recovering state. If it is DISCONNECTED or the redo thread is stuck, restart the SQL Server service on the mirror instance and retry.
  • "The server network address cannot be reached": test the endpoint port from each server (for example with telnet MirrorServer 5022), check Windows Firewall rules, and confirm the ENDPOINT_URL in sys.database_mirroring_endpoints uses the correct port and server name.
  • Session stays SUSPENDED after the old principal returns: this means the old copy contains transactions that never reached the mirror. Run ALTER DATABASE YourDB SET PARTNER RESUME; only if you accept losing them; otherwise restore the old database elsewhere to salvage the data first.
  • Permission errors: you need CREATE DATABASE, ALTER, or ownership rights; a login that is only db_owner on some other database is not enough. Run ALTER AUTHORIZATION ON DATABASE::YourDB TO sa; on the mirror if ownership is unclear.
  • Witness will not re-attach: make sure the witness instance is running, its endpoint is started, and you issue SET WITNESS from the current principal, not the mirror.

Frequently Asked Questions

What does error 1455 actually mean?

SQL Server cannot force the mirroring service on the mirror instance, most often because a witness is configured and the mirror cannot form a quorum with the principal or the witness.

Will a forced failover lose data?

Possibly. Any transactions committed on the principal but not yet sent to the mirror are lost. That is why the command is named FORCE_SERVICE_ALLOW_DATA_LOSS.

Can I force failover without removing the witness?

Only if the mirror can still contact the witness to form a quorum. If it cannot, you must run SET WITNESS OFF first; otherwise the force fails with error 1455.

Does this apply to Always On availability groups?

No. Availability groups use a different failover mechanism and do not raise error 1455. This error is specific to database mirroring.

Is database mirroring still supported?

It is deprecated in current SQL Server versions but still works. Microsoft recommends Always On availability groups as the replacement for new deployments.

What happens to the old principal after I force the failover?

When it comes back online, its copy becomes the mirror and the session typically suspends. You can resume it (accepting the loss of any unsent transactions) or remove it from the session.