Solved

SQL Server Linked DB Query creates multiple connections

Posted on 2013-11-22
2
26 Views
Last Modified: 2015-11-05
I created a linked server in SQL 2008 to an external DB without any issues. However, each time I run a query against this DB, there seem to be multiple connections to the DB it's linking to. For example, I ran a simple SELECT col1 FROM LINKTEST..SYSTEM.table
and there were two connections made to the external DB server.
Looking at the logging from the other server it looks like it first does a SELECT * from SYSTEM.table and then actually runs SELECT col1 FROM LINKTEST.SYSTEM.table

Is this to be expected? It seems like each time I add a table to the query I get two more processes on the external DB.
0
Comment
Question by:esb91077
2 Comments
 
LVL 26

Accepted Solution

by:
Zberteoc earned 100 total points
ID: 39669023
If you did everything according to documentation, I am referring to the linked server, and your query works then I wouldn't worry.  If you want to find out what the SQL engine does in the background then use the SQL profiler and you will see,
0
 

Author Comment

by:esb91077
ID: 39669864
It's an issue because the external DB that it's connecting to is a per connection license. So they are quickly running out licenses because complex queries are making a ton of connections. I'll look into SQL profiler to see what I can find.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now