Oracle 11g DataGuard Physical standby configuration and active DataGuard testing

Source: Internet
Author: User
Tags oracle database

Description

This article installs the Oracle 11g Dataguard physical repository and tests the 11g Dataguard physical Repository's new feature active Data Guard, which is a function of Oracle Database Enterprise Edition, which requires the amount External authorization, this article is for testing only.

First, the 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. 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 SID Name: ORCL

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 main database configuration

1. Configure Hosts File

# vi/etc/hosts

192.168.233.200 Rman

192.168.233.150 slave

2. Modify configuration Lisener listening files

$ 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 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)

)

)

DG =

(DESCRIPTION =

(address = (PROTOCOL = TCP) (HOST = 192.168.233.150) (PORT = 1521))

(Connect_data =

(SERVER = dedicated)

(service_name = ABC)

)

)

4. 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 open;

2), the main library is set to FORCE LOGGING mode

sql> ALTER DATABASE force logging;

Sql> select force_logging from V$database;

Force_log

———

YES

5. Modify 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 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;

Shutdown immediate

Startup

Create Pfile from SPFile;

6. Copy the Pfile file to the standby repository.

$ Scp/u01/app/oracle/product/11.2.0/db_1/dbs/initorcl.ora 192.168.233.150:/home/oracle/

Third, the preparation of the library configuration

1. Configure Hosts File

# vi/etc/hosts

192.168.233.200 Rman

192.168.233.150 slave

2. Modify configuration Lisener listening files

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/database/Oracle/

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.