资讯

精准传达 • 有效沟通

从品牌网站建设到网络营销策划,从策略到执行的一站式服务

修改redo_logfile组成员和大小


1.SYS@ORCL>select GROUP#  ,BYTES/1024/1024 size_M,STATUS,ARCHIVED from v$log;

铁西网站制作公司哪家好,找创新互联!从网页设计、网站建设、微信开发、APP开发、自适应网站建设等网站项目制作,到程序开发,运营维护。创新互联于2013年开始到现在10年的时间,我们拥有了丰富的建站经验和运维经验,来保证我们的工作的顺利进行。专注于网站建设就选创新互联。

    GROUP#    SIZE_M STATUS          ARC                                     
 ---------- ---------- ---------------- ---                                     
          1        50 INACTIVE        YES                                     
          2        50 INACTIVE        YES                                     
          3        50 CURRENT          NO          

 

2.删除原有的日志组;(只操作状态为inactive的日志组)
  若要操作日志组为current时,需先进行日志切换:alter system switch logfile;
  若为active时,则可强制进行检查点:alter system checkpoint;

SYS@ORCL>alter system switch logfile;

System altered.

SYS@ORCL>alter system checkpoint; --强制执行检查点

SYS@ORCL>select GROUP#  ,BYTES/1024/1024 size_M,STATUS,ARCHIVED from v$log;

    GROUP#    SIZE_M STATUS          ARC                                     
 ---------- ---------- ---------------- ---                                     
          1        50 INACTIVE        YES                                     
          2        50 INACTIVE        YES                                     
          3        50 ACTIVE          YES    

SYS@ORCL>alter database drop logfile group 1;

Database altered.

SYS@ORCL>alter database drop logfile group 2;

Database altered.
                                

---------------------------
删除后还需要去指定目录删除日志文件,后才能建立文件,如制定别的名字的日志组,应该没有此限制。
---------------------------


3.添加3组大小为200M的日志组;
SYS@ORCL>alter database add logfile group 1 '/u01/app/oracle/oradata/orcl11g/redo01.log'size 200m;

Database altered.

SYS@ORCL>alter database add logfile group 2 '/u01/app/oracle/oradata/orcl11g/redo02.log'size 200m;

Database altered.

SYS@ORCL>alter database add logfile group 3 '/u01/app/oracle/oradata/orcl11g/redo03.log'size 200m;

4.给日志组添加成员
cd  /u01/app/oracle/oradata/orcl11g/
mkdir redo_bak

SYS@ORCL>alter database add logfile member '/u01/app/oracle/oradata/orcl11g/redo_bak/redo01_b.log' to group 1;
Database altered.
SYS@ORCL>alter database add logfile member '/u01/app/oracle/oradata/orcl11g/redo_bak/redo02_b.log' to group 2;
Database altered.
SYS@ORCL>alter database add logfile member '/u01/app/oracle/oradata/orcl11g/redo_bak/redo03_b.log' to group 3;
Database altered.


5.删除日志组成员

alter database drop logfile member '/u01/app/oracle/oradata/orcl11g/redo_bak/redo02_b.log';

            
            
                        
本文名称:修改redo_logfile组成员和大小
网站网址:http://cdkjz.cn/article/ppceop.html
多年建站经验

多一份参考,总有益处

联系快上网,免费获得专属《策划方案》及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

大客户专线   成都:13518219792   座机:028-86922220