completedTimeSpec

Syntax

completedTimeSpec::=

Description of completedtimespec.gif follows
Description of the illustration completedtimespec.gif

Purpose

A subclause that specifies when a backup or copy completed.

Restrictions and Usage Notes

All date strings must be either:

  • Formatted according to the Global Technology date format specification currently in effect.

  • Created by a SQL expression that returns a DATE value, as in the following examples:

    • 'SYSDATE-30'

    • TO_DATE('09/30/2000 08:00:00','MM/DD/YY HH24:MI:SS').

    The TO_DATE technique specifies dates independently of the current Global Technology environment variable settings.

    Note:

    In Oracle8i, the FROM/UNTIL ... TIME syntax in the LIST, CROSSCHECK, and DELETE commands was replaced with completedTimeSpec. If you are adapting an RMAN script from before Oracle8i for use in the current release, then you must update these commands for the script to work correctly.

Keywords and Parameters

Syntax Element Description
AFTER 'date_string' Specifies the time after which the backup was completed.
BEFORE 'date_string' Specifies the time before which the backup was completed.
BETWEEN 'date_string' AND 'date_string' Specifies a time range during which the backup was completed. Note that BETWEEN 'date1' AND 'date2' is exactly equivalent to AFTER 'date1' BEFORE 'date2'.

Examples

Crosschecking Backups Within a Time Range: Example This example crosschecks the backup sets of the database made last month:

CROSSCHECK BACKUP OF DATABASE COMPLETED BETWEEN 'SYSDATE-62' AND 'SYSDATE-31';

Deleting Expired Backups: Example This example deletes expired backup sets of datafile 1 made in the last two weeks:

DELETE EXPIRED BACKUP OF DATAFILE 1 COMPLETED AFTER 'SYSDATE-14';

Listing Copies: Example This example lists image copies of datafile ?/oradata/trgt/users01.dbf made before September 27, 2001:

LIST COPY OF DATAFILE '?/oradata/trgt/users01.dbf' 
  COMPLETED BEFORE '27-SEP-01';