Configuration
Name: maa
Enabled: YES
Protection Mode: MaxPerformance
Fast-Start Failover: DISABLED
Databases:
rac - Physical standby database
orcl - Primary database
Current status for "maa":
SUCCESS
单实例数据库(原备库)日志信息如下:
[oracle@server49 dbs]$ tail -f /u01/app/oracle/admin/orcl/bdump/alert_orcl.log
Managed Standby Recovery Canceled (orcl)
Sat Jan 14 22:36:17 CST 2012
Completed: ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL
Sat Jan 14 22:36:17 CST 2012
ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY WAIT WITH SESSION SHUTDOWN
Sat Jan 14 22:36:17 CST 2012
ALTER DATABASE SWITCHOVER TO PRIMARY (orcl)
If media recovery active, switchover will wait 900 seconds
SwitchOver after complete recovery through change 565100
Online log /u01/app/oracle/oradata/ORCL/onlinelog/group_1.307.772367339: Thread 1 Group 1 was previously
cleared
Online log /u01/app/oracle/oradata/ORCL/onlinelog/group_2.306.772367347: Thread 1 Group 2 was previously
cleared
Online log /u01/app/oracle/oradata/ORCL/onlinelog/group_3.305.772367577: Thread 2 Group 3 was previously
cleared
Online log /u01/app/oracle/oradata/ORCL/onlinelog/group_4.304.772367577: Thread 2 Group 4 was previously
cleared
Standby became primary SCN: 565098
Converting standby mount to primary mount.
Sat Jan 14 22:36:21 CST 2012
Switchover: Complete - Database mounted as primary (orcl)
Completed: ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY WAIT WITH SESSION SHUTDOWN
Sat Jan 14 22:36:21 CST 2012
ARC3: STARTING ARCH PROCESSES
ARC5: Archival started
ARC3: STARTING ARCH PROCESSES COMPLETE
Sat Jan 14 22:36:36 CST 2012
Job queue slave processes stopped
Waiting for dispatcher 'D000' to shutdown
All dispatchers and shared servers shutdown
Sat Jan 14 22:36:38 CST 2012
alter database CLOSE NORMAL
ORA-1109 signalled during: alter database CLOSE NORMAL...
rac数据库(原主库)节点1日志信息如下:
[oracle@rac1 ~]$ tail -f /u01/app/oracle/admin/rac/bdump/alert_rac1.log
Reconfiguration complete
Sat Jan 14 22:39:18 CST 2012
Using STANDBY_ARCHIVE_DEST parameter default value as +FRA/rac/standbylog
Sat Jan 14 22:39:18 CST 2012
ALTER SYSTEM SET log_archive_dest_2='location="+FRA/rac/standbylog"',' valid_for=
(STANDBY_LOGFILE,STANDBY_ROLE)' SCOPE=BOTH SID='rac1';
Using STANDBY_ARCHIVE_DEST parameter default value as +FRA/rac/standbylog
Sat Jan 14 22:39:18 CST 2012
ALTER SYSTEM SET log_archive_dest_state_2='ENABLE' SCOPE=BOTH SID='rac1';
Sat Jan 14 22:39:18 CST 2012
ALTER SYSTEM SET standby_archive_dest='+FRA/rac/standbylog' SCOPE=BOTH SID='rac1';
Sat Jan 14 22:39:18 CST 2012
ALTER SYSTEM SET log_archive_trace=0 SCOPE=BOTH SID='rac1';
Sat Jan 14 22:39:18 CST 2012
ALTER SYSTEM SET log_archive_format='%t_%s_%r.dbf' SCOPE=SPFILE SID='rac1';
Sat Jan 14 22:39:19 CST 2012
ALTER SYSTEM SET standby_file_management='auto' SCOPE=BOTH SID='*';
Sat Jan 14 22:39:19 CST 2012
ALTER SYSTEM SET archive_lag_target=0 SCOPE=BOTH SID='*';
Sat Jan 14 22:39:19 CST 2012
ALTER SYSTEM SET log_archive_max_processes=5 SCOPE=BOTH SID='*';
Sat Jan 14 22:39:19 CST 2012
ALTER SYSTEM SET log_archive_min_succeed_dest=1 SCOPE=BOTH SID='*';
Sat Jan 14 22:39:19 CST 2012
ALTER SYSTEM SET db_file_name_convert='+DATA/rac','/u01/app/oracle/oradata/orcl' SCOPE=SPFILE;
Sat Jan 14 22:39:19 CST 2012
ALTER SYSTEM SET
log_file_name_convert='+FLASH/rac','/u01/app/oracle/flash_recover_area/orcl','+DATA/rac','/u01/app/oracle/orada
ta/orcl' SCOPE=SPFILE;
Sat Jan 14 22:39:19 CST 2012
ALTER SYSTEM SET fal_server='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.49)
(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=orcl_XPT.yang.com)(SERVER=dedicated)))' SCOPE=BOTH;
Sat Jan 14 22:39:19 CST 2012
ALTER SYSTEM SET fal_client='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=rac1-vip.yang.com)
(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=rac_XPT.yang.com)(INSTANCE_NAME=rac1)(SERVER=dedicated)))' SCOPE=BOTH;
Sat Jan 14 22:39:19 CST 2012
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL
Sat Jan 14 22:39:20 CST 2012
MRP0: Background Media Recovery cancelled with status 16037
Sat Jan 14 22:39:20 CST 2012
Errors in file /u01/app/oracle/admin/rac/bdump/rac1_mrp0_22837.trc:
ORA-16037: user requested cancel of managed recovery operation
Sat Jan 14 22:39:20 CST 2012
Managed Standby Recovery not using Real Time Apply
Sat Jan 14 22:39:20 CST 2012
Recovery interrupted!
Recovered data files to a consistent state at change 565576
Sat Jan 14 22:39:21 CST 2012
Errors in file /u01/app/oracle/admin/rac/bdump/rac1_mrp0_22837.trc:
ORA-16037: user requested cancel of managed recovery operation
Sat Jan 14 22:39:21 CST 2012
MRP0: Background Media Recovery process shutdown (rac1)
Sat Jan 14 22:39:21 CST 2012
Managed Standby Recovery Canceled (rac1)
Sat Jan 14 22:39:21 CST 2012
Completed: ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL
Sat Jan 14 22:39:21 CST 2012
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE THROUGH ALL SWITCHOVER DISCONNECT USING CURRENT LOGFILE
Sat Jan 14 22:39:21 CST 2012
Attempt to start background Managed Standby Recovery process (rac1)
MRP0 started with pid=36, OS id=23667
Sat Jan 14 22:39:21 CST 2012
MRP0: Background Managed Standby Recovery process started (rac1)
Sat Jan 14 22:39:26 CST 2012
Managed Standby Recovery starting Real Time Apply
Sat Jan 14 22:39:26 CST 2012
parallel recovery started with 2 processes
Sat Jan 14 22:39:27 CST 2012
Waiting for all non-current ORLs to be archived...
Media Recovery Waiting for thread 1 sequence 31 (in transit)
Sat Jan 14 22:39:27 CST 2012
Recovery of Online Redo Log: Thread 1 Group 11 Seq 31 Reading mem 0
Mem# 0: +FRA/rac/onlinelog/group_11.303.772371907
Sat Jan 14 22:39:27 CST 2012
Completed: ALTER DATABASE RECOVER MANAGED STANDBY DATABASE THROUGH ALL SWITCHOVER DISCONNECT USING CURRENT
LOGFILE
Sat Jan 14 22:39:48 CST 2012
Media Recovery Waiting for thread 1 sequence 32
Sat Jan 14 22:39:48 CST 2012
Redo Shipping Client Connected as PUBLIC
-- Connected User is Valid
RFS[5]: Assigned to RFS process 23859
RFS[5]: Identified database type as 'physical standby'
Primary database is in MAXIMUM PERFORMANCE mode
Primary database is in MAXIMUM PERFORMANCE mode
RFS[5]: Successfully opened standby log 11: '+FRA/rac/onlinelog/group_11.303.772371907'
NSV0 started with pid=46, OS id=23866
Sat Jan 14 22:39:56 CST 2012
Recovery of Online Redo Log: Thread 1 Group 11 Seq 32 Reading mem 0
Mem# 0: +FRA/rac/onlinelog/group_11.303.772371907
Sat Jan 14 22:40:15 CST 2012
Redo Shipping Client Connected as PUBLIC
-- Connected User is Valid
RFS[6]: Assigned to RFS process 24003
RFS[6]: Identified database type as 'physical standby'
[oracle@server49 ~]$ sqlplus sys/123456@orcl as sysdba
SQL*Plus: Release 10.2.0.5.0 - Production on Sat Jan 14 22:47:14 2012
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select name,db_unique_name,open_mode,database_role,switchover_status from v$database;
NAME DB_UNIQUE_NAME OPEN_MODE DATABASE_ROLE SWITCHOVER_STATUS
--------- -------------------- ---------- ---------------- --------------------
RAC orcl READ WRITE PRIMARY SESSIONS ACTIVE
SQL> conn sys/123456@rac as sysdba
Connected.
SQL> select name,db_unique_name,open_mode,database_role,switchover_status from gv$database;
NAME DB_UNIQUE_NAME OPEN_MODE DATABASE_ROLE SWITCHOVER_STATUS
--------- -------------------- ---------- ---------------- --------------------
RAC rac MOUNTED PHYSICAL STANDBY SESSIONS ACTIVE
RAC rac MOUNTED PHYSICAL STANDBY SESSIONS ACTIVE
SQL> conn /as sysdba
Connected.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 31
Next log sequence to archive 32
Current log sequence 32
SQL> alter system switch logfile;
System altered.
SQL> select first_time,next_time,sequence#,thread#,applied from v$archived_log where thread#=1 and sequence# >
30;
FIRST_TIM NEXT_TIME SEQUENCE# THREAD# APP
--------- --------- ---------- ---------- ---
14-JAN-12 14-JAN-12 31 1 YES
14-JAN-12 14-JAN-12 32 1 YES