0) To save a log file :
spool log to '/home/oracle/rman.txt' ;
1) LIST Archivelog :
RMAN>list archivelog all;
RMAN>list copy of archivelog until time ‘SYSDATE-10';
RMAN>list copy of archivelog from time ‘SYSDATE-10'
RMAN>list copy of archivelog from time ‘SYSDATE-10' until time ‘SYSDATE-2';
RMAN>list copy of archivelog from sequence 1000;
RMAN>list copy of archivelog until sequence 1500;
RMAN>list copy of archivelog from sequence 1000 until sequence 1500;
2) DELETE ARCHIVIELOG :
RMAN>delete archivelog all;
RMAN>delete archivelog until time ‘SYSDATE-10';
RMAN>delete archivelog from time ‘SYSDATE-10'
RMAN>delete archivelog from time ‘SYSDATE-10' until time ‘SYSDATE-2';
RMAN>delete archivelog from sequence 1000;
RMAN>delete archivelog until sequence 1500;
RMAN>delete archivelog from sequence 1000 until sequence 1500;
Note : Also, you can use noprompt statement for do not yes-no question.
RMAN>delete noprompt archivelog until time ‘SYSDATE-10';
4) show configure
---
RMAN> CONFIGURE CHANNEL DEVICE TYPE sbt;
RMAN> CROSSCHECK BACKUP OF TABLESPACE user_data COMPLETED BEFORE 'SYSDATE-14';
RMAN> DELETE NOPROMPT EXPIRED BACKUP OF TABLESPACE user_data COMPLETED BEFORE 'SYSDATE-14';
RMAN> DELETE BACKUP OF DATABASE LIKE '/tmp%';
RMAN> DELETE ARCHIVELOG ALL BACKED UP 2 TIMES TO DEVICE TYPE sbt;
RMAN> DELETE BACKUPSET 101, 102, 103;
RMAN> DELETE CONTROLFILECOPY '/tmp/cntrlfile.copy';
RMAN> DELETE BACKUP OF SPFILE TABLESPACE users DEVICE TYPE sbt;
---------
DELETE OBSOLETE REDUNDANCY = 1;
RMAN> DELETE FORCE EXPIRED BACKUPSET OF DATABASE DEVICE TYPE DISK
COMPLETED BEFORE "TO_DATE('08/16/2005 00:00:00','MM/DD/YY
HH24:MI:SS')";
RMAN> run
{
DELETE archivelog until time "to_date('2010-08-23:10:00:00','YYYY-MM-DD:hh24:mi:ss')";
}
RMAN > delete backupset 1344
Delete archive logs up to scn 650
Archivelog :
============
RMAN> delete archivelog high sequence 650;
list archivelogs from yesterday.
RMAN> list archivelog time between “sysdate -7" and “sysdate”
Delete archivelogs backed up 1 time to disk
RMAN> delete archive log all backed up 1 times to disk;
Delete backups older than 7 days
RMAN> delete backup completed before ‘sysdate -3';
Restore archivelog between to scn numbers
RMAN> restore archivelog scn between 547484587 and 547662805;
Check For Logical And Physical Block Corruption
RMAN> backup check logical validate database;
>delete noprompt archivelog until time 'sysdate -2';
crosscheck archivelog all';
delete noprompt expired archivelog all;
spool log to '/home/oracle/rman.txt' ;
1) LIST Archivelog :
RMAN>list archivelog all;
RMAN>list copy of archivelog until time ‘SYSDATE-10';
RMAN>list copy of archivelog from time ‘SYSDATE-10'
RMAN>list copy of archivelog from time ‘SYSDATE-10' until time ‘SYSDATE-2';
RMAN>list copy of archivelog from sequence 1000;
RMAN>list copy of archivelog until sequence 1500;
RMAN>list copy of archivelog from sequence 1000 until sequence 1500;
2) DELETE ARCHIVIELOG :
RMAN>delete archivelog all;
RMAN>delete archivelog until time ‘SYSDATE-10';
RMAN>delete archivelog from time ‘SYSDATE-10'
RMAN>delete archivelog from time ‘SYSDATE-10' until time ‘SYSDATE-2';
RMAN>delete archivelog from sequence 1000;
RMAN>delete archivelog until sequence 1500;
RMAN>delete archivelog from sequence 1000 until sequence 1500;
Note : Also, you can use noprompt statement for do not yes-no question.
RMAN>delete noprompt archivelog until time ‘SYSDATE-10';
4) show configure
---
RMAN> CONFIGURE CHANNEL DEVICE TYPE sbt;
RMAN> CROSSCHECK BACKUP OF TABLESPACE user_data COMPLETED BEFORE 'SYSDATE-14';
RMAN> DELETE NOPROMPT EXPIRED BACKUP OF TABLESPACE user_data COMPLETED BEFORE 'SYSDATE-14';
RMAN> DELETE BACKUP OF DATABASE LIKE '/tmp%';
RMAN> DELETE ARCHIVELOG ALL BACKED UP 2 TIMES TO DEVICE TYPE sbt;
RMAN> DELETE BACKUPSET 101, 102, 103;
RMAN> DELETE CONTROLFILECOPY '/tmp/cntrlfile.copy';
RMAN> DELETE BACKUP OF SPFILE TABLESPACE users DEVICE TYPE sbt;
---------
DELETE OBSOLETE REDUNDANCY = 1;
RMAN> DELETE FORCE EXPIRED BACKUPSET OF DATABASE DEVICE TYPE DISK
COMPLETED BEFORE "TO_DATE('08/16/2005 00:00:00','MM/DD/YY
HH24:MI:SS')";
RMAN> run
{
DELETE archivelog until time "to_date('2010-08-23:10:00:00','YYYY-MM-DD:hh24:mi:ss')";
}
RMAN > delete backupset 1344
Delete archive logs up to scn 650
Archivelog :
============
RMAN> delete archivelog high sequence 650;
list archivelogs from yesterday.
RMAN> list archivelog time between “sysdate -7" and “sysdate”
Delete archivelogs backed up 1 time to disk
RMAN> delete archive log all backed up 1 times to disk;
Delete backups older than 7 days
RMAN> delete backup completed before ‘sysdate -3';
Restore archivelog between to scn numbers
RMAN> restore archivelog scn between 547484587 and 547662805;
Check For Logical And Physical Block Corruption
RMAN> backup check logical validate database;
>delete noprompt archivelog until time 'sysdate -2';
crosscheck archivelog all';
delete noprompt expired archivelog all;
No comments:
Post a Comment