linked-server
Is there an “IF EXISTS” test for a linked server?
Check in sys.servers: if not exists(select * from sys.servers where name = N’myserver\devdb_1′)
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
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
How to create linked server MySQL
MySQL’s FEDERATED engine provides functionality similar to SQL Server’s Linked Server (and Oracle’s dblink) functionality, but doesn’t support connecting to vendors other than MySQL. It’s not clear from the question if you need the functionality to connect to vendors other than MySQL. You might want to look into MySQL Proxy. This doesn’t match the architecture … 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