Solved

SQL Server Distributed Query  - what is the limit to how many different db's can be accessed in one query.

Posted on 2004-03-23
3
246 Views
Last Modified: 2007-12-19
Using a distributed, also called heterogeneous query with SQL Server 2000, what is the maximum number of different databases that can be referenced in a single query?     SQL Server 2000 supports  2^16-1 - 32767 databases in a named instance.    Again, the question is,  in a distributed query, such as :

SELECT s1.income, s2.contractlength  from  server1.database.owner.table s1, server2.database32.owner.table s2

how many different db's can be referenced in one query, is it indeed up to 32767 ? Or, can you cross query across 5 instances, including 150,000 references to db+table in the query.

Granted, 150,000 databases may seem absurd, however, I am wondering what the maxium is, whether it is 16 different databases, or even 32,767.

Tim Miltz

0
Comment
Question by:tfmiltz
3 Comments
 
LVL 13

Accepted Solution

by:
danblake earned 250 total points
ID: 10666269
It all becomes a lot lower:
Tables per SELECT statement 256...

So you can only reference a maximum of 256 different objects in a single query. (from linked servers/views/tables)
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
I have a large data set and a SSIS package. How can I load this file in multi threading?
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

832 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