Let us understand one-by-one:
- Configuration: First and the foremost is configuring and letting Oracle know where the Master and Slave is. The complexity shall increase if you need to replicate the entire database objects. However, the configuring the Master and the Slave is the first step. This configuration is done using
TNSNames.ora
file.
This means, any Client that would want to connect to an Oracle instance would need the settings configured in the configuration file(s) 'TNSNames.ora' and listener.ora
. This rule is applicable for any Client API that intends to establish connection with the Oracle instance such as (JDBC, Pro*C, etc).
- Database Links: Creating database links is the next step to configure the physical tables. This will be the second-step in establishing the link between the configuration file and the physical database.
Based on the driver you use (Thin / OCI), the System Identifier (SID) will establish the connection to the master or to the slave. The host-string will let the JDBC know where to connect, etc.
BTW, the replication concept is deprecated from 12c and it is recommended to use GoldenGate.
Hope this helps you.