以下的文章首要讲述的是正确的启动或是封锁Oracle归档模式的现实操作轨范,我们巨匠都知道Oracle数据库运行于2种模式,首要实施Oracle归档模式(archivelog)与非归档模式(noarchivelog)。 Oracle归档模式可以提高Oracle数据库的可恢复性,出产数据库都应该运行在此模式下,归档模式应该和响应的备份策略相连系,只有归档模式没有响应的备份策略只会带来麻烦。
: k6 l. G8 L7 k' R! K' K 本文简单介绍若何启用和封锁数据库的Oracle归档模式。7 V- Z& Y% w5 e+ m
1.shutdown normal或shutdown immediate封锁数据库7 M8 B2 v! y; H1 a: t( a9 E
1.oracle@jumper oracle]$ sqlplus “/ as sysdba”
0 B& K4 |1 L/ G; V, K; W 2.SQL*Plus: Release 9.2.0.4.0 - Production on Sat Oct 15 15:48:36 20055 m8 N* t% |* c4 U% ^2 |
3.Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
( t' E( f& a, y5 p 4.Connected to:9 \5 G: V3 Q" A; n6 u0 u
5.Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production! \5 s. B- J5 Q+ H
6.With the Partitioning option
3 Z4 l, z' L' P: i k 7.JServer Release 9.2.0.4.0 - Production
+ Z0 Z: a C3 C1 ?) P0 p 8.SQL》 shutdown immediate;; W0 N" J. \# E5 B5 g) Z9 ?/ Z5 P
9.Database closed.
: I2 K# w" M$ h1 l 10.Database dismounted.4 Y& T! o; g0 N3 g# }
11.ORACLE instance shut down.$ x u* G$ u0 i/ k4 A4 \
2.启动数据库到mount状况
8 r2 V( w3 o2 r ~ ^2 ] 1.SQL》 startup mount;: d" Z4 l/ ]% A3 `
2.ORACLE instance started.- T& w( N) g" X) k+ L7 P
3.Total System Global Area 101782828 bytes
4 T/ C; H: T& Y! b 4.Fixed Size 451884 bytes# _+ C* e# k5 S: Z# z: ^8 R
5.Variable Size 37748736 bytes+ ?$ ~' u8 x t/ |) @3 {' D
6.Database Buffers 62914560 bytes) D8 N5 V# P4 |
7.Redo Buffers 667648 bytes
+ |2 A% U$ ]6 Z a. ] 8.Database mounted.
- v, ~( A- A: I& m 3.启用或遏制归档模式
: R" Z1 @3 _: T 如不美观要启用Oracle归档模式,此处使用0 b0 N& f/ I0 y, P% h
1.alter database archivelog 呼吁。6 U5 V9 T& z6 X% b I! `. w
2.SQL》 alter database archivelog;
5 R9 D7 c; r# y. h5 R 3.Database altered.
. V4 o7 C( _" ^0 o' W/ I' w 4.SQL》 alter database open;
2 ]- U- U4 v7 o' F! M ~ 5.Database altered.
) K; R5 t) R5 ^( w* h/ _+ V 6.SQL》 archive log list;
4 _8 F! b3 N" V3 U, o0 j: r& k! f 7.Database log mode Archive Mode
, S% l* `; M) c4 A& r* w 8.Automatic archival Enabled# f9 b$ d3 ~/ y+ z" a" m7 G3 Z
9.Archive destination /opt/oracle/oradata/conner/archive) ~) _0 l9 ~1 `& i; ?; N0 P
10.Oldest online log sequence 148
& g9 s; D% ?% _2 B 11.Next log sequence to archive 151
* m" b1 w! R. ?, D: D) g8 y. J& V: ] 12.Current log sequence 151 |