Veritabanı bazında linked server kullanan Stored Procedure, View, Trigger, Funtion vs bilgilere ve bunların kullandığı linked server, veritabanı adı, şema adı ve tablo adını aşağıdaki sorgu ile bulabilirsiniz:
SELECT DISTINCT
DB_NAME() AS DatabaseName,
OBJECT_SCHEMA_NAME (ed.referencing_id) AS SchemaName,
OBJECT_NAME (ed.referencing_id) AS ObjectName,
ed.referenced_Server_name AS LinkedServerName,
ed.referenced_database_name AS LinkedServerDatabaseName,
ed.referenced_schema_name AS LinkedServerSchemaName,
ed.referenced_entity_name As LinkedServerTableName
FROM sys.sql_expression_dependencies ed WITH (NOLOCK)
WHERE referenced_database_name IS NOT NULL
AND referenced_Server_name IS NOT NULL