Solved

SQL Server Linked DB Query creates multiple connections

Posted on 2013-11-22
2
22 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
Comment Utility
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
Comment Utility
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

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Join & Write a Comment

I have written a PowerShell script to "walk" the security structure of each SQL instance to find:         Each Login (Windows or SQL)             * Its Server Roles             * Every database to which the login is mapped             * The associated "Database User" for this …
Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

772 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

12 Experts available now in Live!

Get 1:1 Help Now