Could someone please let me know what the "change" RMAN command does?
For example, what is the effect of following command:
change archivelog until time 'SYSDATE-7' delete
And what is the difference between following commands:
change archivelog all validate;
change archivelog all crosscheck;
change archivelog all;
I checked the following doc but could not find anything:
I am using Oracle 10gR2 on RHEL 64-bit.
If you delete archivelogs from the OS or from any other method other than RMAN, those archivelogs needs to revalidated.The database still thinks it has those archives available so RMAN tries to find them and gives an error if it does not find those deleted archive log.
So CHANGE command is like crosscheck which revalidates the archivelogs on disk and update the status in the control file. so the next time when you will run the RMAN command it will know that those files are no more available.
change archivelog until time 'SYSDATE-7' delete - This is checking the archivelogs and delete older than 7 days. You can do the crosscheck archivelog all and delete in a seprate command.