Reputation: 1
I have written many Perl scripts to access Oracle dabases and DB2 databases (mostly the latter) in an AIX envionment.
I would now like to write a script that reads records from an Oracle DB and uses the informaton from each one to check related records in a DB2 DB. That is, establish a connection to both DB types, then in a loop, read oracle records and compare them to relevant DB2 records.
There are separate Perl modules for DB2 and Oracle, which is fine as I have both available. But it is not clear to me that it is possible to initiate both a DB2 envionment and an Oracle environment in the same Perl runtime environment.
I would like to know if this is possible, and if so, if there are any tricks or traps to watch out for.
Upvotes: -2
Views: 39
Reputation: 132896
There's nothing special about access different databases from the same script. Install the appropriate DBD
modules to handle each interface, and instantiate a new object for each of them.
I often have multiple connections to the same database even since different handles can have different permissions.
Upvotes: 0