2.0/dbhome_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 11.2.0.4.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/vLIFE-URE-OT-DB-STANDBY/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias? ? ? ? ? ? ? ? ? ? LISTENER
Version? ? ? ? ? ? ? ? ? TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date? ? ? ? ? ? ? ? 19-OCT-2015 11:14:41
Uptime? ? ? ? ? ? ? ? ? ? 0 days 0 hr. 0 min. 0 sec
Trace Level? ? ? ? ? ? ? off
Security? ? ? ? ? ? ? ? ? ON: Local OS Authentication
SNMP? ? ? ? ? ? ? ? ? ? ? OFF
Listener Parameter File? /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File? ? ? ? /u01/app/oracle/diag/tnslsnr/vLIFE-URE-OT-DB-STANDBY/listener/alert/log.xml
Listening Endpoints Summary...
? (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))
? (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "vlifesb" has 1 instance(s).
? Instance "vlifesb", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
在standby端,可以查看到持续后追的applied动作。
--Standby端
SQL> select recid, sequence#, ARCHIVED, APPLIED, DELETED from v$archived_log where name is not null;
? ? RECID? SEQUENCE# ARCHIVED APPLIED? DELETED
---------- ---------- -------- --------- -------
? ? ? ? 11? ? ? ? 32 YES? ? ? YES? ? ? NO
? ? ? ? 12? ? ? ? 33 YES? ? ? YES? ? ? NO
? ? ? ? 13? ? ? ? 34 YES? ? ? YES? ? ? NO
? ? ? ? 14? ? ? ? 35 YES? ? ? YES? ? ? NO
? ? ? ? 15? ? ? ? 36 YES? ? ? YES? ? ? NO
? ? ? ? 16? ? ? ? 37 YES? ? ? YES? ? ? NO
? ? ? ? 17? ? ? ? 38 YES? ? ? IN-MEMORY NO
7 rows selected
SQL> select recid, sequence#, ARCHIVED, APPLIED, DELETED from v$archived_log where name='vlifesb';
? ? RECID? SEQUENCE# ARCHIVED APPLIED? DELETED
---------- ---------- -------- --------- -------
(篇幅原因,有省略……)
? ? ? ? 28? ? ? ? 35 YES? ? ? YES? ? ? NO
? ? ? ? 30? ? ? ? 36 YES? ? ? YES? ? ? NO
? ? ? ? 32? ? ? ? 37 YES? ? ? YES? ? ? NO
? ? ? ? 34? ? ? ? 38 YES? ? ? NO? ? ? ? NO
17 rows selected
3、终止apply过程实验
如果standby端终止apply过程,后续的redo log不断传入到standby redo log中,看现象如何。
Standby端处理,终止应用日志过程。
--Standby端
SQL> select open_mode, database_role from v$database;
OPEN_MODE? ? ? ? ? ? DATABASE_ROLE
-------------------- ----------------
READ ONLY WITH APPLY PHYSICAL STANDBY
--终止应用日志
SQL> alter database recover managed standby database cancel;
Database altered
SQL> select open_mode, database_role from v$database;
OPEN_MODE? ? ? ? ? ? DATABASE_ROLE
-------------------- ----------------
READ ONLY? ? ? ? ? ? PHYSICAL STANDBY
此时,standby端日志上显示信息。
Mon Oct 19 11:18:53 2015
alter database recover managed standby database cancel
Mon Oct 19 11:18:53 2015
MRP0: Background Media Recovery cancelled with status 16037
Errors in file /u01/app/oracle/diag/rdbms/vlifesb/vlifesb/trace/vlifesb_pr00_9008.trc:
ORA-16037: user requested cancel of managed recovery operation
Managed Standby Recovery not using Real Time Apply
Recovery interrupted!
Recovered data files to a consistent state at change 1398760
Mon Oct 19 11:18:53 2015
MRP0: Background Media Recovery process shutdown (vlifesb)
Managed Standby Recovery Canceled (vlifesb)
Completed: alter database recover managed standby database cancel
此时,主库情况也是进行