加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

如何启动或关闭oracle的归档(ARCHIVELOG)模式

发布时间:2020-12-12 14:28:28 所属栏目:百科 来源:网络整理
导读:1.管理员身份连接数据库 650) this.width=650;" src="http://img.jb51.cc/vcimg/static/loading.png" alt="复制代码" style="margin:0px;padding:0px;border:none;" src="http://common.cnblogs.com/images/copycode.gif"> C:UsersAdministratorsqlplussys

1.管理员身份连接数据库

复制代码

C:UsersAdministrator>sqlplussys/sys@prjdbassysdba

SQL*Plus:Release11.2.0.1.0ProductiononTueJun1723:50:552014Copyright(c)1982,2010,Oracle.Allrightsreserved.


Connectedto:
OracleDatabase11gEnterpriseEditionRelease11.2.0.1.0-64bitProductionWiththePartitioning,OLAP,DataMiningandRealApplicationTestingoptions

复制代码

2.查看当前归档模式,是归档还是非归档

复制代码

SQL>archiveloglist;DatabaselogmodeNoArchiveMode
AutomaticarchivalDisabled
ArchivedestinationUSE_DB_RECOVERY_FILE_DEST
Oldestonlinelogsequence228Currentlogsequence230

复制代码

3.关闭数据库

SQL>shutdownimmediate;Databaseclosed.Databasedismounted.
ORACLEinstanceshutdown.

4.启动数据库到mount状态

复制代码

SQL>startupmount;
ORACLEinstancestarted.

TotalSystemGlobalArea3423965184bytes
FixedSize2180544bytes
VariableSize2013268544bytesDatabaseBuffers1392508928bytes
RedoBuffers16007168bytesDatabasemounted.

复制代码

5.启动归档模式

复制代码

SQL>alterdatabasearchivelog;Databasealtered.

SQL>archiveloglist;DatabaselogmodeArchiveMode
AutomaticarchivalEnabled
ArchivedestinationUSE_DB_RECOVERY_FILE_DEST
Oldestonlinelogsequence228Nextlogsequencetoarchive230Currentlogsequence230

复制代码

6.启动数据库

SQL>alterdatabaSEOpen;Databasealtered.

7.关闭归档模式

复制代码

SQL>shutdownimmediate;Databaseclosed.Databasedismounted.
ORACLEinstanceshutdown.
SQL>startupmount;
ORACLEinstancestarted.

TotalSystemGlobalArea3423965184bytes
FixedSize2180544bytes
VariableSize2013268544bytesDatabaseBuffers1392508928bytes
RedoBuffers16007168bytesDatabasemounted.
SQL>alterdatabasenoarchivelog;Databasealtered.

SQL>archiveloglist;DatabaselogmodeNoArchiveMode
AutomaticarchivalDisabled
ArchivedestinationUSE_DB_RECOVERY_FILE_DEST
Oldestonlinelogsequence228Currentlogsequence230SQL>

复制代码

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读