zoukankan      html  css  js  c++  java
  • oracle开启关闭日志归档

    oracle归档日志开启之后,会产生大量的日志,需要定时清理以及不重要的数据库可以不开启归档模式,下面介绍一下oracle归档开启、关闭以及日志的删除:
    一、oracle归档日志开启及关闭
    1、登录服务端:sqlplus / as sysdba
    2、查询归档模是否开启:archive log list,如下如所示:

     3、此时日志归档是关闭的,我们开启日志归档:

    • 关闭数据库:shutdown immediate;
    • 开启数据库至mount状态:startup mount;
    • 修改数据库模式:alter datebase archivelog;
    • 查看归档模式:archive log list,此时日式归档已经打开打开;

     4、关闭档模式: alter database noarchivelog;

    注意:开启或关闭日志归档之后,别忘了打开数据库:

    alter database open;

    二、删除归档日志
    1、登录rman,oracle用户登录:rman target sys/oracle@orcl
    2、查看归档日志:crosscheck archive all;
    3、删除只保留最近一天的日志:delete archivelog until time 'systate-1';
    4、删除全部归档日志:delete expired archivelog all;
    ————————————————

    人间至味是清欢
  • 相关阅读:
    scala-class
    uva-10422-骑士-搜索题
    HDU 5724
    HDU 5728
    CodeForces 414B
    CodeForces 698A
    Codeforces Round #363 (Div. 2)
    BestCoder 2nd Anniversary 1001 Oracle
    BestCoder 2nd Anniversary 1002 Arrange
    HDU 4798
  • 原文地址:https://www.cnblogs.com/qixifly/p/11958680.html
Copyright © 2011-2022 走看看