Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Unanswered: XML Extender and Federation

    On a database d1, I have a table, schema1.tab1(col1 int,col2 db2xml.xmlvarchar)

    On a database d2, I have defined d1 as a federated server, calling it d1server.

    I attempt to create a nickname in d2 for tab1(in d1),
    create nickname nick1 for d1server.schema1.tab1

    Error: SQL0204N "DB2XML.VARCHAR" is an undefined name. SQLSTATE=42704

    I have XML Extender enabled on both the databases

    It is DB2 V 8.2 on AIX

    TIA for any help

    Sathyaram
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  2. #2
    Join Date
    Jan 2005
    Posts
    191
    Buried away in the Federated Systems Guide section "Data type mappings in a federated system" is the statement that "The remote data type cannot be a user-defined type". I believe that DB2 treats DB2XML as a user defined type - it's not part of the base product.

    You may have to create a view over the remote table - to cast the xmlvarchar to a simple varchar, create the nickname and then create a view over the nickname to cast the varchar back to an xmlvarchar. [But this paragraph may be simply hot air - never done this sort of thing.]

    James Campbell

  3. #3
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    Thank you James ...
    I did manage to create a view over the base table as you have suggested and it works fine ..

    Thanks

    Sathyaram
    Visit the new-look IDUG Website , register to gain access to the excellent content.

Posting Permissions

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