Oracle 11.2.0.1 logical standby database environment setup
First, create a physical standby database. After creating a physical standby database, it is best to create a separate spfile.
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;