DBAtlas · Database operations atlas

7202: Could not find server 'name' in sys.servers

SQL Server

What does it mean?

The server name referenced in the query via a linked server or a four-part name (server.database.schema.object) was not found among the configured linked servers. SQL Server could not resolve the name.

Why does it happen?

The linked server was never defined; the name is misspelled; a linked server that exists in another environment (dev/prod) is missing in production; or OPENQUERY/the four-part name points to the wrong server name. Common when scripts are moved between servers.

How to fix it

List the defined linked servers: SELECT name FROM sys.servers; or EXEC sp_linkedservers. Add it if needed: EXEC sp_addlinkedserver @server='SERVER', ...; and set up login mapping with sp_addlinkedsrvlogin. Verify that the four-part name in the query uses the correct linked server name; if you only access a local object, remove the server prefix.

Open in DBAtlas →

More from this engine