Oracle 11g Dataguard Duplicate physical standby configuration (i) Create configuration for physical repositories
# ver:1.5 Fifth time modified
# modify:2013.8.16
# Author:koumm
Description
The installation of this article is configured with Oracle 11g Dataguard to create a physical repository in duplicate mode.
The following are different points than the last configuration:
1. The main repository directory structure is different.
2. Create a physical repository in duplicate mode.
First, the environment introduction
1. Primary database environment
Operating system version: OEL5.8 x64
Database version: Oracle 11.2.0.3 x64
Database name: ORCL
Database SID:ORCL
Db_unique_name:orcl
Instance_name:orcl
Dgmgrl:orcl_dgmgrl
2. Prepare the Storehouse environment
Operating system version: OEL5.8 x64
Database version: Oracle 11.2.0.3 x64 (Oracle database software only installed, no NETCA DBCA)
Database name: Slave
Database Sid:slave
Db_unique_name:slave
Instance_name:slave
Dgmgrl:slave_dgmgrl
3. Dataguard Boot Sequence
Boot sequence: First set up the library, and then restart the main library
Off order: First off Main library, after Guan Beiku
Second, the primary database environment preparation
1. Main Library Environment contrast
Make full use of the original environment of the primary database, only the amount of the main library parameter configuration does not make too many changes.
Re-create password file
# su-oracle
$ orapwd file= '/U01/APP/ORACLE/PRODUCT/11.2.0/DB_1/DBS/ORAPWORCL ' password=oracle entries=10 force=y
2. Modify configuration Lisener listening files
Note: Add DGMGRL static listener configuration to lay the groundwork for the later DG broker configuration.
$ cat/u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
LISTENER =
(Description_list =
(DESCRIPTION =
(address = (PROTOCOL = TCP) (HOST = 192.168.233.200) (PORT = 1521))
(address = (PROTOCOL = IPC) (KEY = EXTPROC1521))
)
)
Sid_list_listener =
(Sid_list =
(Sid_desc =
(Global_dbname = ORCL)
(Oracle_home =/u01/app/oracle/product/11.2.0/db_1)
(Sid_name = ORCL)
)
(Sid_desc =
(Global_dbname = ORCL_DGMGRL)
(Oracle_home =/u01/app/oracle/product/11.2.0/db_1)
(Sid_name = ORCL)
)
)
Adr_base_listener =/u01/app/oracle
#其中的GLOBAL_DBNAME具有固定的格式:<db_unique_name>_dgmgrl.<db_domain>.
4. Modify Configuration Tnsname.ora File
Description: ORCL is the service name of the main library, and DG is the service name of the standby library.
$ vi/u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora
ORCL =
(DESCRIPTION =
(address = (PROTOCOL = TCP) (HOST = 192.168.233.200) (PORT = 1521))
(Connect_data =
(SERVER = dedicated)
(service_name = ORCL)
)
)
SLAVE =
(DESCRIPTION =
(address = (PROTOCOL = TCP) (HOST = 192.168.233.150) (PORT = 1521))
(Connect_data =
(SERVER = dedicated)
(service_name = slave)
)
)
5. Modify the configuration of the stereotypes file mode
1), check whether the database is in the file state
sql> archive log list;
sql> shutdown immediate;
sql> startup Mount;
sql> ALTER DATABASE Archivelog;
Sql> ALTER DATABASE flashback on;
sql> ALTER DATABASE open;
2), the main library is set to FORCE LOGGING mode
sql> ALTER DATABASE force logging;
Sql> select force_logging,flashback_on from V$database;
For flashback_on
--- ------------------
Yes Yes
6. Modify the main library parameter file
Sql>
Alter system set Instance_name= ' ORCL ' scope=spfile;
Alter system set Db_unique_name= ' ORCL ' scope=spfile;
Alter system set local_listener= ' ORCL ' scope=spfile;
Alter system set log_archive_config= ' dg_config= (orcl,slave) ';
Alter system set log_archive_dest_1= ' Location=/u01/archivelog/valid_for= (all_logfiles,all_roles) db_unique_name= Orcl ' Scope=spfile;
Alter system set log_archive_dest_2= ' Service=slave lgwr async valid_for= (online_logfiles,primary_role) db_unique_name =slave ' Scope=spfile;
Alter system set log_archive_format= ' Arch_%r_%t_%s.arc ' scope=spfile;
Alter system set fal_client= ' ORCL ' scope=spfile;
Alter system set fal_server= ' slave ' scope=spfile;
alter system set Standby_file_management=auto;
ALTER DATABASE ADD standby logfile Group 4 '/u01/app/oracle/oradata/orcl/standby_redo04.log ' size 50M;
ALTER DATABASE ADD standby logfile Group 5 '/u01/app/oracle/oradata/orcl/standby_redo05.log ' size 50M;
ALTER DATABASE ADD standby logfile Group 6 '/u01/app/oracle/oradata/orcl/standby_redo06.log ' size 50M;
ALTER DATABASE ADD standby logfile Group 7 '/u01/app/oracle/oradata/orcl/standby_redo07.log ' size 50M;
See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/database/Oracle/