Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert using select between two subsytems

Status
Not open for further replies.

hnkdb2

Technical User
Jun 10, 2004
2
US
Hi

How to insert by select between two subsystems.

insert into dbxx.table1 --> sub system dbxa
select * from dbyy.table1 --> sub system dbya

ofcouse the above will not work, as both of them belong to different system.

Please advise, whether we can do like this or not.
This is just to avoid unload and load.

thanks
Hari
 
How about using DRDA federated wrapper ?
ex) insert into target_table select * from source table;

drop wrapper drda;
create wrapper drda;

CREATE SERVER sdldemo TYPE DB2/6000 Version 7.2 WRAPPER DRDA
authorization "eseinst1" password "eseinst1"
OPTIONS ( NODE 'this', DBNAME 'sample' );


create user mapping for eseinst1 server sdldemo
options ( remote_authid 'eseinst1', remote_password 'eseinst1')
;

drop nickname dl_org;
drop nickname dl_aa;

create nickname dl_org for sdldemo.eseinst1.org ;
create nickname dl_aa for sdldemo.eseinst1.aa ;

insert into target select * from dl_aa;
 
Hari,

I was thinking along the lines of

insert into dbxa.dbxx.table1
select * from dbya.dbyy.table1

Cheers
Greg
 
Hi Greg

thanks for advice, as I was not able to run this query using batch spufi, then I did in QMF, but getting message like
The query reference to a remote object is invalid.

pls advise on reference to remote database, it is not a remote, one database in TSOC and other is in TSOW. Is it required to mention nodes, etc.

thanks
Hari
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top