oracle增加一个日志组

关键步骤
1、查v$log  v$logfile
2、增加日志组
3、验证
具体操作如下:
--查v$log  v$logfile
SYS@PROD> select group#,sequence#,bytes/1024/1024 m,archived,status from v$log;

    GROUP#  SEQUENCE#           M ARC STATUS
---------- ---------- ---------- --- ----------------
     1        1         200 NO  INACTIVE
     2        2         200 NO  CURRENT
     3        0         200 YES UNUSED
SYS@PROD> select * from v$logfile;

    GROUP# STATUS  TYPE    MEMBER                            IS_    CON_ID
---------- ------- ------- ------------------------------------------------------------ --- ----------
     3       ONLINE  /u01/app/oracle/oradata/PROD/redo03.log            NO         0
     2       ONLINE  /u01/app/oracle/oradata/PROD/redo02.log            NO         0
     1       ONLINE  /u01/app/oracle/oradata/PROD/redo01.log            NO         0
--增加日志组
SYS@PROD> alter database add logfile group 4 '/u01/app/oracle/oradata/PROD/redo04.log' size 50m;

Database altered.
--验证
SYS@PROD> select * from v$logfile;

    GROUP# STATUS  TYPE    MEMBER                            IS_    CON_ID
---------- ------- ------- ------------------------------------------------------------ --- ----------
     3       ONLINE  /u01/app/oracle/oradata/PROD/redo03.log            NO         0
     2       ONLINE  /u01/app/oracle/oradata/PROD/redo02.log            NO         0
     1       ONLINE  /u01/app/oracle/oradata/PROD/redo01.log            NO         0
     4       ONLINE  /u01/app/oracle/oradata/PROD/redo04.log            NO         0

SYS@PROD> select group#,sequence#,bytes/1024/1024 m,archived,status from v$log;

    GROUP#  SEQUENCE#           M ARC STATUS
---------- ---------- ---------- --- ----------------
     1        1         200 NO  INACTIVE
     2        2         200 NO  ACTIVE
     3        3         200 NO  CURRENT
     4        0         200 YES UNUSED

说明:UNUSED:新添加的日志组,还没有使用


你可能感兴趣的:(oracle)