Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54

    Unanswered: DB2 linked server

    I've been rummaging through my clay tablets, and have unearthed some paleolithic software... DB2 Connect, v8 (c) 2004.

    I've got it running on a test machine, and I'm trying to conjour up a working Linked Server so that I can access both the zOS DB2 7.1 data and the SQL 2005 data at the same time. I've got the linked server working to the extent that I can open the catalog collection and see the zOS tables, and I can send a query to DB2... The problem is that when DB2 attempts to return the results to SQL 2005, it fails with the message:
    Code:
    Msg 7356, Level 16, State 1, Line 1
    The OLE DB provider "IBMDADB2" for linked server "DB2" supplied inconsistent metadata for a column. The column "NAME" (compile-time ordinal 1) of object ""SYSIBM"."SYSTABLES"" was reported to have a "DBTYPE" of 129 at compile time and 130 at run time.
    Does anybody have any clues on how to make this work just a wee bit better?

    -PatP

  2. #2
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    I can get as far as understanding the types that are involved (see here http://msdn.microsoft.com/en-us/libr...8(VS.85).aspx), but as to how to handle it, I am a bit mystified. perhaps if you convert the name column in the query to DB2's equivalent of varchar?

    EDIT: That should be DB2's equivalent of nvarchar. It is reported as varchar, but seen as unicode.

  3. #3
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    I know little of that DB2, but I bet Kaiser knows something if he could be reached.

    Inconsistent? Is there any way of renaming things in DB2? Just a thought.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  4. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Based on a helpful post from n_i in the DB2 Forum, I've got this beastie working using OpenQuery() with a later IBM FixPack. It isn't what I really want, but it appears to be good enough to get me by for the moment.

    I'd still appreciate any other suggestions.

    -PatP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •