oracle数据库关闭归档 如何启动或关闭数据库的归档模式
如何启动或关闭数据库的归档模式
Oracle数据库可以运行在 种模式下:归档模式(archivelog)和非归档模式(noarchivelog)
归档模式可以提高Oracle数据库的可恢复性 生产数据库都应该运行在此模式下 归档模式应该和相应的备份策略相结合 只有归档模式没有相应的备份策略只会带来麻烦
本文简单介绍如何启用和关闭数据库的归档模式
shutdown normal或shutdown immediate关闭数据库
[oracle@jumper oracle]$ sqlplus / as sysdba
SQL*Plus: Release Production on Sat Oct : :
Copyright (c) Oracle Corporation All rights reserved
Connected to:
Oracle i Enterprise Edition Release Production
With the Partitioning option
JServer Release Production
SQL> shutdown immediate;

Database closed
Database dismounted
ORACLE instance shut down
启动数据库到mount状态
SQL> startup mount;
ORACLE instance started
Total System Global Area bytes
Fixed Size bytes
Variable Size bytes
Database Buffers bytes
Redo Buffers bytes
Database mounted
启用或停止归档模式
如果要启用归档模式 此处使用
alter database archivelog 命令
SQL> alter database archivelog;
Database altered
SQL> alter database open;
Database altered
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /opt/oracle/oradata/conner/archive
Oldest online log sequence
Next log sequence to archive
Current log sequence
如果需要停止归档模式 此处使用
alter database noarchivelog 命令
SQL> shutdown immediate;
Database closed
Database dismounted
ORACLE instance shut down
SQL> startup mount;
ORACLE instance started
Total System Global Area bytes
Fixed Size bytes
Variable Size bytes
Database Buffers bytes
Redo Buffers bytes
Database mounted
SQL> alter database noarchivelog;
Database altered
SQL> alter database open;
Database altered
SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Enabled
Archive destination /opt/oracle/oradata/conner/archive
Oldest online log sequence
Current log sequence
修改相应的初始化参数
Oracle g之前 你还需要修改初始化参数使数据库处于自动归档模式
在pfile/spfile中设置如下参数
log_archive_start = true
重启数据库此参数生效 此时数据库处于自动归档模式
也可以在数据库启动过程中 手工执行
archive log start
lishixinzhi/Article/program/Oracle/201311/17704