v$archived_log详解
V$ARCHIVED_LOG视图描述了系统中已经归档的日志文件的相关信息。归档日志是ARCHIVELOG模式的一种,用来记录DML以及DDL对数据库中对象所做的更改,保护数据库以及实施重做数据库恢复。
V$ARCHIVED_LOG视图的主要用途是查看已经归档的日志的信息,确定要恢复的日志。可以直接执行:
#查询当前被归档日志的相关信息
SELECT ARCHIVED, DELETED, SEQUENCE#, RESETLOGS_CHANGE#,
FLAGS, ARCHIVE_DATE, ARCHIVE_SCN, SESSION_INFO
FROM V$ARCHIVED_LOG;
V$ARCHIVED_LOG
displays archived log information from the control file, including archive log names.An archive log record is inserted after the online redo log is successfully archived or cleared (name column is
NULL
if the log was cleared). If the log is archived twice, there will be two archived log records with the sameTHREAD#
,SEQUENCE#
, andFIRST_CHANGE#
, but with a different name. An archive log record is also inserted when an archive log is restored from a backup set or a copy and whenever a copy of a log is made with the RMANCOPY
command.
Column | Datatype | Description | 解释 |
---|---|---|---|
RECID |
NUMBER |
Archived log record ID | 归档日志记录的唯一标识号 |
STAMP |
NUMBER |
Archived log record stamp | 时间戳,与RECID 一起构成归档日志记录的全局唯一标识 |
NAME |
VARCHAR2(513) |
Archived log file name. If set to NULL , either the log file was cleared before it was archived or an RMAN backup command with the “delete input” option was executed to back up archivelog all (RMAN> backup archivelog all delete input; ). |
归档日志文件名 |
DEST_ID |
NUMBER |
Original destination from which the archive log was generated. The value is 0 if the destination identi |