Advertisement
brianleepasc

RMAN - archived logs

Aug 5th, 2019
338
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PL/SQL 0.98 KB | None | 0 0
  1.  
  2. SET NLS_DATE_FORMAT=YYYYMMDD HH24:MI:SS
  3.  
  4. Archivelog List Commands:
  5. list archivelog ALL;
  6. list copy OF archivelog until TIME 'SYSDATE-1';
  7. list copy OF archivelog FROM TIME 'SYSDATE-1';
  8. list copy OF archivelog FROM TIME 'SYSDATE-1' until TIME 'SYSDATE-2';
  9. list copy OF archivelog FROM sequence 1000;
  10. list copy OF archivelog until sequence 1500;
  11. list copy OF archivelog FROM sequence 1000 until sequence 1500;
  12.  
  13. Archivelog DELETE Commands:
  14. DELETE archivelog ALL;
  15. DELETE archivelog until TIME 'SYSDATE-1';
  16. DELETE archivelog FROM TIME 'SYSDATE-1';
  17. DELETE archivelog FROM TIME 'SYSDATE-1' until TIME 'SYSDATE-2';
  18. DELETE archivelog FROM sequence 1000;
  19. DELETE archivelog until sequence 1500;
  20. DELETE archivelog FROM sequence 1000 until sequence 1500;
  21.  
  22. Note : USE noprompt TO avoid being prompted FOR each file
  23. DELETE noprompt archivelog until TIME 'SYSDATE-1';
  24.  
  25. USE FORCE IF you try TO DELETE the archive LOG files which are NOT backed up:
  26. DELETE FORCE archivelog until TIME 'SYSDATE-1';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement