We often want to put data from all over the warehouse for unified application. You can now use replication technology to solve this problem. However, there are some conditions for implementing database replication.
First, the database should have advanced replication capabilities (log on to the database with system identity, view the V$option view, or support advanced replication if Advanced replication is true);
If you have advanced replication capabilities, the database will be initialized with some parameters.
Db_domain = test.com.cn Indicates the domain name of the database (the default is world), where you can use your company's domain name; Global_names = True it requires that the database link and the connected database name match. Global database name now: db_name+ "." +db_domain;
Parameters related to database job execution:
job_queue_processes = 1;
job_queue_interval = 60;
distributed_transactions = 10;
open_links = 4
The first line defines the number of starts of the SNP process as N. The system defaults to 0, the normal definition range is 0~36, depending on the number of tasks, you can configure different values. The second line defines that the system wakes up the process every n seconds. The system defaults to 60 seconds, and the normal range is 1-3,600 seconds. In fact, after the process finishes its current task, it goes to sleep and sleeps for a period of time, and the system's master is responsible for waking it up. If you modify these parameters, you will need to restart the database for the parameters to take effect.
After the preliminary preparation, we have to implement synchronous replication of the database.
Suppose there are two databases on the internet: one called China and one called Japan.
The specific configuration is as follows:
Database name: Japan
Database domain test.com.cn
Database SID number China, Japan
Listener Port number 1521
Server IP Address 10.1.0.100 10.1.0.200
Verify that two databases are accessible to each other and set the database connection string in Tnsnames.ora.
The Chinese side of the database connection string is the following format:
Japan =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.1.200)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = Japan)
)
)