7202: Could not find server 'name' in sys.servers
SQL ServerWhat 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.
More from this engine
- 18452Login failed. The login is from an untrusted domain and cannot be used with Windows authentication
- 605Attempt to fetch logical page belongs to a different allocation unit
- 4922ALTER TABLE ALTER COLUMN failed because one or more objects access this column
- 40501The service is currently busy. Retry the request after 10 seconds
- 8645A time out occurred while waiting for memory resources to execute the query
- 8651Could not perform the operation because the requested memory grant was not available
- 5061ALTER DATABASE failed because a lock could not be placed on database