Reputation: 571
How do I get one name for the primary and standby database, such that I may connect to the primary site but in case of a disaster, the same name can redirect connections to the DR automatically.
Do we have such as an option in Autonomous Data Guard on Autonomous Database?
Upvotes: 0
Views: 185
Reputation: 19
After having enabled an Autonomous Data Guard for your Autonomous Database on Serverless infrastructure, you need to come up with a single Oracle Net service name for your application.
You can build one manually in your tnsnames.ora.
Assuming you have configured ATP-S with Autonomous Data Guard cross-region between Paris and Marseille and that you use a simple TLS connection from a private subnet (which means that you only need to point to a directory containing just your tnsnames.ora using a $TNS_ADMIN environment variable), your entry might be similar to the following model:
<myatp>_tp_ha =
(description_list= (failover=on) (load_balance=off)
(description= (retry_count=15)(retry_delay=3)
(address=(protocol=tcps)(port=1521)(host=<ATP-S private endpoint's IP in Paris>))
(connect_data=(service_name=<service-root-name>_tp.adb.oraclecloud.com))
(security=(ssl_server_dn_match=no))
)
(description= (retry_count=15)(retry_delay=3)
(address=(protocol=tcps)(port=1521)(host=<ATP-S private endpoint's IP in Marseille>))
(connect_data=(service_name=<service-root-name>_tp.adb.oraclecloud.com))
(security=(ssl_server_dn_match=no))
)
)
This should allow your application to connect to whichever end happens to be the primary database (Paris or Marseille).
Upvotes: -1
Reputation: 571
On Autonomous Database on Shared Infrastructure, once a user enables cross-region Autonomous Data Guard (ADG), the wallet file's tnsnames.ora
is updated to contain the hostnames of both the Primary database and the Standby database.
So after enabling ADG and downloading a new database wallet, using the one single wallet, a user should be able to connect to the Primary database as well as the remote Standby database, after a switchover/failover.
Read more about this behaviour in the Oracle documentation on Autonomous Data Guard.
Ref - I am a product manager on the Oracle Autonomous Database :)
Upvotes: 1