বুধবার, ৫ জুলাই, ২০২৩

Archivelog File

 archive log list

show parameter archive_dest

alter system set log_archive_dest_1= 'LOCATION=F:\labs\archivelog' scope=both



list archivelog all; 

list copy of archivelog until time 'SYSDATE-1'; 

list copy of archivelog from time 'SYSDATE-1'; 

list copy of archivelog from time 'SYSDATE-1' until time 'SYSDATE-2'; 

list copy of archivelog from sequence 1000; 

list copy of archivelog until sequence 1500; 

list copy of archivelog from sequence 1000 until sequence 1500;



delete archivelog all;

delete archivelog until time 'SYSDATE-1'; 

delete archivelog from time 'SYSDATE-1'; 

delete archivelog from time 'SYSDATE-1' until time 'SYSDATE-2'; 

delete archivelog from sequence 1000; 

delete archivelog until sequence 1500; 

delete archivelog from sequence 1000 until sequence 1500;


delete noprompt archivelog until time 'SYSDATE-1';


crosscheck archivelog all;
list expired archivelog all;
delete expired archivelog all;

restore database preview;
restore datafile 14 preview;
RESTORE ARCHIVELOG FROM TIME 'SYSDATE-7' PREVIEW;
RESTORE ARCHIVELOG FROM TIME 'SYSDATE-7' PREVIEW SUMMARY;

run{
recover table "LABS"."MM_ITEM_STOCK" until time "to_date('14-09-2023 08:16:00','dd-mm-yyyy hh24:mi:ss')"
auxiliary destination 'g:\oracle_backup';
}

RUN {
set until time "to_date('08-AUG-2023 09:00', 'DD-MON-YYYY HH24:MI')";
restore database;
recover database;
}