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;