Archive file Management
Oracle archive files are often full or not mounted, here is a brief example of a full case.
backing up archive files : Backup Archivelog All ;
Backing Up archive logs
1 , Sql>alter System Archive logcurrent; Archive the current log
2 , sql>show parameter archive; View archive directory
3 , rman>backup Archivelog All; Backup Archive
rman>backup archivelog All Delete allinput ; Delete archive after backup
rman>backup database plus Archivelog ; backing up databases and archive logs
Archive file Management
Sql> SELECT * from V$log; Archive Status
group# thread# sequence# BYTES members ARC STATUS
---------- ---------- ---------- -------------------- --- ----------------
first_change# First_time
1 1 5638 52428800 1 NO INACTIVE 1.2895E+13 26-jul-14
2 1 5639 5242880 1 NO current 1.2895E+13 26-jul-14
4 1 5635 10485760 1 NO INACTIVE 1.2895E+13 25-jul-14
sql> Select * from V$recovery_file_dest; Archive Size
NAME space_limit space_used space_reclaimable number_of_files
----------- ---------- --------------------------------
/home/oracle/flash_recovery_area 21474836482133713408 0 23
Sql>SELECT * from V$flash_recovery_area_usage; space use, archive backup close to 100%
File_type percent_space_used percent_space_reclaimable Number_of_files
------------ ------------------------------------------- ---------------
Controlfile 0 0 0
Onlinelog 4.88 0 1
ARCHIVELOG 27.62 0 19
Backuppiece 66.86 0 3
Imagecopy 0 0 0
Flashbacklog 0 0 0
6 rows selected.
Sql> alter system set db_recovery_file_dest_size=10g;
System altered.
Sql> select * from V$recovery_file_dest;
NAME space_limit space_used space_reclaimable number_of_files
----------- ---------- --------------------------------
/home/oracle/flash_recovery_area 1.0737E+10 2234790400 0 26
Sql> SELECT * from V$flash_recovery_area_usage;
File_type percent_space_used percent_space_reclaimable Number_of_files
------------ ------------------------------------------- ---------------
Controlfile 0 0 0
Onlinelog. 98 0 1
ARCHIVELOG 6.47 0 22
Backuppiece 13.37 0 3
Imagecopy 0 0 0
Flashbacklog 0 0 0
6 rows selected.
rman>backup database plus archivelogdelete input; back up the database and archive logs while deleting the archived logs that have been backed up
rman>backup archivelog from sequence 79until sequance; based on serial number
rman>backup Archivelog from time " sysdate-15 " until time sysdate-7 backup 15 days to 7 days ago Archive log
4 , Sql>alter System Archive logcurrent; do log archive again, archive period log
Rman>list Archivelog All;
This article is from the "Doodle Growth Diary" blog, please be sure to keep this source http://3402313.blog.51cto.com/3392313/1537812