As described earlier, Oracle provides two ways for database-level replication:
A, Maintain_global
B, Pre_instantiation_setup, Post_instantiation_setup
Maintain_global is suitable for small and medium-sized database creation, while Pre_instantiation_setup+post_instantiation_setup is suitable for the creation of large database, here we demonstrate through pre_ The Instantiation_setup and Post_instantiation_setup procedures Create a database-level streams replication environment.
Set the environment as follows:
Source database Sid:jssweb, Target library: jssstr (the target library does not exist, we will clone one via Rman duplicate)
The Do_domain are all jss.cn
Source Library Local Capture
Replication Environment for bidirectional replication
Synchronous DDL Operations
Target library initialization via Rman
Use direct configuration without generating scripts
Tip: The capture process does not capture changes to several schema Sys/system/ctxsys. Therefore, the modifications under these users are not maintained in the streams environment.
First, the preparatory work:
1, set the identifier
In order to distinguish the database in which the operation is located, it is easy to read, we first set the operator through the Sql*plus set sqlprompt command.
To set the source Library side display:
[Oracle@yans1 ~]$ Export Oracle_sid=jssweb
[Oracle@yans1 ~]$ Sqlplus "/As SYSDBA"
Sql*plus:release 10.2.0.3.0-production on Tuesday November 25 16:4 1:40 2008
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition release 10.2.0.3.0-64bit Production
With the partitioning, OLAP and Data Mining options
Sql> set Sqlprompt "Jssweb>"
Jssweb>
To set the target library display:
[Oracle@yanttest ~$ Export ORACLE_SID=JSSSTR
[Oracle@yanttest ~]$ Sqlplus "/As SYSDBA"
Sql*plus:release 10.2.0.3.0-production on Tuesday November 25 16:43:43 2008
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
You are connected to an idle routine.
Sql> set Sqlprompt "Jssstr>"
Jssstr>
2. Create JSSSTR Auxiliary instance
This step is mainly for the following implementation of the Rman duplicate command to lay the groundwork for the creation of auxiliary instances of related operations, if you do not understand, recommend reference to the [Note]rman advanced application Duplicate copy database, because this step is slightly cumbersome, And not the main content described in this section, in order to avoid this step to occupy too much space to affect the line of sight, do not provide detailed steps.
3, set source and target-side monitoring and tnsnames
Mainly modify the two machines%oracle_home/network/admin/listener.ora and Tnsnames.ora, to ensure that the monitoring has been started, the two machines interconnected interoperability.
Source-and target-side Tnsnames.ora adds the following:
jssweb_172.25.13.229 =
(DESCRIPTION =
(address = (PROTOCOL = TCP) (HOST = 172.25.13.229) (PORT = 1521))
(Connect_data =
(SERVER = dedicated)
(service_name = jssweb.jss.cn)
)
)
jssstr_172.25.13.231 =
(DESCRIPTION =
(address = (PROTOCOL = TCP) (HOST = 172.25.13.231) (PORT = 1521))
(Connect_data =
(SERVER = dedicated)
(service_name = jssstr.jss.cn)
)
)
Source-Side Listening Listener.ora Add the following:
Sid_list_listener =
(Sid_list =
(Sid_desc =
(Sid_name = Plsextproc)
(Oracle_home =/opt/ora10g/product/10.2.0/db_1)
(program = Extproc)
)
(Sid_desc =
(Global_dbname = jssweb.jss.cn)
(Oracle_home =/opt/ora10g/product/10.2.0/db_1)
(Sid_name = jssweb)
)
)
The target side is also modified accordingly:
Sid_list_listener =
(Sid_list =
(Sid_desc =
(Sid_name = Plsextproc)
(Oracle_home =/data/oracle/product/10.2)
See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/database/Oracle/