Re: Can I join tables from different databases?

Daniel Gross <[email protected]>
Newsgroups gmane.comp.lang.as400.rpg
Message-ID <[email protected]>
Hi Steve,

Oracle had an DRDA client available. I also thought they had a DRDA server component, but it was not for free.

MS-SQL also has an DRDA client and AFAIK also a DRDA server as an extra option.

With MySQL the best option in IMHO to install MySQL on IBM i and use the DB2 table storage engine. Then use this MySQL server as your MySQL database. If this isn't possible, real-time replicate the data from the "productive" MySQL to the MySQL on IBM i.

Kind regards,
Daniel


> Am 08.02.2026 um 15:22 schrieb Steve M <[email protected]>:
> 
> Used to do this with Oracle all the time. IBM didn't (then) have the capability to Alias to another system, but Oracle did/does.
> 
> I'd build an Alias reference to the DB2 instance within Oracle (a one-time thing). Then in the program open the JDBC connection, then run the SQL statement within Oracle. Kind of counter intuitive,  but worked without issues.
> 
> I'd write it all in DBeaver first, within the Oracle connection, to ensure the syntax and results before coding the SQLRPGLE program.
> Hope that helps.
> 
> Steve M.
> 
> Sent from my Verizon, Samsung Galaxy smartphone
> Get Outlook for Android<https://aka.ms/AAb9ysg>
> ________________________________
> From: RPG400-L <[email protected]> on behalf of gio.cot via RPG400-L <[email protected]>
> Sent: Sunday, February 8, 2026 7:57:33 AM
> To: 'RPG programming on IBM i' <[email protected]>
> Cc: gio.cot <[email protected]>
> Subject: Can I join tables from different databases?
> 
> Hi all
> i would need to execute SQL statement (in RPGLE program) that join a IBM i
> Table with a MySql table that is stored in a external data base (windows
> server) ...
> in your opinion is it possbile ??
> Thanks in advance
> 
> Gio
-- 
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: [email protected]
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: [email protected]
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact [email protected] for any subscription related questions.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.