Smart Systems for Home

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

SQL Server Error 1429: Witness Server Instance Name Fix

· 7 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 1429, "The witness server instance name must be", occurs when you try to configure database mirroring with a witness and the witness server name you entered is missing the instance name or is otherwise invalid. The fix is to provide the witness server in the correct ServerName\InstanceName format (or just ServerName for a default instance), ensure the witness instance is actually reachable and running, and verify that the mirroring endpoint and permissions are correctly set up on all three servers. This guide walks you through the exact steps to resolve the error and get mirroring working.

What You'll Need

  • Three SQL Server instances: principal, mirror, and witness. The witness can be any edition that supports mirroring (Express included).
  • Network connectivity between all three servers on the mirroring endpoint port (default 5022).
  • SQL Server service accounts with the necessary permissions to connect to each other's endpoints.
  • Access to SQL Server Management Studio (SSMS) or T-SQL to run configuration commands.
  • The exact server and instance names for each SQL Server instance. You can find the instance name by running SELECT @@SERVERNAME on each server.

Step-by-Step

  1. Identify the correct witness server name and instance name. On the server you intend to use as the witness, open a query window and run SELECT @@SERVERNAME. This returns the full name in the format ServerName\InstanceName for a named instance, or just ServerName for a default instance. Write this down exactly as it appears. The error 1429 is triggered when the name you enter does not include the instance name for a named instance, or when the name is malformed.
  2. Open the Database Mirroring configuration dialog. In SSMS, connect to the principal server, right-click the database you want to mirror, select Tasks > Mirror (or Properties > Mirroring). The exact menu path may vary slightly by SSMS version. Click Configure Security to start the Configure Database Mirroring Security Wizard.
  3. Enter the witness server name correctly. When the wizard asks for the witness server, type the full instance name exactly as returned by @@SERVERNAME. For example, if the witness is a named instance called SQLWITNESS on server WITNESS01, enter WITNESS01\SQLWITNESS. If it is a default instance, enter just WITNESS01. Do not add extra spaces, quotes, or a port number here. The wizard uses this name to generate the mirroring endpoint configuration; an incorrect format causes error 1429.
  4. Verify the witness instance is running and reachable. On the principal server, open a command prompt and run ping WITNESS01 to confirm network connectivity. Then use telnet WITNESS01 5022 (or PowerShell's Test-NetConnection) to check that the mirroring endpoint port is open. If the witness instance is stopped or the port is blocked by a firewall, the wizard may fail with error 1429 or a related connection error.
  5. Ensure the mirroring endpoint exists on the witness. On the witness server, run:
    SELECT name, type_desc, state_desc FROM sys.database_mirroring_endpoints;
    If no endpoint exists, create one with:
    CREATE ENDPOINT Mirroring STATE = STARTED AS TCP (LISTENER_PORT = 5022) FOR DATABASE_MIRRORING (ROLE = WITNESS);
    Replace the port if you use a non-default. The role should be WITNESS for the witness server.
  6. Grant connect permissions on the endpoint. The service account of the principal and mirror servers must be able to connect to the witness endpoint. On the witness, run:
    GRANT CONNECT ON ENDPOINT::Mirroring TO [Domain\ServiceAccount];
    Repeat for each service account. If you use SQL Server logins, create logins for the service accounts and grant connect. Without this, the wizard may report error 1429 because it cannot establish the connection to validate the witness name.
  7. Complete the wizard and start mirroring. After entering the correct witness name and verifying connectivity, proceed through the wizard. It will create the mirroring endpoints on the principal and mirror (if they don't exist) and start mirroring in synchronous mode with a witness. If you still see error 1429, double-check the witness name format and that the witness instance is not using a dynamic port that differs from the one you specified.
  8. Verify mirroring status. Run SELECT mirroring_role_desc, mirroring_state_desc, mirroring_witness_name FROM sys.database_mirroring WHERE database_id = DB_ID('YourDatabase'); on the principal. The witness name should match what you entered, and the state should be SYNCHRONIZED once the mirror catches up.

Common Mistakes

  • Omitting the instance name for a named instance. The most common cause of error 1429 is entering just the server name when the witness is a named instance. Always use ServerName\InstanceName.
  • Using the wrong separator. Use a backslash (\), not a forward slash or a colon. The format is strict.
  • Including the port number in the witness name field. The wizard expects only the instance name; the port is configured separately in the endpoint.
  • Typing the name manually with typos. Copy the output of SELECT @@SERVERNAME to avoid mistakes.
  • Assuming the witness is reachable because you can ping it. The SQL Server Browser service must be running on the witness if you use a named instance and dynamic ports, or you must specify the correct static port in the endpoint.
  • Forgetting to grant connect permissions. Even with the correct name, the wizard may fail if the service accounts cannot authenticate to the witness endpoint.

Tips

  • Use fully qualified domain names (FQDN) if your servers are in different domains or workgroups, but ensure DNS resolution works from all servers.
  • Test the witness name by running SELECT * FROM sys.dm_os_enumerate_filesystem? Actually, a better test is to try connecting to the witness instance from the principal using SSMS with the exact name you plan to enter. If that fails, fix connectivity first.
  • If you use certificates for endpoint authentication, ensure the certificates are created and exchanged correctly; otherwise, error 1429 may appear alongside other connection errors.
  • Keep the witness on a separate physical server or VM from the principal and mirror to maintain quorum in case of failover.
  • Document the exact instance names and ports for all three servers to avoid confusion during future reconfigurations.

Troubleshooting

If you still encounter error 1429 after following the steps, work through these checks in order:

  1. Confirm the witness name format. Run SELECT @@SERVERNAME on the witness and compare it character by character with what you entered. If the witness is a named instance, the name must include the backslash and instance name.
  2. Check the SQL Server Browser service. For named instances using dynamic ports, the SQL Server Browser service must be running on the witness so clients can resolve the instance name to the correct port. Start it via SQL Server Configuration Manager.
  3. Test connectivity with the exact name. From the principal server, open SSMS and try to connect to the witness using the name you entered. If that fails, the issue is network or authentication, not the mirroring wizard. Resolve the connection error first.
  4. Verify firewall rules. Ensure that inbound and outbound rules allow traffic on the mirroring endpoint port (default 5022) on all three servers. Also allow the SQL Server Browser port (UDP 1434) if using named instances with dynamic ports.
  5. Check endpoint states. On each server, run SELECT name, state_desc, role_desc FROM sys.database_mirroring_endpoints;. The endpoint should be STARTED and have the correct role (WITNESS on the witness, PARTNER on principal and mirror). If the endpoint is stopped, start it with ALTER ENDPOINT Mirroring STATE = STARTED;.
  6. Review SQL Server error logs. Look for messages related to endpoint connection failures or authentication errors on all three instances. These often provide more detail than the generic 1429 error.
  7. Try configuring mirroring with T-SQL instead of the wizard. Sometimes the wizard has quirks. You can set the witness manually using ALTER DATABASE YourDatabase SET WITNESS = 'TCP://WITNESS01\SQLWITNESS:5022'; on the principal. If this succeeds, the wizard input was the problem.

Frequently Asked Questions

What does error 1429 actually mean?

It means the witness server instance name you provided is not in the correct format or cannot be validated. SQL Server expects the name to include the instance name for named instances, separated by a backslash.

Can I use an IP address as the witness server name?

No, the witness server name must be a valid SQL Server instance name (server\instance). IP addresses are not supported in this field.

Does the witness server need to be in the same domain?

Not necessarily, but if it is in a different domain or workgroup, you must use certificate-based authentication for the mirroring endpoints instead of Windows authentication.

Why does the wizard still fail after I enter the correct name?

Check that the witness instance is running, the mirroring endpoint is started, and the service accounts have connect permissions. Also verify that the SQL Server Browser service is running if you use a named instance.

Can I configure a witness without the wizard?

Yes, you can use T-SQL commands to create endpoints and set the witness. This is often more reliable for troubleshooting because you can see each step's output.

What if I don't have a witness server?

Database mirroring can run in high-safety mode without a witness, but automatic failover requires a witness. If you don't need automatic failover, you can skip the witness configuration.