Linked Questions

5 votes
4 answers
20k views

How to query from a linked server via a linked server in sql server?

I have the following set-up: SQL-Server 1 --linked--> SQL-Server 2 --linked-> SQL-Server 3 The question is can I query SQL Server 3 from SQL Server 1 via SQL Server 2? I have ...
user avatar
  • 177
5 votes
2 answers
13k views

Selecting and Inserting into linked server

I am having a situation with linked server which I am not able to understand. So we have a linked server from a 2008R2 server to a 2014 server. The below sample query is executing from 2008R2 server ...
user avatar
  • 1,698
2 votes
4 answers
27k views

How can I query data from a linked server, and pass it parameters to filter by?

I have a really big query that needs to be run on multiple databases, and the results appended to a temp table and returned. The basic syntax looks something like this: INSERT INTO #tmpTable (Id, ......
user avatar
  • 8,269
4 votes
2 answers
15k views

Which timeout(s) are causing my linked server query to time out?

We have two databases on linked SQL Servers that are partially synchronized. Occasionally, one side goes down for an upgrade, then the other goes down for an upgrade, and then we re-synchronize. ...
user avatar
  • 770
3 votes
1 answer
5k views

Loopback Linked Server

Is there any benefit in use a Loopback Linked Server, maybe in a security or performance level, because I really don't get the idea ? I google it for several minutes and I find nothing about it.
user avatar
2 votes
4 answers
3k views

Copy table from one server to another including keys and indexes

I have been working on a small project for about two weeks. We want to consolidate a few tables from several remote server databases in order to run queries and reports on separate from the live ...
user avatar
  • 21
2 votes
1 answer
2k views

Four-part distributed Query issue from 2014 to 2008R2

From a SQL Server 2014 RTM in our DEV environement, I am executing this query using a SQL login. select t.noshipid, y.nofolder from distantserver.distantdatabase.dbo....
user avatar
  • 9,478
1 vote
1 answer
908 views

SSIS push and pull performance

After reading Which one is more efficient: select from linked server or insert into linked server? I wonder if this is true also for SSIS? For example, I have 2 SQL Servers (A and B) and SSIS ...
user avatar
  • 113
0 votes
2 answers
1k views

Slow performance when using a synonym that is configured to use a linked server

Situation: I’m not sure if I should be embarrassed that we did this, or if we should be applauded. Anyways, we have a shell of a database that has synonyms pointing to another server via a linked ...
user avatar
  • 173
0 votes
1 answer
696 views

Updating a local table with a per-row count(*) which is an aggregate of inner joins on remote server

I have a table of around 350m rows on a linked server in which I added an additional INT column to serve as a count(external_identification) of records as the result of a join on PACKAGE and DOC2. ...
user avatar
  • 1,221
2 votes
1 answer
536 views

SQL Server - How to improve/optimize remote scan on a linked server

I'm trying to figure it out how to optimize/improve the following thing, on a VM hosted in MS Azure and a database, also hosted in MS Azure. Besides the instance hosted in MS Azure, there is another ...
user avatar
  • 121
2 votes
0 answers
481 views

Performance Implications of Explicit Collation Conversions across Linked Servers

I locally host host databases from two vendors on two different SQL instances, but on the same network. These servers frequently communicate with each other (through joins and whatnot), so we have ...
user avatar
  • 45
2 votes
2 answers
116 views

SQL Server: migrate one table to discrete DB server

SQL Server 2012 Standard We have one table that is highly transactional (tons of inserts, no updates), that contains a BLOB object of 5kb-300kb per row. The whole table is about 31GB in size (table ...
user avatar
3 votes
1 answer
85 views

Joining from database A to view in database B; where is processing done?

If I join tables from database A to a view in database B (same server), are the joins within the view in database B processed on database B before joining to the tables in the current database?
user avatar
  • 423
0 votes
0 answers
88 views

Linked Server Performance

I have three MS SQL Servers, 2016. 1 source and two destinations. There is a linked server setup from each destination server to the source. We execute a simple select query from each destination ...
user avatar
  • 1

15 30 50 per page