Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Return records through a linked server that uses O

Author  Topic 

with2000
Starting Member

3 Posts

Posted - 2004-08-05 : 00:07:35
Hi,

I used sp_addlinkedserver to link to a remote server through ODBC.
When I execute select count(*) from LinkSrv.SI.DBO.SIHeader in SQL Query
Analyzer. It returns 13705 records. But when I execute select * from
LinkSrv.SI.DBO.SIHeader. It only return 885 records. If I specify some
columns, select ODCOMP, ODPONO, ODVDCD from LinkSrv.SI.DBO.SIHeader.
It returns more records, 1213 records.

I guess there is something limit the return storage, but I can not
find it.

Any suggestion will be appreciated. Thank you

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2004-08-05 : 00:49:50
There shouldn't be. Is that your entire query, or is there more to it? What type of linked server is this? Have you ran these same queries directly on the other server?

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

with2000
Starting Member

3 Posts

Posted - 2004-08-05 : 01:38:05
Yes. It is my entire query. I am using MSDASQL. I have ran these same queries directly on the other server. It works well.

I checked the execution plan. There is Argument:
SOURCE:(LinkSrv), QUERY:(SELECT Tbl1001."ODCOMP" Col1003,
Tbl1001."ODPONO" Col1004 FROM "SI"."DBO"."SIHeader" Tbl1001)


Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2004-08-05 : 08:33:33
What do you mean it works well? What were the results when you ran them directly on the other server?

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

with2000
Starting Member

3 Posts

Posted - 2004-08-05 : 21:13:32
I am using MSDASQL to link to a AS400/DB2. Now, I think I have found the answer. I tried to change some configure in ODBC. The records of result set have been changed. So this problem is caused by ODBC DB2 drive provided by IBM. Anyway, thank you.
Go to Top of Page
   

- Advertisement -