Connecting multiple databases
Hi,
I'm looking to connect to two (possibly three databases). I'm using NodeJS/Express/node-oracledb and orawrap. Is this possible? If so how can I do this?
Thanks
@hardy21 I don't recommend using Orawrap. At this point, we've brought over almost every feature of Orawrap into the core driver, only more robustly.
In the last release of the driver, we added a built in Pool cache. You can assign poolAliases when creating pools and then use the alias to retrieve a connection from the given pool.
I am currently using the precompiled node-oracle by bchr02 https://github.com/oracle/node-oracledb/issues/18. If I don't use orawrap and change to work with the core driver, do you see any potential problems? or should it work the same way?
Seems those binaries are being kept up to date, what version are you using? You'll need to be on version 1.11 to get the pool cache.
The APIs for Orawrap and the core driver are different, so there will probably be some work in converting over. I still recommend this (the sooner the better).
The only thing we haven't brought over yet is the simple execute method. You can do this on your own using the technique described here.