【ARCHIVE】单机环境修改数据库为归档模式

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 --

请使用浏览器的分享功能分享到微信等