以下的文章主要讲述的是正确的启动或是关闭Oracle归档模式的实际操作步骤,我们大家都知道Oracle数据库运行于2种模式,主要实施Oracle归档模式(archivelog)与非归档模式(noarchivelog)。
Oracle归档模式可以提高Oracle数据库的可恢复性,生产数据库都应该运行在此模式下,归档模式应该和相应的备份策略相结合,只有归档模式没有相应的备份策略只会带来麻烦。
本文简单介绍如何启用和关闭数据库的Oracle归档模式。
1.shutdown normal或shutdown immediate关闭数据库
oracle@jumperoracle]$sqlplus"/assysdba" SQL*Plus:Release9.2.0.4.0-ProductiononSatOct1515:48:362005 Copyright(c)1982,2002,OracleCorporation.Allrightsreserved. Connectedto: Oracle9iEnterpriseEditionRelease9.2.0.4.0-Production WiththePartitioningoption JServerRelease9.2.0.4.0-Production SQL>shutdownimmediate; Databaseclosed. Databasedismounted. ORACLEinstanceshutdown.
2.启动数据库到mount状态
SQL>startupmount; ORACLEinstancestarted. TotalSystemGlobalArea101782828bytes FixedSize451884bytes VariableSize37748736bytes DatabaseBuffers62914560bytes RedoBuffers667648bytes Databasemounted.
3.启用或停止归档模式
如果要启用Oracle归档模式,此处使用
alterdatabasearchivelog命令。 SQL>alterdatabasearchivelog; Databasealtered. SQL>alterdatabaseopen; Databasealtered. SQL>archiveloglist; DatabaselogmodeArchiveMode AutomaticarchivalEnabled Archivedestination/opt/oracle/oradata/conner/archive Oldestonlinelogsequence148 Nextlogsequencetoarchive151 Currentlogsequence151
相关文章
标签:Oracle