Oracle11gR2 logical standby Database Construction

Source: Internet
Author: User
In the logical standby database environment of oracle11.2.0.1, you must first create a physical standby database. After creating a physical standby database, you are advised to stop the redo application alterdatabaserecovermanagedSTANDBYdatabasecancel on the physical standby database of your spfile; when logminer is generated on the master database, the following error occurs when switching logs: Ignore executedbms_logstd.

Oracle 11.2.0.1 logical STANDBY database environment construction first create a physical STANDBY database. After creating a physical STANDBY database, it is best to create a separate spfile physical STANDBY database to stop the redo application alter database recover managed STANDBY database cancel; when logminer is generated on the master database, the following errors occur when switching logs are generated: execute dbms_logstd is ignored.

Oracle 11.2.0.1 logical standby database environment setup

First, create a physical standby database. It is best to create a spfile after creating a physical standby database.

Stop the redo application on the physical standby Database

Alter database recover managed STANDBY database cancel;

When logminer is generated on the master database, several switching logs are generated and the error is ignored.

Execute dbms_logstdby.build;

Convert physical standby database to logical standby Database

Alter database recover to logical standby orcl; <-- db_name Parameter

Shutdown immediate

Startup mount

SELECT db_unique_name, open_mode, database_role, switchover_status, guard_status, protection_mode from v $ DATABASE;

Rebuilding the password file of the logical standby on the slave Database

Orapwd file = $ ORACLE_HOME/dbs/orapwstby password = oracle entries = 5 ignorecase = y force = y

Modify parameters on the slave Database

Alter system set log_archive_dest_1 = 'location =/u01/oradata/arch/stby valid_for = (online_logfiles, all_roles) db_unique_name = stby ';

Alter system set log_archive_dest_2 = 'location =/u01/oradata/arch valid_for = (standby_logfiles, standby_roles) db_unique_name = stby ';

Create backup log on the slave Database

Alter database add standby logfile group 4 ('/u01/oradata/stby/standbylj01.log') size 20 M reuse;

Alter database add standby logfile group 5 ('/u01/oradata/stby/standbylj02.log') size 20 M reuse;

Alter database add standby logfile group 6 ('/u01/oradata/stby/standbylj03.log') size 20 M reuse;

Select member from v $ logfile;

Enable logical standby on the slave Database

Alter database open resetlogs;

Alter database start logical standby apply immediate;

Slave database check

Select instance_name, status from v $ instance;

SELECT db_unique_name, open_mode, database_role, switchover_status, guard_status, protection_mode from v $ DATABASE;

Select group #, sequence #, used, status from v $ standby_log;

Test

Create on master database

Create table scott. t4 (id int );

Insert into scott. t4 values (4 );

Commit;

Alter system switch logfile;

Query on the logical standby database later

Select * from scott. t4;

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.