0

I want to understand how the Oracle db active passive connection works with Node js. Currently my project is using loopback Oracle connector node module. What configuration I have to do in db or app or env level to complete the setup.

1 Answer 1

1

Asuming you connect through a connection pool you don’t need to do anything since the connection pool should take care of failed connections, as long as one succeeds.

This ofcourse assumes a correct sqlnet configuration in the connection pool, that by itself should be prefixed by a vip.

Sign up to request clarification or add additional context in comments.

4 Comments

Some of the node-oracledb doc on high available may help. Most (all?) of this can be set and used with Loopback.
I used connectString and passed DESCRIPTION_LIST, it is throwing "Error: ORA-12545: Connect failed because target host or object does not exist". const connectString =(DESCRIPTION_LIST=(LOAD_BALANCE=OFF)(FAILOVER=ON)(DESCRIPTION=(CONNECT_TIMEOUT=5)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=${process.env.DB_HOST_1})(PORT=${process.env.DB_PORT_1})))(CONNECT_DATA=(SERVICE_NAME=${process.env.DB_NAME_1})))(DESCRIPTION=(CONNECT_TIMEOUT=5)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=${process.env.DB_HOST_2})(PORT=${process.env.DB_PORT_2})))(CONNECT_DATA=(SERVICE_NAME=${process.env.DB_NAME_2}))));
It looks like host is not resolved to something useful.
what did you change? (I assume the HOST parameter)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.