V$BACKUP_FILES 电玩女神 2023-10-18 21:35 27阅读 0赞 ### V$BACKUP\_FILES ### `V$BACKUP_FILES` displays information about all RMAN backups (both image copies and backup sets) and archived logs. This view simulates the `LIST BACKUP` and `LIST COPY` RMAN commands. This view requires that the database be set using the `DBMS_RCVMAN.SETDATABASE` procedure. <table> <thead> <tr> <th><span style="color:#000000;"><strong>Column</strong></span></th> <th><span style="color:#000000;"><strong>Datatype</strong></span></th> <th><span style="color:#000000;"><strong>Description</strong></span></th> </tr> </thead> <tbody> <tr> <td><span style="color:#000000;"><code>PKEY</code></span></td> <td><span style="color:#000000;"><code>NUMBER</code></span></td> <td><span style="color:#000000;">Primary key for the backup</span></td> </tr> <tr> <td><span style="color:#000000;"><code>BACKUP_TYPE</code></span></td> <td><span style="color:#000000;"><code>VARCHAR2(32)</code></span></td> <td><span style="color:#000000;">Type of the backup:</span> <ul> <li> <p><span style="color:#000000;"><code>BACKUP SET</code></span></p> </li> <li> <p><span style="color:#000000;"><code>COPY</code></span></p> </li> <li> <p><span style="color:#000000;"><code>PROXY COPY</code></span></p> </li> </ul></td> </tr> <tr> <td><span style="color:#000000;"><code>FILE_TYPE</code></span></td> <td><span style="color:#000000;"><code>VARCHAR2(32)</code></span></td> <td><span style="color:#000000;">Type of the file:</span> <ul> <li> <p><span style="color:#000000;"><code>DATAFILE</code></span></p> </li> <li> <p><span style="color:#000000;"><code>CONTROLFILE</code></span></p> </li> <li> <p><span style="color:#000000;"><code>SPFILE</code></span></p> </li> <li> <p><span style="color:#000000;"><code>REDO LOG</code></span></p> </li> <li> <p><span style="color:#000000;"><code>COPY</code> (for an image copy backup)</span></p> </li> <li> <p><span style="color:#000000;"><code>PIECE</code> (for a backup piece)</span></p> </li> </ul></td> </tr> <tr> <td><span style="color:#000000;"><code>KEEP</code></span></td> <td><span style="color:#000000;"><code>VARCHAR2(3)</code></span></td> <td><span style="color:#000000;">Indicates whether the backup has a retention policy different from the value for <code>CONFIGURE RETENTION POLICY</code> (<code>YES</code>) or not (<code>NO</code>)</span></td> </tr> <tr> <td><span style="color:#000000;"><code>KEEP_UNTIL</code></span></td> <td><span style="color:#000000;"><code>DATE</code></span></td> <td><span style="color:#000000;">If the <code>KEEP UNTIL TIME</code> clause of the <code>BACKUP</code> command was specified, then this column shows the date after which the backup becomes obsolete. If the column is null and <code>KEEP_OPTIONS</code> is not null, the backup never becomes obsolete.</span></td> </tr> <tr> <td><span style="color:#000000;"><code>KEEP_OPTIONS</code></span></td> <td><span style="color:#000000;"><code>VARCHAR2(13)</code></span></td> <td><span style="color:#000000;"><code>KEEP</code> options for the backup:</span> <ul> <li> <p><span style="color:#000000;"><code>LOGS</code> - RMAN keeps the logs needed to recover the backup</span></p> </li> <li> <p><span style="color:#000000;"><code>NOLOGS</code> - RMAN does not keep the logs needed to recover the backup</span></p> </li> </ul><p><span style="color:#000000;">If this column is null, then the backup has no KEEP options and will be made obsolete based on the retention policy.</span></p> </td> </tr> <tr> <td><span style="color:#000000;"><code>STATUS</code></span></td> <td><span style="color:#000000;"><code>VARCHAR2(16)</code></span></td> <td><span style="color:#000000;">Status of the backup:</span> <ul> <li> <p><span style="color:#000000;"><code>AVAILABLE</code></span></p> </li> <li> <p><span style="color:#000000;"><code>UNAVAILABLE</code></span></p> </li> <li> <p><span style="color:#000000;"><code>EXPIRED</code></span></p> </li> <li> <p><span style="color:#000000;"><code>OTHER</code></span></p> </li> </ul></td> </tr> <tr> <td><span style="color:#000000;"><code>FNAME</code></span></td> <td><span style="color:#000000;"><code>VARCHAR2(1024)</code></span></td> <td><span style="color:#000000;">Name of the file</span></td> </tr> <tr> <td><span style="color:#000000;"><code>TAG</code></span></td> <td><span style="color:#000000;"><code>VARCHAR2(32)</code></span></td> <td><span style="color:#000000;">Tag of the piece, copy, or proxy copy</span></td> </tr> <tr> <td><span style="color:#000000;"><code>MEDIA</code></span></td> <td><span style="color:#000000;"><code>VARCHAR2(80)</code></span></td> <td><span style="color:#000000;">Media ID of the piece or proxy copy</span></td> </tr> <tr> <td><span style="color:#000000;"><code>RECID</code></span></td> <td><span style="color:#000000;"><code>NUMBER</code></span></td> <td><span style="color:#000000;">Recid of the record in the controlfile</span></td> </tr> <tr> <td><span style="color:#000000;"><code>STAMP</code></span></td> <td><span style="color:#000000;"><code>NUMBER</code></span></td> <td><span style="color:#000000;">Stamp of the record in the controlfile</span></td> </tr> <tr> <td><span style="color:#000000;"><code>DEVICE_TYPE</code></span></td> <td><span style="color:#000000;"><code>VARCHAR2(255)</code></span></td> <td><span style="color:#000000;">Type of media device that stores the backup</span></td> </tr> <tr> <td><span style="color:#000000;"><code>BLOCK_SIZE</code></span></td> <td><span style="color:#000000;"><code>NUMBER</code></span></td> <td><span style="color:#000000;">Block size for the backup (in bytes)</span></td> </tr> <tr> <td><span style="color:#000000;"><code>COMPLETION_TIME</code></span></td> <td><span style="color:#000000;"><code>DATE</code></span></td> <td><span style="color:#000000;">Time when the backup completed</span></td> </tr> <tr> <td><span style="color:#000000;"><code>COMPRESSED</code></span></td> <td><span style="color:#000000;"><code>VARCHAR2(3)</code></span></td> <td><span style="color:#000000;">Indicates whether the backup piece is compressed (<code>YES</code>) or not (<code>NO</code>); valid only if <code>FILE_TYPE</code> is <code>PIECE</code>. Image copies cannot be compressed.</span></td> </tr> <tr> <td><span style="color:#000000;"><code>OBSOLETE</code></span></td> <td><span style="color:#000000;"><code>VARCHAR2(3)</code></span></td> <td><span style="color:#000000;">Indicates whether the backup piece or copy is obsolete (<code>YES</code>) or not (<code>NO</code>); valid only if <code>FILE_TYPE</code> is <code>PIECE</code> or <code>COPY</code></span></td> </tr> <tr> <td><span style="color:#000000;"><code>BYTES</code></span></td> <td><span style="color:#000000;"><code>NUMBER</code></span></td> <td><span style="color:#000000;">Size of the file (in bytes)</span></td> </tr> <tr> <td><span style="color:#000000;"><code>BS_KEY</code></span></td> <td><span style="color:#000000;"><code>NUMBER</code></span></td> <td><span style="color:#000000;">Primary key of the backup set (valid only if <code>BACKUP_TYPE</code> is <code>BACKUP SET</code>)</span></td> </tr> <tr> <td><span style="color:#000000;"><code>BS_COUNT</code></span></td> <td><span style="color:#000000;"><code>NUMBER</code></span></td> <td><span style="color:#000000;">Count of the backup set from the controlfile record (valid only if <code>BACKUP_TYPE</code> is <code>BACKUP SET</code>)</span></td> </tr> <tr> <td><span style="color:#000000;"><code>BS_STAMP</code></span></td> <td><span style="color:#000000;"><code>NUMBER</code></span></td> <td><span style="color:#000000;">Stamp of the backup set from the controlfile record (valid only if <code>BACKUP_TYPE</code> is <code>BACKUP SET</code>)</span></td> </tr> <tr> <td><span style="color:#000000;"><code>BS_TYPE</code></span></td> <td><span style="color:#000000;"><code>VARCHAR2(32)</code></span></td> <td><span style="color:#000000;">Type of the backup set (valid only if <code>BACKUP_TYPE</code> is <code>BACKUP SET</code>):</span> <ul> <li> <p><span style="color:#000000;"><code>DATAFILE</code></span></p> </li> <li> <p><span style="color:#000000;"><code>ARCHIVED LOG</code></span></p> </li> </ul></td> </tr> <tr> <td><span style="color:#000000;"><code>BS_INCR_TYPE</code></span></td> <td><span style="color:#000000;"><code>VARCHAR2(32)</code></span></td> <td><span style="color:#000000;">Incremental type of the backup set (valid only if <code>BACKUP_TYPE</code> is <code>BACKUP SET</code>)</span></td> </tr> <tr> <td><span style="color:#000000;"><code>BS_PIECES</code></span></td> <td><span style="color:#000000;"><code>NUMBER</code></span></td> <td><span style="color:#000000;">Number of backup pieces in the backup set (valid only if <code>BACKUP_TYPE</code> is <code>BACKUP SET</code>)</span></td> </tr> <tr> <td><span style="color:#000000;"><code>BS_COPIES</code></span></td> <td><span style="color:#000000;"><code>NUMBER</code></span></td> <td><span style="color:#000000;">Number of copies of the backup set (valid only if <code>FILE_TYPE</code> is <code>PIECE</code> and <code>BACKUP_TYPE</code> is <code>BACKUP SET</code>)</span></td> </tr> <tr> <td><span style="color:#000000;"><code>BS_COMPLETION_TIME</code></span></td> <td><span style="color:#000000;"><code>DATE</code></span></td> <td><span style="color:#000000;">Completion time of the backup set (valid only if <code>BACKUP_TYPE</code> is <code>BACKUP SET</code>)</span></td> </tr> <tr> <td><span style="color:#000000;"><code>BS_STATUS</code></span></td> <td><span style="color:#000000;"><code>VARCHAR2(16)</code></span></td> <td><span style="color:#000000;">Status of the backup set (valid only if <code>BACKUP_TYPE</code> is <code>BACKUP SET</code>):</span> <ul> <li> <p><span style="color:#000000;"><code>AVAILABLE</code></span></p> </li> <li> <p><span style="color:#000000;"><code>UNAVAILABLE</code></span></p> </li> <li> <p><span style="color:#000000;"><code>EXPIRED</code></span></p> </li> <li> <p><span style="color:#000000;"><code>OTHER</code> - Pieces which are part of the backup set do not have uniform status (that is, some of them are available, some not)</span></p> </li> </ul></td> </tr> <tr> <td><span style="color:#000000;"><code>BS_BYTES</code></span></td> <td><span style="color:#000000;"><code>NUMBER</code></span></td> <td><span style="color:#000000;">Sum of all backup piece sizes in the backup set (valid only if <code>BACKUP_TYPE</code> is <code>BACKUP SET</code>)</span></td> </tr> <tr> <td><span style="color:#000000;"><code>BS_COMPRESSED</code></span></td> <td><span style="color:#000000;"><code>VARCHAR2(3)</code></span></td> <td><span style="color:#000000;">Indicates whether the backup pieces of the backup set are compressed (<code>YES</code>) or not (<code>NO</code>); valid only if <code>BACKUP_TYPE</code> is <code>BACKUP SET</code></span></td> </tr> <tr> <td><span style="color:#000000;"><code>BS_TAG</code></span></td> <td><span style="color:#000000;"><code>VARCHAR2(1024)</code></span></td> <td><span style="color:#000000;">Tags of the backup set. If pieces have different tags, then all piece tags are concatenated and separated by commas. Valid only if <code>BACKUP_TYPE</code> is <code>BACKUP SET</code>)</span></td> </tr> <tr> <td><span style="color:#000000;"><code>BS_DEVICE_TYPE</code></span></td> <td><span style="color:#000000;"><code>VARCHAR2(255)</code></span></td> <td><span style="color:#000000;">Device type of the backup set. If there is more than one device type, then they are separated by commas. Valid only if <code>BACKUP_TYPE</code> is <code>BACKUP SET</code></span></td> </tr> <tr> <td><span style="color:#000000;"><code>BP_PIECE#</code></span></td> <td><span style="color:#000000;"><code>NUMBER</code></span></td> <td><span style="color:#000000;">Number of pieces inside the backup set (valid only if <code>FILE_TYPE</code> is <code>PIECE</code> and <code>BACKUP_TYPE</code> is <code>BACKUP SET</code>)</span></td> </tr> <tr> <td><span style="color:#000000;"><code>BP_COPY#</code></span></td> <td><span style="color:#000000;"><code>NUMBER</code></span></td> <td><span style="color:#000000;">Number of copies of the backup set (valid only if <code>FILE_TYPE</code> is <code>PIECE</code> and <code>BACKUP_TYPE</code> is <code>BACKUP SET</code>)</span></td> </tr> <tr> <td><span style="color:#000000;"><code>DF_FILE#</code></span></td> <td><span style="color:#000000;"><code>NUMBER</code></span></td> <td><span style="color:#000000;">Absolute file number of the datafile (valid only if <code>FILE_TYPE</code> is <code>DATAFILE</code>)</span></td> </tr> <tr> <td><span style="color:#000000;"><code>DF_TABLESPACE</code></span></td> <td><span style="color:#000000;"><code>VARCHAR2(30)</code></span></td> <td><span style="color:#000000;">Tablespace name of the datafile (valid only if <code>FILE_TYPE</code> is <code>DATAFILE</code>)</span></td> </tr> <tr> <td><span style="color:#000000;"><code>DF_RESETLOGS_CHANGE#</code></span></td> <td><span style="color:#000000;"><code>NUMBER</code></span></td> <td><span style="color:#000000;">System change number (SCN) of the most recent <code>RESETLOGS</code> when the control file or datafile was created (valid only if <code>FILE_TYPE</code> is <code>DATAFILE</code>)</span></td> </tr> <tr> <td><span style="color:#000000;"><code>DF_CREATION_CHANGE#</code></span></td> <td><span style="color:#000000;"><code>NUMBER</code></span></td> <td><span style="color:#000000;">Creation SCN of the control file or datafile (valid only if <code>FILE_TYPE</code> is <code>DATAFILE</code>)</span></td> </tr> <tr> <td><span style="color:#000000;"><code>DF_CHECKPOINT_CHANGE#</code></span></td> <td><span style="color:#000000;"><code>NUMBER</code></span></td> <td><span style="color:#000000;">System change number (SCN) of the most recent control file or datafile checkpoint (valid only if <code>FILE_TYPE</code> is <code>DATAFILE</code>)</span></td> </tr> <tr> <td><span style="color:#000000;"><code>DF_CKP_MOD_TIME</code></span></td> <td><span style="color:#000000;"><code>DATE</code></span></td> <td><span style="color:#000000;">Modification time in case of SPFILE, otherwise time when the control file or datafile was checkpointed (valid only if <code>FILE_TYPE</code> is <code>DATAFILE</code>)</span></td> </tr> <tr> <td><span style="color:#000000;"><code>RL_THREAD#</code></span></td> <td><span style="color:#000000;"><code>NUMBER</code></span></td> <td><span style="color:#000000;">Redo log thread number of the archived log (valid only if <code>FILE_TYPE</code> is <code>REDO LOG</code>)</span></td> </tr> <tr> <td><span style="color:#000000;"><code>RL_SEQUENCE#</code></span></td> <td><span style="color:#000000;"><code>NUMBER</code></span></td> <td><span style="color:#000000;">Redo log sequence number of the archived log (valid only if <code>FILE_TYPE</code> is <code>REDO LOG</code>)</span></td> </tr> <tr> <td><span style="color:#000000;"><code>RL_RESETLOGS_CHANGE#</code></span></td> <td><span style="color:#000000;"><code>NUMBER</code></span></td> <td><span style="color:#000000;">System change number (SCN) of the most recent <code>RESETLOGS</code> when the record was created (valid only if <code>FILE_TYPE</code> is <code>REDO LOG</code>)</span></td> </tr> <tr> <td><span style="color:#000000;"><code>RL_FIRST_CHANGE#</code></span></td> <td><span style="color:#000000;"><code>NUMBER</code></span></td> <td><span style="color:#000000;">First SCN of the redo log (valid only if <code>FILE_TYPE</code> is <code>REDO LOG</code>)</span></td> </tr> <tr> <td><span style="color:#000000;"><code>RL_FIRST_TIME</code></span></td> <td><span style="color:#000000;"><code>DATE</code></span></td> <td><span style="color:#000000;">Time when the Oracle Database switched into the redo log (valid only if <code>FILE_TYPE</code> is <code>REDO LOG</code>)</span></td> </tr> <tr> <td><span style="color:#000000;"><code>RL_NEXT_CHANGE#</code></span></td> <td><span style="color:#000000;"><code>NUMBER</code></span></td> <td><span style="color:#000000;">First SCN of the next redo log in the thread (valid only if <code>FILE_TYPE</code> is <code>REDO LOG</code>)</span></td> </tr> <tr> <td><span style="color:#000000;"><code>RL_NEXT_TIME</code></span></td> <td><span style="color:#000000;"><code>DATE</code></span></td> <td><span style="color:#000000;">First timestamp of the next redo log in the thread (valid only if <code>FILE_TYPE</code> is <code>REDO LOG</code>)</span></td> </tr> </tbody> </table>
还没有评论,来说两句吧...