Showing posts with label List archivelogs. Show all posts
Showing posts with label List archivelogs. Show all posts

Thursday, February 3, 2022

Observation: rman saves files according to end date of backup

I noticed the following: An archivelog file backed up at 1.01.2022 23:57:18 will NOT be saved in the folder for 31.01.2022. Instead, it will be saved in the folder for 01.02.2022.
Output from RMAN:
 list archivelog from time '31.01.2022' until time '01.02.2022';
 
Output (excerpt)
450706  1    450701  A 31.01.2022 23:56:46
        Name: /u04/fra/proddb01/archivelog/2022_01_31/o1_mf_1_450701__vwojnvs6_.arc

450707  1    450702  A 31.01.2022 23:57:16
        Name: /u04/fra/proddb01/archivelog/2022_01_31/o1_mf_1_450702__vwokkx0p_.arc

450708  1    450703  A 31.01.2022 23:57:18
        Name: /u04/fra/proddb01/archivelog/2022_02_01/o1_mf_1_450703__vx4cmycs_.arc

The file /u04/fra/proddb01/archivelog/2022_02_01/o1_mf_1_450703__vx4cmycs_.arc has the timestamp Feb 1 00:05
So in this case, the last file generated on 31.01 actually ended up in the folder for files generated on the 01.02

Tuesday, January 21, 2014

How to use RMANs LIST command to find individual archivelogs or a sequence of archivelogs





To list an individual backup, any of the three alternatives bellow would be valid query using rman:
RMAN> list backup of archivelog logseq=120316;
RMAN> list backup of archivelog logseq 120316;
RMAN> list backup of archivelog sequence 120316;
To view backups of archivelog between two sequences:

RMAN> list backup of archivelog sequence between 120316 and 120317;
RMAN> list backup of archivelog from logseq 412593 until logseq 412656;

Use the SUMMARY directive to view only the backupsets affected:
RMAN> list backup of archivelog from logseq 412593 until logseq 412656 summary;
RMAN> list backup of archivelog sequence between 120316 and 120317 summary;

To view backups completed before a specific date:
RMAN> list backup completed before "to_date( '18.12.2009 18:00:00', 'DD.MM.YYYY HH24:MI:SS')";
RMAN> list backup of archivelog all summary completed before "to_date( '18.12.2009 18:00:00', 'DD.MM.YYYY HH24:MI:SS')";
RMAN> list archivelog all completed before 'sysdate-2';:

To list archivelogs recognized by the controlfile between two sequnce numbers:
RMAN> list archivelog sequence between 110880 and 110881;
To list archivelogs recognized by the controlfile up until yesterday:
RMAN> list archivelog until time 'sysdate-1';
To list archivelogs recognized by the controlfile from two days ago, up until yesterday:
RMAN> list archivelog from time 'sysdate-2' until time 'sysdate-1';
To limit the list of archivelogs to the ones taken on a specific date, in this case, the last of January 2022:
RMAN> list archivelog from time '31.01.2022' until time '01.02.2022';
If you remove the "until time" clause, RMAN will list all the archivelogs from 31.01.2022 up until the latest ones:
RMAN> list archivelog from time '31.01.2022';
Remember, the value of sysdate is the time right now, sysdate-1 is 24hrs ago, sysdate-2 is 48 hours ago, etc.
 select sysdate, sysdate-1, sysdate-2 from dual;

SYSDATE             SYSDATE-1           SYSDATE-2
------------------- ------------------- -------------------
03.02.2022 12:24:12 02.02.2022 12:24:12 01.02.2022 12:24:12