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 > Load data in Federated Table

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-14-06, 15:34
himridul himridul is offline
Registered User
 
Join Date: Jan 2004
Posts: 66
Load data in Federated Table

Hi,

I'm using DB2 v8.1.1.40 and FixPak "4"

When I try to insert data into Federated table using load cursor, it doesn't work .. but if I use select insert, it works fine.

I'm running the following script (doesn't work) :

create nickname ORFED01.TEST for db2base.ORTMP01.TEST;
declare cpy_credit_data cursor for select * from ORDWTB.TEST;
load client from cpy_credit_data of cursor replace into ORFED01.TEST statistics yes nonrecoverable;

I'm getting the following error :
SQL3015N An SQL error "" occurred during processing

When I run the following script, it works :
create nickname ORFED01.TEST for db2base.ORTMP01.TEST;
insert into ORFED01.TEST select t.* from ORDWTB.TEST t

I don't understand why it doesn't work with load cursor; as load cursor is much more faster than select insert, I need to use load cursor process to insert data into the table.

Please let me know what you think.

Thanks in advance,
Mridul
__________________
himridul
Reply With Quote
  #2 (permalink)  
Old 06-15-06, 05:50
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Mridul, AFAIK, you cannot use LOAD to load data into a remote object ...

LOAD is not SQL

Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #3 (permalink)  
Old 06-15-06, 08:23
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Why not try turning it around. Instead of federating from the source to the target, federate from the target to the source. Make a nickname for the source table on the target server, then use load from cursor by running it on the target server. I do not know if this will work, but it should be worth a try.

Andy
Reply With Quote
  #4 (permalink)  
Old 06-15-06, 10:19
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Andy, That will work ... I have used it successfully in the past ..

Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #5 (permalink)  
Old 06-15-06, 16:41
himridul himridul is offline
Registered User
 
Join Date: Jan 2004
Posts: 66
Thanks to both of you for your valuable input. I know it would work if I do the stuffs in the trager server, but for this I had to open a new port instead of the existing opened port.
__________________
himridul
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