?
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
Medium Priority
?
249 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 13

Accepted Solution

by:
danblake earned 1000 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

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

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

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Suggested Courses

801 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