Could not find server ‘server name’ in sys.servers. SQL Server 2014

At first check out that your linked server is in the list by this query select name from sys.servers If it not exists then try to add to the linked server EXEC sp_addlinkedserver @server=”SERVER_NAME” –or may be server ip address After that login to that linked server by EXEC sp_addlinkedsrvlogin ‘SERVER_NAME’ ,’false’ ,NULL ,’USER_NAME’ ,’PASSWORD’ … Read more

Why do I get the error “Xml data type is not supported in distributed queries” when querying a linked server for non-xml data?

This is a deficiency within SQL Server. The mere existence of an xml column on the table prevents it from participating in distributed queries (eg being queried through a linked server connection). This is mentioned in this ‘retired’ documentation. There doesn’t appear to be any mention of this in the current version’s documentation. There used … Read more

SQL Server Linked Server Example Query

The format should probably be: <server>.<database>.<schema>.<table> For example: DatabaseServer1.db1.dbo.table1 Update: I know this is an old question and the answer I have is correct; however, I think any one else stumbling upon this should know a few things. Namely, when querying against a linked server in a join situation the ENTIRE table from the linked … Read more

How to find a text inside SQL Server procedures / triggers?

here is a portion of a procedure I use on my system to find text…. DECLARE @Search varchar(255) SET @Search=”[10.10.100.50]” SELECT DISTINCT o.name AS Object_Name,o.type_desc FROM sys.sql_modules m INNER JOIN sys.objects o ON m.object_id=o.object_id WHERE m.definition Like ‘%’+@Search+’%’ ORDER BY 2,1

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)