SQL Server Error 1403 means the database mirroring witness cannot be reached or is not responding, so the principal and mirror cannot form a quorum to fail over automatically. The fix is to restore network connectivity and the witness instance, then verify that the witness database is ONLINE and that the mirroring endpoint is listening. You do not need to rebuild the mirroring session if the witness is simply offline; reconnecting the witness is usually enough.

What You'll Need

  • A login with ALTER ANY DATABASE or db_owner rights on the principal and mirror, and sysadmin or CONTROL SERVER rights on the witness to check its state.
  • Network access from both the principal and mirror to the witness server on the mirroring endpoint port (usually 5022).
  • The witness SQL Server instance installed and running, with the witness database created and set to FULL recovery model.
  • SQL Server Management Studio (SSMS) or sqlcmd on a machine that can reach all three servers.
  • The account names used by the mirroring endpoints, so you can confirm logins and permissions on the witness.

Step-by-Step

  1. Confirm the error is actually about the witness. In SSMS, right-click the mirrored database on the principal and choose Properties, then select Mirroring. The status panel usually shows the witness as disconnected or the session as suspended. On the mirror, run SELECT DB_NAME(database_id) AS db, mirroring_state_desc, mirroring_witness_name, mirroring_witness_state_desc FROM sys.database_mirroring WHERE mirroring_guid IS NOT NULL; and check that mirroring_witness_state_desc is not DISCONNECTED. If the witness is DISCONNECTED, continue below.
  2. Check that the witness SQL Server service is running. Log on to the witness server (or use a remote service console) and confirm the SQL Server (MSSQLSERVER) or named-instance service is started. If it stopped, start it. A stopped service is the most common cause of error 1403.
  3. Test network reachability from both partners. From the principal and from the mirror, run Test-NetConnection -ComputerName <witness> -Port 5022 in PowerShell, replacing the port with whatever your mirroring endpoint uses. If the test fails, the problem is a firewall, a routing rule, or the witness listening on a different port. Open the port on the witness firewall and on any network firewall between the servers.
  4. Verify the witness endpoint is listening. On the witness, run SELECT name, port, state_desc, role_desc FROM sys.database_mirroring_endpoints;. The endpoint should be STARTED. If it is STOPPED, run ALTER ENDPOINT <endpoint_name> STATE = STARTED;. If no endpoint exists, create one with CREATE ENDPOINT Mirroring STATE = STARTED AS TCP (LISTENER_PORT = 5022) FOR DATABASE_MIRRORING (ROLE = WITNESS); and grant CONNECT to the partner service accounts.
  5. Check the witness database state. On the witness, run SELECT name, state_desc, recovery_model_desc FROM sys.databases WHERE name = '<witness_db>';. The witness database must be ONLINE and in FULL recovery model. If it is RECOVERY_PENDING or SUSPECT, restore it from a backup of the principal taken after the last full backup, or recreate it with CREATE DATABASE <witness_db>; and ALTER DATABASE <witness_db> SET RECOVERY FULL;.
  6. Confirm the witness is still associated with the session. On the principal, run SELECT DB_NAME(database_id) AS db, mirroring_witness_name, mirroring_witness_state_desc FROM sys.database_mirroring WHERE mirroring_guid IS NOT NULL;. If the witness name is NULL, the session lost its witness setting. Re-add it with ALTER DATABASE <db> SET WITNESS = 'TCP://<witness>:5022';.
  7. Resume the mirroring session if it is paused or suspended. On the principal, run ALTER DATABASE <db> SET PARTNER RESUME;. If the session is suspended because of a prior failure, this restarts synchronization. If it fails again with 1403, return to the network and endpoint checks above before retrying.
  8. Verify the fix. Re-run the query from step 1. The witness state should read CONNECTED and the mirroring state should be SYNCHRONIZED or SYNCHRONIZING. In SSMS, the Mirroring page should show the witness as connected and the session as synchronized.

Common Mistakes

  • Restarting the mirror or principal before checking the witness. If the witness is the only failed component, restarting the partners adds downtime without fixing anything.
  • Assuming the witness database must contain data. A witness database is a dummy database; it only needs to exist, be ONLINE, and use FULL recovery. Restoring a full copy of the principal onto the witness is unnecessary and can cause confusion.
  • Forgetting the endpoint port in firewall rules. The mirroring endpoint port (often 5022) must be open on the witness and on both partners, in both directions.
  • Using the wrong service account. The logins used by the mirroring endpoints must exist on the witness and have CONNECT permission on the endpoint. A mismatch produces connection failures that look like error 1403.
  • Re-adding the witness with a hostname that does not resolve from both partners. Use a name that resolves consistently, or use the fully qualified domain name.
  • Leaving the witness database in SIMPLE recovery. It must be FULL for the witness role.

Tips

  • Keep the witness on a separate server from the principal and mirror so a single outage does not take down two of the three quorum members.
  • Monitor the witness with a simple query or alert on mirroring_witness_state_desc so you learn about a disconnect before an automatic failover is needed.
  • Document the endpoint port and service account names for all three servers; most 1403 incidents come down to one of those two details.
  • If you use a named instance, remember the SQL Browser service must be running for clients to resolve the instance name, or connect by port directly.
  • Test failover after any witness change so you know quorum works before you need it.

Troubleshooting

If the witness still shows DISCONNECTED after the steps above, work from the simplest checks outward. First, confirm the witness service is running and the endpoint is STARTED. Second, test the port from both partners with Test-NetConnection; a failure there points to firewall or routing, not to SQL Server. Third, check the SQL Server error log on the witness for login failures or endpoint errors around the time the disconnect started. Fourth, confirm the witness database is ONLINE and in FULL recovery. Fifth, confirm the witness name stored in the session matches the name that resolves from both partners.

If the session will not resume, remove and re-add the witness with ALTER DATABASE <db> SET WITNESS = 'TCP://<witness>:5022';. If that fails, remove the witness entirely with ALTER DATABASE <db> SET WITNESS = OFF;, confirm the principal and mirror are synchronized, then re-add the witness. Removing the witness does not delete data, but it disables automatic failover until the witness is re-added, so plan the change for a quiet period.

Frequently Asked Questions

What does SQL Server error 1403 actually mean?

It means the witness for the mirroring session received an error or could not be reached, so the session cannot maintain quorum for automatic failover. The principal and mirror may still be synchronized; only the witness connection is broken.

Does error 1403 cause data loss?

No. The witness does not store user data. It only provides the third vote for quorum. Fixing the witness connection restores automatic failover without touching the mirrored data.

Can I run database mirroring without a witness?

Yes, but only in high-safety mode without automatic failover. Without a witness, a failover must be forced manually, and forcing failover can lose data if the mirror is not synchronized.

Why does the witness keep disconnecting?

Common causes are a firewall or network device dropping the endpoint port, the witness service restarting, the witness database going offline, or a login/permission change on the witness endpoint. Check the witness error log for the disconnect reason.

Do I need to restore the principal database to the witness?

No. The witness database is a placeholder. It only needs to exist, be ONLINE, and use FULL recovery model.

Is database mirroring still supported?

Database mirroring is deprecated in newer SQL Server versions and is not available in SQL Server 2022 and later. If you are planning a new high-availability setup, use Always On availability groups instead; error 1403 applies to existing mirroring sessions on versions that still support it.