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

前端之家收集整理的这篇文章主要介绍了如何启动或关闭oracle的归档(ARCHIVELOG)模式前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

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

复制代码

C:\Users\Administrator>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>

复制代码

原文链接:https://www.f2er.com/oracle/207719.html

猜你在找的Oracle相关文章