Monday, February 20, 2012

Linked Server

Here is bug in SQL 2000. In linked server, SQL query such
as "Select * from openquery (<LinkName>, 'Select * from
<Table name> where <key> in (-- list of key values --
--)')" works well as long as number of items in key
list are limited to 300 or so. In enterprise environment
where one deals with large data, this openquery fails
when items in key list are more then 1000.
Plain query with more then 1000 items in key list works
well against table in SQL server database and other
company product database (which is linked in above case)
when run separately.
In above case, other company database is linked with
provider as "Microsoft OLE DB Provider for ODBC" and data
source is a User DSN in ODBC.
Any comments...Shirish Kokate (kokateshirish@.hotmail.com) writes:
quote:

> Here is bug in SQL 2000. In linked server, SQL query such
> as "Select * from openquery (<LinkName>, 'Select * from
><Table name> where <key> in (-- list of key values --
> --)')" works well as long as number of items in key
> list are limited to 300 or so. In enterprise environment
> where one deals with large data, this openquery fails
> when items in key list are more then 1000.
> Plain query with more then 1000 items in key list works
> well against table in SQL server database and other
> company product database (which is linked in above case)
> when run separately.
> In above case, other company database is linked with
> provider as "Microsoft OLE DB Provider for ODBC" and data
> source is a User DSN in ODBC.

And the error message the statement fails with is?
What DB engine do you have on the other side?
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

No comments:

Post a Comment