If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > XML Extender and Federation

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-28-05, 17:19
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
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.
Reply With Quote
  #2 (permalink)  
Old 03-01-05, 02:17
jacampbell jacampbell is offline
Registered User
 
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
Reply With Quote
  #3 (permalink)  
Old 03-01-05, 02:27
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On