og sequence 21
Next log sequence to archive 23
Current log sequence 23
SQL> alter system switch logfile;
System altered.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /DBBackup/Archive
Oldest online log sequence 22
Next log sequence to archive 23
Current log sequence 24
#standby查看日志的sequence号也跟着变了
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /DBBackup/Archive
Oldest online log sequence 22
Next log sequence to archive 0
Current log sequence 23
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /DBBackup/Archive
Oldest online log sequence 22
Next log sequence to archive 0
Current log sequence 24
SQL>
9、查看standby启动的DG进程
SQL> select process,client_process,sequence#,status from v$managed_standby;
PROCESS CLIENT_P SEQUENCE# STATUS
--------- -------- ---------- ------------
ARCH ARCH 23 CLOSING
ARCH ARCH 0 CONNECTED //归档进程
ARCH ARCH 21 CLOSING
ARCH ARCH 0 CONNECTED
RFS ARCH 0 IDLE
RFS UNKNOWN 0 IDLE
RFS LGWR 24 IDLE //归档传输进程
RFS UNKNOWN 0 IDLE
MRP0 N/A 24 APPLYING_LOG //日志应用进程
9 rows selected.
10、查看数据库的保护模式:
#primary 端查看,我们可以看到数据库的保护模式为最大性能
SQL> select database_role,protection_mode,protection_level,open_mode from v$database;
DATABASE_ROLE PROTECTION_MODE PROTECTION_LEVEL OPEN_MODE
---------------- -------------------- -------------------- --------------------
PRIMARY MAXIMUM PERFORMANCE MAXIMUM PERFORMANCE READ WRITE
#standby 端查看,也是一样的。
SQL> select database_role,protection_mode,protection_level,open_mode from v$database;
DATABASE_ROLE PROTECTION_MODE PROTECTION_LEVEL OPEN_MODE
---------------- -------------------- -------------------- --------------------
PHYSICAL STANDBY MAXIMUM PERFORMANCE MAXIMUM PERFORMANCE MOUNTED
11、查看DG的日志信息
SQL> select * from v$dataguard_status;
FACILITY SEVERITY DEST_ID MESSAGE_NUM ERROR_CODE CAL TIMESTAMP MESSAGE
------------------------ ------------- ---------- ----------- ---------- --- --------- --------------------------------------------------------------------------------
Log Transport Services Informational 0 1 0 NO 17-JUN-15 ARC0: Archival started
Log Transport Services Informational 0 2 0 NO 17-JUN-15 ARC1: Archival started
Log Transport Services Informational 0 3 0 NO 17-JUN-15 ARC2: Archival started
Log Transport Services Informational 0 4 0 NO 17-JUN-15 ARC2: Becoming the 'no FAL' ARCH
Log Transport Services Informational 0 5 0 NO 17-JUN-15 ARC2: Becoming the 'no SRL' ARCH
Log Transport Services Informational 0 6 0 NO 17-JUN-15 ARC1: Becoming the heartbeat ARCH
Log Transport Services Control 0 7 0 YES 17-JUN-15 ARC2: Beginning to archive thread 1 sequence 15 (882580-883734)
Log Transport Services Informational 0 8 0 NO 17-JUN-15 ARC3: Archival started
Log Transport Services Control 0 9 0 YES 17-JUN-15 ARC2: Completed archiving thread 1 sequence 15 (882580-883734)
Log Transport Services Control 0 10 0 YES 17-JUN-15 LGWR: Beginning to archive log 2 thread 1 sequence 17
Log Transport Services Control 0 11 0 YES 17-JUN-15 ARC2: Beginning to archive thread 1 sequence 16 (883734-883788)
Log Transport Services Control 0 12 0 YES 17-JUN-15 ARC2: Completed archiving thread 1 sequence 16 (883734-883788)
Log Transport Services Warning 2 13 3113 NO 17-JUN-15 LGWR: Attempting destination LOG_ARCHIVE_DEST_2 network