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.
| 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 QueryAnalyzer. It returns 13705 records. But when I execute select * fromLinkSrv.SI.DBO.SIHeader. It only return 885 records. If I specify somecolumns, 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 notfind 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?MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
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) |
 |
|
|
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?MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
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. |
 |
|
|
|
|
|
|
|