Queries against a DB2 linked server return a fixed quantity of bytes??

  • I linked a DB2 database to my sql server with

    sp_addlinkedserver 'srv1.MYDOMAIN.com', 'DB2', 'MSDASQL', null, null, 'DSN=srv1.MYDOMAIN.COM;UID=user1;PWD=mypass', null

    after creating an ODBC entry called "srv1.MYDOMAIN.COM" with the Client Access ODBC Driver (32-bit) driver.

    The thing is, when I run a query, it returns what I guess is a fixed quantity of bytes!!! For instance, I query a customers table that has 34031 rows and I only get the first 35 (customers 1 to 35). Then I say "ok, give me all rows but the ones for customer 1,2,3,4 and 5". The query returns again 35 rows, but in this case I get customers 6 to 41!!! 

    I tried several variations of this and I confirmed it is a matter of quantity of information.

    Has anyone fought with this before!?!?

    Thanks!!

  • Try changing the columns you get, I'd bet you get a different row cont. We fought this issue using Client Access going against a AS/400 and didn't get a resolution that I remember. We had to work around it. It was apparently a data volume issue iwth both IBM and MS pointing at each other. I'd lean towards a client access issue, personally.

  • Thanks Steve!

    Luckily, I found the answer:

    Open the ODBC entry, go to "Performance" -> "Advanced" -> and uncheck "Use blocking with a fetch of 1 row"

    Regards,

    Alejandro

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply