学习oracle技术,每天学一点,每天进步一点

rman开始备份归档日志的时候,是不是会自动切换redo?

上一篇 / 下一篇  2008-08-04 12:35:39 / 个人分类:rman备份与恢复

rman备份归档日志一开始想应该不会切换redo,

除非是在rman 中指定 alter system archive log current

或者是backup database plus archivelog  这两种情况下都会切换redo的

以下是测试过程  会切换redo:

C:\Documents and Settings\Paul Yi>sqlplus "/ as sysdba"

SQL*Plus: Release 9.2.0.8.0 - Production on Mon Aug 4 12:28:21 2008

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.


;m rjx1}+XO YI@0Connected to:
?:R L M;j5g9^-gJ _0Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
0Bn9H#p DRk*fk0With the Partitioning, OLAP and Oracle Data Mining options
TL3D+@I,};p0JServer Release 9.2.0.8.0 - Production

SQL> archive log list;
/pP|*j+^Z'[0Database log mode              Archive Mode
"z6X9IV%H5V6}0Automatic archival             EnabledITPUB个人空间8K0N[bqJ
Archive destination            d:\archpaulITPUB个人空间pt5S XB^ fn
Oldest online log sequence     4
N:uZps5H,gb0Next log sequence to archive   6ITPUB个人空间 a L1}0r|el
Current log sequence          6    --可以看出当前日志序列号是6
;szM,b+aT s7f,k at0
SQL> exit
)p-f@{lMn0Disconnected from Oracle9i Enterprise Edition Release 9.2.0.8.0 - ProductionITPUB个人空间(c'q"I.@"h
With the Partitioning, OLAP and Oracle Data Mining optionsITPUB个人空间Z Ir2z+}-D&L)FPs7x
JServer Release 9.2.0.8.0 - Production

C:\Documents and Settings\Paul Yi>rman target /

Recovery Manager: Release 9.2.0.8.0 - Production

Copyright (c) 1995, 2002, Oracle Corporation.  All rights reserved.

connected to target database: PUBTEST (DBID=799229701)

RMAN> backup archivelog all delete input;

Starting backup at 04-AUG-08
,Ia!Dr5c2]A6Mc*h({0current log archived
d \#M9v~\0using target database controlfile instead of recovery catalog
QB1jol\5V:M0allocated channel: ORA_DISK_1ITPUB个人空间S(@dgFg
channel ORA_DISK_1: sid=13 devtype=DISKITPUB个人空间"h/b"E |od&z
channel ORA_DISK_1: starting archive log backupset
0_"x [ a5f0channel ORA_DISK_1: specifying archive log(s) in backup set
PZa%h x T5D6q0input archive log thread=1 sequence=1 recid=279 stamp=657104122
&D)^j c,?m0g0input archive log thread=1 sequence=2 recid=280 stamp=657283300
,i7}vl3id0input archive log thread=1 sequence=3 recid=281 stamp=659438570
*V"c5s;d,Nt-yj;f0input archive log thread=1 sequence=4 recid=282 stamp=661282078
pXL)|%_F8pi$^Mx0input archive log thread=1 sequence=5 recid=283 stamp=661868887ITPUB个人空间;J f X+A j4z4k8lo
input archive log thread=1 sequence=6 recid=284 stamp=661868945
#i A9Ze,dX)\*uL0channel ORA_DISK_1: starting piece 1 at 04-AUG-08
|-}LO~%P'q0channel ORA_DISK_1: finished piece 1 at 04-AUG-08ITPUB个人空间;@{&Fk%B{#_q
piece handle=D:\BACKUP\4BJN6KCI_1_1 comment=NONE
7w*^VWO euM0channel ORA_DISK_1: backup set complete, elapsed time: 00:00:04
6C'i3W%U4\ j3@Z0channel ORA_DISK_1: deleting archive log(s)ITPUB个人空间};qC6B#\!cK8V
archive log filename=D:\ARCHPAUL\PUBTEST_1_1.DBF recid=279 stamp=657104122
Z0}j%\/D0z0archive log filename=D:\ARCHPAUL\PUBTEST_1_2.DBF recid=280 stamp=657283300ITPUB个人空间 \ }ZO#c1X"W
archive log filename=D:\ARCHPAUL\PUBTEST_1_3.DBF recid=281 stamp=659438570
:H!E"D{%Su4e?b:P0archive log filename=D:\ARCHPAUL\PUBTEST_1_4.DBF recid=282 stamp=661282078
O#Z'ebBYA0archive log filename=D:\ARCHPAUL\PUBTEST_1_5.DBF recid=283 stamp=661868887ITPUB个人空间"Cs2r?nfn GdrD
archive log filename=D:\ARCHPAUL\PUBTEST_1_6.DBF recid=284 stamp=661868945
_Wo{,x J3`+I*x~0Finished backup at 04-AUG-08

RMAN> exit

ITPUB个人空间/f2?.Gve4w!z
Recovery Manager complete.

C:\Documents and Settings\Paul Yi>sqlplus "/ as sysdba"

SQL*Plus: Release 9.2.0.8.0 - Production on Mon Aug 4 12:31:04 2008

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

ITPUB个人空间|a'Yg.\Q
Connected to:
8?L$r?!w%H4f:S0Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
0nov c4r6DE'?0With the Partitioning, OLAP and Oracle Data Mining options
i:Bx/l0`d0JServer Release 9.2.0.8.0 - Production

SQL> archive log list;
,o h O9M c0Database log mode              Archive ModeITPUB个人空间`j G E;tn5v v2P e
Automatic archival             EnabledITPUB个人空间Q8mXNFV9n
Archive destination            d:\archpaul
w2sK1VM~9^#i0Oldest online log sequence     5
d [y eo uG0Next log sequence to archive   7
n-G+_f;}?"b0Current log sequence          7     --可以看到已经增进了一位ITPUB个人空间y a6A p}-_,K
SQL> exitITPUB个人空间 B d!|f,[,^.F
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
S9`hJqx X0With the Partitioning, OLAP and Oracle Data Mining options
-Zb*Px:eF.yP0JServer Release 9.2.0.8.0 - Production

查看alert日志

Thread 1 advanced to log sequence7
:^)DAlWSP h0
  Current log# 3 seq# 7 mem# 0: D:\ORACLE\ORADATA\PUBTEST\REDO3_01.LOGITPUB个人空间3DunxjH%B|y D
  Current log# 3 seq# 7 mem# 1: D:\ORACLE\ORADATA\PUBTEST\REDO3_02.LOG
'Pf `G4V/j0Mon Aug 04 12:29:04 2008
W7Px v hT%n0ARCH: Evaluating archive   log 2 thread 1 sequence 6ITPUB个人空间H0Wa8h Kc G3Mt
ARCH: Beginning to archive log 2 thread 1 sequence 6
M#qA j nE9lO0Creating archive destination LOG_ARCHIVE_DEST_1: 'D:\ARCHPAUL\PUBTEST_1_6.DBF'
le Y O$Y2{y.B%d0Mon Aug 04 12:29:05 2008ITPUB个人空间$UH$m4u5F @#J,k
ARC0: Evaluating archive   log 2 thread 1 sequence 6ITPUB个人空间QZ4w/Kd%E
ARC0: Unable to archive log 2 thread 1 sequence 6ITPUB个人空间F_v%sEe
      Log actively being archived by another process
,?W N"vSV@Wi0Mon Aug 04 12:29:05 2008
3S z3@:^A'v(QG/l0ARCH: Completed archiving  log 2 thread 1 sequence 6ITPUB个人空间1bg3o?2I-k

只有下面这种情况才不会切换redo

RMAN> backup archivelog until sequence 3;

Starting backup at 04-AUG-08ITPUB个人空间?wy h`L
using channel ORA_DISK_1
O*kH1^p"jEW0channel ORA_DISK_1: starting archive log backupset
DlF9HE~8q0channel ORA_DISK_1: specifying archive log(s) in backup set
\Eh/r3P6L0input archive log thread=1 sequence=1 recid=285 stamp=661869167
^kp r"Q8p0input archive log thread=1 sequence=2 recid=286 stamp=661869167
-UmW(@i0input archive log thread=1 sequence=3 recid=290 stamp=661869169ITPUB个人空间4yI"}rtqS
channel ORA_DISK_1: starting piece 1 at 04-AUG-08ITPUB个人空间 W!Q0l-K1iN"q3V {
channel ORA_DISK_1: finished piece 1 at 04-AUG-08
#_{6i/E?z3b3z;Sp3p0piece handle=D:\BACKUP\4CJN6KK6_1_1 comment=NONEITPUB个人空间,~(vN7|rP
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:04
&y|Kmy+Up(`0Finished backup at 04-AUG-08

RMAN>

C:\Documents and Settings\Paul Yi>sqlplus "/ as sysdba"

SQL*Plus: Release 9.2.0.8.0 - Production on Mon Aug 4 12:41:42 2008

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.


E,Ld;rF7{\0Connected to:
C(pa/Ahw_\ o0Oracle9i Enterprise Edition Release 9.2.0.8.0 - ProductionITPUB个人空间)p9aa FO jHEr
With the Partitioning, OLAP and Oracle Data Mining optionsITPUB个人空间\,hNy:AJ9Xv!C
JServer Release 9.2.0.8.0 - Production

SQL> archive log list;
Y |v G,x.O [0Database log mode              Archive Mode
)MNFC)f0Automatic archival             EnabledITPUB个人空间.ZljL`'{3B`
Archive destination            d:\archpaulITPUB个人空间4ZR7E7r6^$e:tm
Oldest online log sequence     5ITPUB个人空间D(OL?9dO
Next log sequence to archive   7
Xc?1hL8Tn0NBn0Current log sequence           7    --还是7无变化 日志中无日志切换变化内容

官方文档内容:

At the beginning of every BACKUP ... ARCHIVELOG command that does not
IHX!iPx|y0specify an UNTIL clause, RMAN attempts to automatically switch out of and
/@^$A:rN0N.ux0archive the current online redo log. In this way, RMAN can include the current redoITPUB个人空间,P i*X$|Gs1P/}0P
log in the backup set.ITPUB个人空间([:Rh4v&M2[)v
If the database is open, then at the start of an archived log backup RMAN tries toITPUB个人空间!r#bJ3`,S)A!r
switch out of and archive the current online log according to these rules:ITPUB个人空间N3M8e#zC#Ah
n RMAN runs ALTER SYSTEM ARCHIVE LOG CURRENT.ITPUB个人空间6s0^[ hZM ]
n If the UNTIL clause or SEQUENCE parameter is specified, RMAN does not try toITPUB个人空间P'cI0t n j_:k4g
switch or archive online logs. 


TAG:

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

日历

« 2008-12-02  
 123456
78910111213
14151617181920
21222324252627
28293031   

数据统计

  • 访问量: 26110
  • 日志数: 312
  • 图片数: 2
  • 建立时间: 2007-12-11
  • 更新时间: 2008-11-28

RSS订阅

Open Toolbar