DECLARE v_device VARCHAR2 (50); v_done BOOLEAN; BEGIN -- get channel v_device := DBMS_BACKUP_RESTORE.deviceallocate(TYPE => NULL, ident => 't1'); --what to do DBMS_BACKUP_RESTORE.restoreSetArchivedLog; --which range DBMS_BACKUP_RESTORE.restorearchivedlogrange( low_change => 12640521350 ,high_change => 22640521354 ); -- do it DBMS_BACKUP_RESTORE.restoreBackupPiece (done => v_done ,handle => '/backup/SPR/SPR_AR_20070416_850_1' ,fromdisk => true ); -- deallocate device DBMS_BACKUP_RESTORE.devicedeallocate; exception when others then DBMS_BACKUP_RESTORE.devicedeallocate; END; /