Wednesday, July 25, 2012

Rman backup oracle


crosscheck backupset;
delete expired backupset;

crosscheck backup;
report obsolete;
delete obsolete;

list backup summary;
delete backupset 4151;
backup database;

Trong trường hợp backup ra SBT_TAPE sau đó chuyển qua kết nối backup qua DISK
Nếu muốn xóa các thông tin cũ của RMAN đã lưu thông tin trong  SBT_TAPE ta dùng lệnh sau để force

allocate channel for maintenance device type sbt parms 'SBT_LIBRARY=oracle.disksbt, ENV=(BACKUP_DIR=/tmp)';
crosscheck backup;
delete NOPROMPT FORCE obsolete;

crosscheck backup;
delete expired backup;

crosscheck archivelog all;
delete expired archivelog all;
yes

DELETE ARCHIVELOG UNTIL TIME 'SYSDATE-7'
DELETE ARCHIVELOG  UNTIL TIME 'SYSDATE-1';

No comments: