重庆思庄Oracle、Redhat认证学习论坛

标题: 如何增加日志组成员到既有日志组? [打印本页]

作者: 郑全    时间: 2012-7-5 17:42
标题: 如何增加日志组成员到既有日志组?

比如:

     我们目前系统中有以下日志组:

 

     

SQL> select group#,sequence#,members ,status ,archived from v$log;

    GROUP#  SEQUENCE#    MEMBERS STATUS           ARC
---------- ---------- ---------- ---------------- ---
         1         28          1 CURRENT          NO
         2         26          1 INACTIVE         YES
         3         27          1 INACTIVE         YES

 

 

     发现每组都只有一个成员,我们想手工增加一个文件到既有组上去:

  1* select group#,member from v$logfile

    GROUP# MEMBER
---------- --------------------------------------------------
         3 /oracle/app/oracle/oradata/sztech1/redo03.log
         2 /oracle/app/oracle/oradata/sztech1/redo02.log
         1 /oracle/app/oracle/oradata/sztech1/redo01.log

 

     我们给组一增加一个镜像成员,方法如下:

      alter database add logfile member '/oracle/app/oracle/oradata/sztech1/redo01b.log' to group 1;

 

      之后,我们再查询,文件应该增加上去:

     

  1* select group#,member from v$logfile

    GROUP# MEMBER
---------- --------------------------------------------------
         3 /oracle/app/oracle/oradata/sztech1/redo03.log
         2 /oracle/app/oracle/oradata/sztech1/redo02.log
         1 /oracle/app/oracle/oradata/sztech1/redo01.log
         1 /oracle/app/oracle/oradata/sztech1/redo01b.log

 

 

SQL> select group#,sequence#,members ,status ,archived from v$log;

    GROUP#  SEQUENCE#    MEMBERS STATUS           ARC
---------- ---------- ---------- ---------------- ---
         1         28          2 CURRENT          NO
         2         26          1 INACTIVE         YES
         3         27          1 INACTIVE         YES

 

至此,日志组成员增加上去了.






欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/) Powered by Discuz! X3.2