如何启动或关闭数据库的归档(ARCHIVELOG)模式
来源:互联网 发布:linux改变字体大小 编辑:程序博客网 时间:2024/06/09 21:15
Oracle数据库可以运行在2种模式下:归档模式(archivelog)和非归档模式(noarchivelog)
归档模式可以提高Oracle数据库的可恢复性,生产数据库都应该运行在此模式下,归档模式应该和相应的备份策略相结合,只有归档模式没有相应的备份策略只会带来麻烦。
本文简单介绍如何启用和关闭数据库的归档模式。
1.shutdown normal或shutdown immediate关闭数据库
2.启动数据库到mount状态
3.启用或停止归档模式
如果要启用归档模式,此处使用
alter database archivelog 命令。
如果需要停止归档模式,此处使用:
alter database noarchivelog 命令。
4.修改相应的初始化参数
Oracle10g之前,你还需要修改初始化参数使数据库处于自动归档模式。
在pfile/spfile中设置如下参数:
log_archive_start = true
重启数据库此参数生效,此时数据库处于自动归档模式。
也可以在数据库启动过程中,手工执行:
archive log start
使数据库启用自动归档,但是重启后数据库仍然处于手工归档模式。
从Oracle10g开始,log_archive_start参数已经废除,请参考:Oracle10g已经废弃log_archive_start参数.
归档模式可以提高Oracle数据库的可恢复性,生产数据库都应该运行在此模式下,归档模式应该和相应的备份策略相结合,只有归档模式没有相应的备份策略只会带来麻烦。
本文简单介绍如何启用和关闭数据库的归档模式。
1.shutdown normal或shutdown immediate关闭数据库
[oracle@jumper oracle]$ sqlplus "/ as sysdba"SQL*Plus: Release 9.2.0.4.0 - Production on Sat Oct 15 15:48:36 2005Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.Connected to:Oracle9i Enterprise Edition Release 9.2.0.4.0 - ProductionWith the Partitioning optionJServer Release 9.2.0.4.0 - ProductionSQL> shutdown immediate;Database closed.Database dismounted.ORACLE instance shut down.
2.启动数据库到mount状态
SQL> startup mount;ORACLE instance started.Total System Global Area 101782828 bytesFixed Size 451884 bytesVariable Size 37748736 bytesDatabase Buffers 62914560 bytesRedo Buffers 667648 bytesDatabase mounted.
3.启用或停止归档模式
如果要启用归档模式,此处使用
alter database archivelog 命令。
SQL> alter database archivelog;Database altered.SQL> alter database open;Database altered.SQL> archive log list;Database log mode Archive ModeAutomatic archival EnabledArchive destination /opt/oracle/oradata/conner/archiveOldest online log sequence 148Next log sequence to archive 151Current log sequence 151
如果需要停止归档模式,此处使用:
alter database noarchivelog 命令。
SQL> shutdown immediate; Database closed.Database dismounted.ORACLE instance shut down.SQL> startup mount;ORACLE instance started.Total System Global Area 101782828 bytesFixed Size 451884 bytesVariable Size 37748736 bytesDatabase Buffers 62914560 bytesRedo Buffers 667648 bytesDatabase mounted.SQL> alter database noarchivelog;Database altered.SQL> alter database open;Database altered.SQL> archive log list;Database log mode No Archive ModeAutomatic archival EnabledArchive destination /opt/oracle/oradata/conner/archiveOldest online log sequence 149Current log sequence 152
4.修改相应的初始化参数
Oracle10g之前,你还需要修改初始化参数使数据库处于自动归档模式。
在pfile/spfile中设置如下参数:
log_archive_start = true
重启数据库此参数生效,此时数据库处于自动归档模式。
也可以在数据库启动过程中,手工执行:
archive log start
使数据库启用自动归档,但是重启后数据库仍然处于手工归档模式。
从Oracle10g开始,log_archive_start参数已经废除,请参考:Oracle10g已经废弃log_archive_start参数.
-----
这篇 【如何启动或关闭数据库的归档(ARCHIVELOG)模式】来自 www.eygle.com
这篇 【如何启动或关闭数据库的归档(ARCHIVELOG)模式】来自 www.eygle.com
作者:eygle
- 如何启动或关闭数据库的归档(ARCHIVELOG)模式
- 如何启动或关闭数据库的归档(ARCHIVELOG)模式 [转]
- 如何启动或关闭数据库的归档(ARCHIVELOG)模式
- 如何启动或关闭数据库的归档(ARCHIVELOG)模式
- 如何启动或关闭数据库的归档(ARCHIVELOG)模式
- 启动或关闭数据库的归档(ARCHIVELOG)模式
- 如何启动或关闭oracle的归档(ARCHIVELOG)模式
- 如何启用或关闭数据库的归档(archivelog)模式
- 启动/关闭数据库归档(ARCHIVELOG)模式
- ORA-00257归档日志写满的解决方法 背景: 在前一篇博客中我们提到了如何启动或关闭oracle的归档(ARCHIVELOG)模式,在我成功设定数据库为归档模式以后, 第二天再次尝试连接数据库,
- oracle 启动或关闭归档(archivelog)模式
- oracle数据库启动/关闭数据库归档(ARCHIVELOG)模式
- oracle的归档(ARCHIVELOG)模式启动和关闭
- 归档模式的开启和关闭 archivelog mode
- oracle数据库开启或关闭归档模式
- 启动和关闭数据库的归档(archived)模式
- 配置数据库归档模式(ARCHIVELOG/NOARCHIVELOG)
- 如何启动ARCHIVELOG模式?(转)
- 企业管理软件的“渐进式实施方法”
- dos命令总集
- ORA-00942:table or view does not exist
- .Net Treeview Checkboxes - Check All 功能
- 几大ERP软件实施方法与过程 (转)
- 如何启动或关闭数据库的归档(ARCHIVELOG)模式
- 如何杜绝iframe挂马
- 给GridView加点料:Div动态浮动显示
- translation
- 安装VMware Workstation
- ASP.NET2.0 Ajax的简单配置与应用
- 异端辩解
- linux
- 项目在市场上有大量竞争对手