This article installed and configured the oracle11g‑uard physical standby database, and tested the new feature of the 11g‑uard physical standby database active‑uard, Which is OracleDatabaseEn
This article installed and configured the Oracle 11g slave uard physical standby Database, and tested the new feature of the 11g slave uard physical standby Database Active Data Guard, which is the Oracle Database En
Note:
This article installed and configured the Oracle 11g slave uard physical standby Database, and tested the new feature of the 11g slave uard physical standby Database Active Data Guard. It is a feature of Oracle Database Enterprise Edition and requires additional authorization, this document is only used for testing.
Read more: configure the Oracle 11g replicuard test to create a Physical Standby Database)
For more information about DG, see Oracle Data Guard Concepts and Administration.
For details about the parameters for configuring DG, refer to important configuration parameters of Oracle Data Guard.
Configure Oracle 11g Data Guard based on the same host
I. Environment Introduction
1. primary database environment
Operating system version: OEL5.8 x64
Database Version: Oracle 11.2.0.3 x64
Database sid Name: orcl
2. Standby database environment
Operating system version: OEL5.8 x64
Database Version: Oracle 11.2.0.3 x64 (only oracle database software is installed, no netca dbca)
Database sid Name: orcl
3. Sequence uard startup sequence
Startup sequence: Start the slave database first and then start the master database
Close sequence: first shut down the master database, then shut down the slave Database
Ii. Primary Database Configuration
1. Configure the hosts file
# Vi/etc/hosts
192.168.233.200 rman
192.168.233.150 slave
2. Modify the lisener listening File
$ 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)
)
)
3. Modify the tnsname. ora File
Note: ORCL is the service name of the master database and DG is the service name of the slave database.
$ 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)
)
)
DG =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.233.150) (PORT = 1521 ))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = abc)
)
)
4. modify the configuration to the rule file mode.
1) check whether the database is archived
SQL> archive log list;
SQL> shutdown immediate;
SQL> startup mount;
SQL> alter database archivelog;
SQL> alter database open;
2) set the master database to force logging mode.
SQL> alter database force logging;
SQL> select force_logging from v $ database;
FORCE_LOG
---
YES
5. Modify the parameter file
SQL>
Alter system set db_unique_name = 'orcl 'scope = spfile;
Alter system set log_archive_config = 'dg _ CONFIG = (ORCL, DG )';
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 = DG lgwr async valid_for = (online_logfile, primary_role)
Db_unique_name = DG ';
Alter system set fal_client = 'orcl ';
Alter system set fal_server = 'dg ';
Alter system set standby_file_management = auto;
Alter database add standby logfile group 4'/u01/app/oracle/oradata/orcl/standby_redo04.log 'size 50 M; alter database add standby logfile group 5'/u01/app/oracle/oradata/orcl/standby_redo05.log 'size 50 M;
Alter database add standby logfile group 6'/u01/app/oracle/oradata/orcl/standby_redo06.log 'size 50 M; alter database add standby logfile group 7'/u01/app/oracle/oradata/orcl/standby_redo07.log 'size 50 M;
Shutdown immediate
Startup
Create pfile from spfile;
6. Copy the pfile file to the slave database.
$ Scp/u01/app/oracle/product/11.2.0/db_1/dbs/initorcl. ora 192.168.233.150:/home/oracle/