Echoing PMroz's answer, this is really more of a DBA question. At least as far as querying two databases at once goes. Other wise, you could always query both databases separately and then join/update/concatenate the tables together.
dbhandle1 = Create Database Connection(info1);
sql1 = "";
table1 = Execute SQL(dbhandle1, sql1, "Table1");
dbhandle2 = Create Database Connection(info2);
sql2 = "";
table2 = Execute SQL(dbhandle2, sql2, "Table2");
table1 << Join(with(table2));