zoukankan      html  css  js  c++  java
  • BayaiM__oracle切换归档模式步骤:

    BayaiM__oracle切换归档模式(步骤):

    ------------------oracle11g设置归档模式和非归档模式--------------------------
    [root@testoracle ~]#mkdir /u01/arch
    [root@testoracle ~]#chown -R oracle:oinstall /u01/arch
    [root@testoracle ~]#sqlplus / as sysdba
    SQL> archive log list;
    SQL> select name, log_mode from v$database;
    SQL> shutdown immediate;
    SQL> startup mount;
    SQL> alter database archivelog;
    SQL> alter database open;
    SQL> alter system set log_archive_dest_1='location=/u01/arch' scope=spfile;
    SQL> shutdown immediate;
    SQL> startup;
    SQL> show parameter dest;
    log_archive_dest_1 string location=/u01/arch
    SQL> alter system switch logfile; -- 是强制日志切换,不一定就归档当前的重做日志文件(若自动归档打开,就归档前的重做日志,若自动归档没有打开,就不归档当前重做日志。)
    SQL> /
    [root@testoracle arch]# pwd
    /u01/arch
    [root@testoracle arch]# ll
    -rw-r----- 1 oracle oinstall 8863744 11月 2 14:53 1_12_991067760.dbf
    -rw-r----- 1 oracle oinstall 1024 11月 2 14:53 1_13_991067760.dbf
    [oracle@testoracle ~]$ lsnrctl
    LSNRCTL> stop
    LSNRCTL> start
    Services Summary...
    Service "prodb" has 1 instance(s).
    Instance "prodb", status UNKNOWN, has 1 handler(s) for this service...
    The command completed successfully
    LSNRCTL>


    修改日志文件命名格式
    alter system set log_archive_max_processes = 5;
    alter system set log_archive_format = "archive_%t_%s_%r.log" scope=spfile;

    -------------------------------------------------------------------------------------------------------------------

    对于小白人,无脑操作,完全按照我的步骤就好,不要问,记住不懂得不要问,只要做就好了。

    2018年11月2日15:00:24

    bayaim

     

     

  • 相关阅读:
    bzoj4358: permu
    bzoj4636: 蒟蒻的数列
    bzoj4229: 选择
    bzoj4561: [JLoi2016]圆的异或并
    bzoj2618: [Cqoi2006]凸多边形
    bzoj1803: Spoj1487 Query on a tree III
    bzoj2467: [中山市选2010]生成树
    PostgreSQL服务器存储参数的内部查看方法和实际表述之间的关系
    PostgreSQL 系统表
    PostgreSQL环境中查看SQL执行计划示例
  • 原文地址:https://www.cnblogs.com/bayaim/p/9896322.html
Copyright © 2011-2022 走看看