<font face="NSimsun">[python] </font>
<font face="NSimsun">robin@SZDB:~> export ORACLE_SID=GOBO1 </font>
<font face="NSimsun">robin@SZDB:~> rman target / </font>
<font face="NSimsun"> </font>
Recovery Manager: Release 10.2.0.3.0 - Production on <font face="NSimsun">Thu Jul 11 17:07:00 2013 </font>
<font face="NSimsun"> </font>
Copyright (c) 1982, 2005, Oracle. All <font face="NSimsun">rights reserved. </font>
<font face="NSimsun"> </font>
connected to target database : GOBO1 (DBID=733951103)
<font face="NSimsun"> </font>
<font face="NSimsun">RMAN> host; </font>
<font face="NSimsun"> </font>
robin@SZDB:~> cd /u02/ database /GOBO1/archive/
robin@SZDB:/u02/ database /GOBO1/archive> ls
<font face="NSimsun">arch_816906485_1_10.arc arch_816906485_1_12.arc </font>
<font face="NSimsun">arch_816906485_1_11.arc arch_816906485_1_13.arc </font>
............
<font face="NSimsun"> </font>
robin@SZDB:/u02/ database /GOBO1/archive> rm -rf arch_816906485_1_10.arc arch_816906485_1_11.arc arch_816906485_1_12.arc
robin@SZDB:/u02/ database /GOBO1/archive> exit;
<font face="NSimsun">exit </font>
<font face="NSimsun">host command complete </font>
<font face="NSimsun"> </font>
RMAN> crosscheck archivelog all ;
<font face="NSimsun">released channel: ORA_DISK_1 </font>
<font face="NSimsun">allocated channel: ORA_DISK_1 </font>
<font face="NSimsun">channel ORA_DISK_1: sid=1075 devtype=DISK </font>
archive log filename=/u02/ database /GOBO1/archive/arch_816906485_1_9.arc recid=2085 stamp=817211151
validation failed for <font face="NSimsun">archived log </font>
archive log filename=/u02/ database /GOBO1/archive/arch_816906485_1_10.arc recid=2086 stamp=817250793
..............
validation succeeded for <font face="NSimsun">archived log </font>
archive log filename=/u02/ database /GOBO1/archive/arch_816906485_1_90.arc recid=2166 stamp=820458049
<font face="NSimsun">Crosschecked 83 objects </font>
<font face="NSimsun"> </font>
RMAN> list expired archivelog all ;
<font face="NSimsun"> </font>
List of <font face="NSimsun">Archived Log Copies </font>
<font face="NSimsun">Key</font> Thrd Seq S Low Time <font face="NSimsun">Name</font>
<font face="NSimsun">------- ---- ------- - ----------------- ---- </font>
2086 1 10 X 20130604 11:05:51 /u02/ database /GOBO1/archive/arch_816906485_1_10.arc
2087 1 11 X 20130604 22:06:17 /u02/ database /GOBO1/archive/arch_816906485_1_11.arc
2088 1 12 X 20130605 19:30:53 /u02/ database /GOBO1/archive/arch_816906485_1_12.arc
<font face="NSimsun"> </font>
RMAN> delete archivelog until sequence <font face="NSimsun">16; </font>
<font face="NSimsun"> </font>
<font face="NSimsun">released channel: ORA_DISK_1 </font>
<font face="NSimsun">allocated channel: ORA_DISK_1 </font>
<font face="NSimsun">channel ORA_DISK_1: sid=1075 devtype=DISK </font>
<font face="NSimsun"> </font>
List of <font face="NSimsun">Archived Log Copies </font>
<font face="NSimsun">Key</font> Thrd Seq S Low Time <font face="NSimsun">Name</font>
<font face="NSimsun">------- ---- ------- - ----------------- ---- </font>
2084 1 8 A 20130604 09:53:17 /u02/ database /GOBO1/archive/arch_816906485_1_8.arc
.................
2092 1 16 A 20130607 22:03:23 /u02/ database /GOBO1/archive/arch_816906485_1_16.arc
<font face="NSimsun"> </font>
Do you really want to <font face="NSimsun">delete</font> the above objects (enter YES or NO )? yes
...............
<font face="NSimsun">deleted archive log </font>
archive log filename=/u02/ database /GOBO1/archive/arch_816906485_1_16.arc recid=2092 stamp=817516861
<font face="NSimsun">Deleted 9 objects </font>
<font face="NSimsun"> </font>
RMAN> delete archivelog all completed before 'sysdate-7' ;
<font face="NSimsun"> </font>
<font face="NSimsun">released channel: ORA_DISK_1 </font>
<font face="NSimsun">allocated channel: ORA_DISK_1 </font>
<font face="NSimsun">channel ORA_DISK_1: sid=1075 devtype=DISK </font>
<font face="NSimsun"> </font>
List of <font face="NSimsun">Archived Log Copies </font>
<font face="NSimsun">Key</font> Thrd Seq S Low Time <font face="NSimsun">Name</font>
<font face="NSimsun">------- ---- ------- - ----------------- ---- </font>
2093 1 17 A 20130608 00:01:00 /u02/ database /GOBO1/archive/arch_816906485_1_17.arc
2094 1 18 A 20130608 18:00:17 /u02/ database /GOBO1/archive/arch_816906485_1_18.arc
...........
<font face="NSimsun">deleted archive log </font>
archive log filename=/u02/ database /GOBO1/archive/arch_816906485_1_72.arc recid=2148 stamp=819847035
<font face="NSimsun">Deleted 56 objects </font>
<font face="NSimsun"> </font>
RMAN> list copy of <font face="NSimsun">database</font> archivelog all ;
<font face="NSimsun"> </font>
<font face="NSimsun"> </font>
List of <font face="NSimsun">Archived Log Copies </font>
<font face="NSimsun">Key</font> Thrd Seq S Low Time <font face="NSimsun">Name</font>
<font face="NSimsun">------- ---- ------- - ----------------- ---- </font>
2149 1 73 A 20130703 23:17:13 /u02/ database /GOBO1/archive/arch_816906485_1_73.arc
2150 1 74 A 20130704 22:00:19 /u02/ database /GOBO1/archive/arch_816906485_1_74.arc
2151 1 75 A 20130704 22:04:40 /u02/ database /GOBO1/archive/arch_816906485_1_75.arc
...............
2164 1 88 A 20130709 23:19:34 /u02/ database /GOBO1/archive/arch_816906485_1_88.arc
2165 1 89 A 20130710 13:00:34 /u02/ database /GOBO1/archive/arch_816906485_1_89.arc
2166 1 90 A 20130710 22:02:44 /u02/ database /GOBO1/archive/arch_816906485_1_90.arc
<font face="NSimsun"> </font>
RMAN> delete archivelog from <font face="NSimsun">time</font> 'sysdate-1' ;
<font face="NSimsun"> </font>
<font face="NSimsun">released channel: ORA_DISK_1 </font>
<font face="NSimsun">allocated channel: ORA_DISK_1 </font>
<font face="NSimsun">channel ORA_DISK_1: sid=1075 devtype=DISK </font>
<font face="NSimsun"> </font>
List of <font face="NSimsun">Archived Log Copies </font>
<font face="NSimsun">Key</font> Thrd Seq S Low Time <font face="NSimsun">Name</font>
<font face="NSimsun">------- ---- ------- - ----------------- ---- </font>
2165 1 89 A 20130710 13:00:34 /u02/ database /GOBO1/archive/arch_816906485_1_89.arc
2166 1 90 A 20130710 22:02:44 /u02/ database /GOBO1/archive/arch_816906485_1_90.arc
<font face="NSimsun"> </font>
Do you really want to <font face="NSimsun">delete</font> the above objects (enter YES or NO )? yes
<font face="NSimsun">deleted archive log </font>
archive log filename=/u02/ database /GOBO1/archive/arch_816906485_1_89.arc recid=2165 stamp=820447373
<font face="NSimsun">deleted archive log </font>
archive log filename=/u02/ database /GOBO1/archive/arch_816906485_1_90.arc recid=2166 stamp=820458049
<font face="NSimsun">Deleted 2 objects </font>
<font face="NSimsun"> </font>
RMAN> delete archivelog all completed before 'sysdate - 1' ;
<font face="NSimsun"> </font>
<font face="NSimsun">released channel: ORA_DISK_1 </font>
<font face="NSimsun">allocated channel: ORA_DISK_1 </font>
<font face="NSimsun">channel ORA_DISK_1: sid=1075 devtype=DISK </font>
<font face="NSimsun"> </font>
List of <font face="NSimsun">Archived Log Copies </font>
<font face="NSimsun">Key</font> Thrd Seq S Low Time <font face="NSimsun">Name</font>
<font face="NSimsun">------- ---- ------- - ----------------- ---- </font>
2149 1 73 A 20130703 23:17:13 /u02/ database /GOBO1/archive/arch_816906485_1_73.arc
.......................
2164 1 88 A 20130709 23:19:34 /u02/ database /GOBO1/archive/arch_816906485_1_88.arc
<font face="NSimsun"> </font>
Do you really want to <font face="NSimsun">delete</font> the above objects (enter YES or NO )? yes
................
archive log filename=/u02/ database /GOBO1/archive/arch_816906485_1_88.arc recid=2164 stamp=820414835
<font face="NSimsun">Deleted 16 objects </font>
<font face="NSimsun"> </font>
RMAN> sql " alter system archive log current" ;
<font face="NSimsun"> </font>
sql statement: alter system archive log current
<font face="NSimsun"> </font>
RMAN> list copy of archivelog all ;
<font face="NSimsun"> </font>
<font face="NSimsun"> </font>
List of <font face="NSimsun">Archived Log Copies </font>
<font face="NSimsun">Key</font> Thrd Seq S Low Time <font face="NSimsun">Name</font>
<font face="NSimsun">------- ---- ------- - ----------------- ---- </font>
2167 1 91 A 20130711 01:00:48 /u02/ database /GOBO1/archive/arch_816906485_1_91.arc
<font face="NSimsun"> </font>
RMAN> delete noprompt archivelog all completed before 'sysdate' ;
<font face="NSimsun"> </font>
<font face="NSimsun">released channel: ORA_DISK_1 </font>
<font face="NSimsun">allocated channel: ORA_DISK_1 </font>
<font face="NSimsun">channel ORA_DISK_1: sid=1075 devtype=DISK </font>
<font face="NSimsun"> </font>
List of <font face="NSimsun">Archived Log Copies </font>
<font face="NSimsun">Key</font> Thrd Seq S Low Time <font face="NSimsun">Name</font>
<font face="NSimsun">------- ---- ------- - ----------------- ---- </font>
2167 1 91 A 20130711 01:00:48 /u02/ database /GOBO1/archive/arch_816906485_1_91.arc
<font face="NSimsun">deleted archive log </font>
archive log filename=/u02/ database /GOBO1/archive/arch_816906485_1_91.arc recid=2167 stamp=820517964
<font face="NSimsun">Deleted 1 objects</font>
|