SQL> show parameter log_archive_dest
SQL> show parameter db_recovery_file_dest
- Change directory to Archive log locationNAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string /u01/oradata/flash_recovery_ar
ea
db_recovery_file_dest_size big integer 2G
> [oracle@oracle10g ~]$ cd /u01/oradata/flash_recovery_area/
> [oracle@oracle10g flash_recovery_area]$ ls -ltrh
> [oracle@oracle10g flash_recovery_area]$ cd ORCL10G/total 4.0K
drwxr-x--- 4 oracle oinstall 4.0K Jan 23 18:30 ORCL10G
[oracle@oracle10g ORCL10G]$ ls -ltrh
> [oracle@oracle10g ORCL10G]$ cd archivelog/total 8.0K
drwxr-x--- 2 oracle oinstall 4.0K Jan 23 17:02 onlinelog
drwxr-x--- 3 oracle oinstall 4.0K Jan 23 18:30 archivelog
[oracle@oracle10g archivelog]$ ls -ltrh
> [oracle@oracle10g archivelog]$ cd 2012_01_23/total 4.0K
drwxr-x--- 2 oracle oinstall 4.0K Jan 23 18:53 2012_01_23
> [oracle@oracle10g 2012_01_23]$ ls -ltrh
- Create the destination directory.total 51M
-rw-r----- 1 oracle oinstall 50M Jan 23 18:30 o1_mf_1_1_7ktfp7d7_.arc
-rw-r----- 1 oracle oinstall 855K Jan 23 18:53 o1_mf_1_2_7kth0dxm_.arc
> [oracle@oracle10g 2012_01_23]$ mkdir /u01/temp/
- Start moving all archivelogs except the last file on the list (which is the one being archived).
> Syntax: ls -rt *.dbf *.arc | grep -v `ls -rt *.dbf *.arc | tail -1` | awk '{print "mv "$1" <TO_DIR>"}' &
> ls -rt *.dbf *.arc | grep -v `ls -rt *.dbf *.arc | tail -1` | awk '{print "mv "$1" /u01/temp/"}' | sh
- Connect to RMAN Catalog (if you're using Catalog)
> Syntax: rman target /catalog <user>/<pass>/@<cat_db>
> rman target / catalog rman/rman@catdb
- Catalog the recently moved archivelogs in the Recovery Catalog.
To Catalog the Archivelogs in Oracle 10g and 11g:
[oracle@oracle10g ~]$ rman target /
RMAN> CATALOG START WITH '/u02/oradata/ORCL10G/logfiles/' ;[oracle@oracle10g ~]$ rman target /
Recovery Manager: Release 10.2.0.5.0 - Production on Tue Feb 14 09:20:13 2012
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: ORCL10G (DBID=957726458)
RMAN>
Note: The directory location of the archivelogs should end in a forward slash (/).
RMAN lists the files to be added to the RMAN repository and prompts for confirmation before adding the backups.
Perform Crosscheck of Archivelogs to check that files are in place and ready for a restore.
RMAN> crosscheck archivelog all;
For Oracle Database 9i:
Unlike Oracle 10g and 11g, separately catalog each archivelog one by one. But you can put them all in a run {} block for bulk cataloging.
RMAN> run {
catalog archivelog '/u02/oradata/testdb/logfiles/ORCL9i_1_31345.log';
catalog archivelog '/u02/oradata/testdb/logfiles/ORCL9i_1_31346.log';
catalog archivelog '/u02/oradata/testdb/logfiles/ORCL9i_1_31347.log';
}
- Perform crosscheck. It cross checks if archived log files are available on disk location or not, irrespective of backups.
> RMAN> crosscheck archivelog all;
- Exit Recovery Manager (RMAN)RMAN> crosscheck archivelog all;
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=133 devtype=DISK
validation succeeded for archived log
archive log filename=/u01/temp/o1_mf_1_1_7ktfp7d7_.arc recid=5 stamp=773349152
validation failed for archived log
archive log filename=/u01/oradata/flash_recovery_area/ORCL10G/archivelog/2012_01_23/o1_mf_1_1_7ktfp7d7_.arc recid=1 stamp=773346635
validation succeeded for archived log
archive log filename=/u01/temp/o1_mf_1_2_7kth0dxm_.arc recid=4 stamp=773349152
validation failed for archived log
archive log filename=/u01/oradata/flash_recovery_area/ORCL10G/archivelog/2012_01_23/o1_mf_1_2_7kth0dxm_.arc recid=2 stamp=773347981
validation succeeded for archived log
archive log filename=/u01/oradata/flash_recovery_area/ORCL10G/archivelog/2012_01_23/o1_mf_1_3_7kthywv6_.arc recid=3 stamp=773348956
Crosschecked 5 objects
RMAN>
> RMAN> exit
-- End of Moving Archivelogs --