I have to compare columns of tables located in two different databases in two different servers. So far, I know how to connect to one server & one database using Perl script. Is it possible to connect to two different servers using Perl’s DBI module? If so, how?
Share
You connect to a database using
DBI->connect(). This returns a handle to that database. To connect to two databases, use two handles:Now you can use
$dbh1for the first database, and$dbh2for the second.