Troubleshooting Guide: SQL Server Error 13096 (Synonym Reference Failure)
Why This Error Happens
Error 13096 in Microsoft SQL Server 2025 occurs when a synonym object references a base object (table, view, or procedure) that either does not exist, has been renamed, or resides on a linked server that is currently unreachable. This is commonly triggered by schema drift—where the underlying object is dropped or altered without updating the dependent synonym—or by insufficient permissions on the base object that prevent the resolution engine from binding the synonym correctly. Additionally, corrupted metadata in the sys.synonyms catalog view following an interrupted DDL operation can cause this binding failure on Windows Server 2025 environments.
Step-by-Step Resolution Guide
Step 1: Verify the Base Object Existence
- Open SQL Server Management Studio (SSMS) and connect to the instance reporting the error.
- Run the following query to check the synonym’s target definition:
SELECT name, base_object_name FROM sys.synonyms WHERE name = 'YourSynonymName';
- Confirm that the
base_object_namepath (Server.Database.Schema.Object) is accurate and that the object has not been renamed or dropped.
Step 2: Validate Permissions and Security Context
- Check that the user or service account executing the query has
SELECTorEXECUTEpermissions on the underlying base object, not just the synonym itself. - Navigate to
Security > Loginsin SSMS and verify the user mapping for the target database. - If using a linked server, open SQL Server Configuration Manager (found in Windows 11/Server 2025 search bar) and ensure the linked server service account has network connectivity enabled.
Step 3: Drop and Recreate the Synonym
- If the base object has moved or been renamed, you must manually update the synonym since
ALTER SYNONYMis not supported in T-SQL. - Execute the drop command:
DROP SYNONYM dbo.YourSynonymName; - Recreate it pointing to the correct, current object path:
CREATE SYNONYM dbo.YourSynonymName FOR dbo.NewTargetTable;
Step 4: Clear the Cache and Restart Services
- Sometimes stale execution plans cause the resolver to look for ghost objects.
- Run
DBCC FREEPROCCACHE;to clear the procedure cache. - If the issue persists, restart the SQL Server (MSSQLSERVER) service via the Services app (
services.msc) on your Windows Server 2025 machine.
Alternative or Verification Steps
- Verification: Run a simple
SELECT * FROM dbo.YourSynonymName;query. If it returns data without the 13096 error, the binding has been successfully repaired. - Alternative: If the synonym continues to fail intermittently, bypass the synonym layer temporarily and reference the three-part or four-part name directly in your application’s connection string to isolate whether the issue is specific to the synonym layer or the underlying object’s availability.