Oracle 11g Dataguard Physical standby configuration (iv) Broker snapshot standby test

Source: Internet
Author: User
Tags commit failover reserved

Oracle 11g Dataguard Snapshot standby database functionality, which places the standby in open read/write state and simulates the test in the main library of the production environment. When the standby snapshot standby task completes, you can switch back to the physical repository role. In the state of snapshot standby database, the repository can accept the log from the main library, but it cannot apply the change to the repository.

This article uses Oracle 11g Dataguard broker Snapshot Standby configuration

1. Use DG Broker configuration Snapshot Standby configuration

1) View configuration information

$ DGMGRL sys/oracle

DGMGRL for Linux:version 11.2.0.3.0-64bit Production

Copyright (c), 2009, Oracle. All rights reserved.

Welcome to the DGMGRL, for information, type Help.

is connected.

Dgmgrl> show configuration;

Configuration-Dgorcldb

Protection mode: Maxperformance

Database:

ORCL-Primary Database

Slave-Physical Standby database

Quick Start Failover: DISABLED

Configuration Status:

SUCCESS

2. Conversion repository to mirror library (snapshot standby)

Dgmgrl> Convert database slave to snapshot standby;

Please wait while the database "slave" is being converted to a snapshot standby database ...

Database "Slave" has been successfully converted

Dgmgrl>

Dgmgrl> Show Configuration

Configuration-Dgorcldb

Protection mode: Maxperformance

Database:

ORCL-Primary Database

Slave-Snapshot Standby database

Quick Start Failover: DISABLED

Configuration Status:

SUCCESS

Dgmgrl>

3. Test Mirror Library

1) operation on the standby library

[Oracle@slave ~]$ Sqlplus/nolog

Sql*plus:release 11.2.0.3.0 Production on Saturday August 17 21:35:29 2013

Copyright (c) 1982, Oracle. All rights reserved.

Sql> Conn/as sysdba;

is connected.

Sql> select Open_mode,database_role,db_unique_name from V$database;

Open_mode Database_role Db_unique_name

-------------------- ---------------- ------------------------------

READ WRITE SNAPSHOT STANDBY Slave

#此次镜像库已经是打开状态, database roles are also snapshot STANDBY.

Sql> Conn ABC/ABC

is connected.

Sql> SELECT * FROM ABC;

ID NAME

---------- ----------

0 AAA

1 BBB

Sql> INSERT INTO ABC values (one, ' fffff ');

1 lines have been created.

Sql> commit;

Submit completed.

Sql> SELECT * FROM ABC;

ID NAME

---------- ----------

One FFFFF

0 AAA

1 BBB

Sql>

2) View on the main library

Sql> select Open_mode,database_role,db_unique_name from V$database;

Open_mode Database_role Db_unique_name

-------------------- ---------------- ------------------------------

READ WRITE PRIMARY ORCL

Insert a record on the main library and switch the log.

Sql> Conn ABC/ABC

Sql> SELECT * FROM ABC;

ID NAME

---------- ----------

0 AAA

1 BBB

Sql> INSERT INTO ABC values (2, ' CCC ');

1 lines have been created.

Sql> commit;

Submit completed.

Sql> SELECT * FROM ABC;

ID NAME

---------- ----------

2 CCC

0 AAA

1 BBB

Sql>

Sql> Conn/as sysdba;

sql> alter system switch logfile;

sql> archive log list;

Database log Mode archive mode

AutoArchive enabled

Archive Endpoint/u01/archivelog/

The oldest online log sequence 16

Next Archive log sequence 18

Current log Sequence 18

A new record is added to the main library and the log is switched, stating that the 17th log is the log of the file just now.

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.