1818IP-服务器技术教程,云服务器评测推荐,服务器系统排错处理,环境搭建,攻击防护等

当前位置:首页 - 数据库 - 正文

君子好学,自强不息!

以下的文章主要讲述的是正确的启动或是关闭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 

本文来源:1818IP

本文地址:https://www.1818ip.com/post/10994.html

免责声明:本文由用户上传,如有侵权请联系删除!

发表评论

必填

选填

选填

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。