【ARCHIVE】單機環境修改資料庫為歸檔模式

secooler發表於2010-04-20
1.檢視系統的歸檔模式
$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.3.0 - Production on Wed Mar 3 00:10:42 2010

Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options

sys@ora10g> archive log list;
Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     17
Current log sequence           19

2.徹底關閉資料庫
sys@ora10g> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.

3.啟動資料狀態到mount
sys@ora10g> startup mount;
ORACLE instance started.

Total System Global Area  104857600 bytes
Fixed Size                  1289172 bytes
Variable Size              88081452 bytes
Database Buffers            8388608 bytes
Redo Buffers                7098368 bytes
Database mounted.

4.修改資料庫的歸檔模式
sys@ora10g> alter database archivelog;

Database altered.

5.開啟資料庫
sys@ora10g> alter database open;

Database altered.

6.檢視資料庫已經為歸檔模式
sys@ora10g> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     18
Next log sequence to archive   20
Current log sequence           20

7.小結
單機環境下修改資料庫為歸檔模式的操作步驟比較簡單。生產資料庫一般要求執行在歸檔模式下。在歸檔模式下資料庫具有非常好的可恢復性(當然要有一套嚴謹的備份恢復策略作為前提)。

Good luck.

secooler
10.04.20

-- The End --

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/519536/viewspace-660290/,如需轉載,請註明出處,否則將追究法律責任。

相關文章