千家信息网

RAC怎么扩大online日志组大小

发表于:2024-11-11 作者:千家信息网编辑
千家信息网最后更新 2024年11月11日,本篇内容介绍了"RAC怎么扩大online日志组大小"的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!1
千家信息网最后更新 2024年11月11日RAC怎么扩大online日志组大小

本篇内容介绍了"RAC怎么扩大online日志组大小"的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!

1.查看当前默认日志组

SQL> select GROUP#,THREAD#,SEQUENCE#,BYTES,MEMBERS,ARCHIVED,STATUS from v$log;


GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
1 1 821 52428800 1 YES INACTIVE
2 1 822 52428800 1 NO CURRENT
3 2 241 52428800 1 YES INACTIVE
4 2 242 52428800 1 NO CURRENT

2.添加日志组和成员

节点1
alter database add logfile thread 1 group 11 ('+DATA/funddb/onlinelog/redo11a.log','+DATA/funddb/onlinelog/redo11b.log') size 500M;
alter database add logfile thread 1 group 12 ('+DATA/funddb/onlinelog/redo12a.log','+DATA/funddb/onlinelog/redo12b.log') size 500M;
alter database add logfile thread 1 group 13 ('+DATA/funddb/onlinelog/redo13a.log','+DATA/funddb/onlinelog/redo13b.log') size 500M;


节点2
alter database add logfile thread 2 group 14 ('+DATA/funddb/onlinelog/redo14a.log','+DATA/funddb/onlinelog/redo14b.log') size 500M;
alter database add logfile thread 2 group 15 ('+DATA/funddb/onlinelog/redo15a.log','+DATA/funddb/onlinelog/redo15b.log') size 500M;
alter database add logfile thread 2 group 16 ('+DATA/funddb/onlinelog/redo16a.log','+DATA/funddb/onlinelog/redo16b.log') size 500M;

3.切换日志

节点1
SQL> alter system switch logfile;


System altered.


节点2
SQL> alter system switch logfile;


System altered.

4.查询并等待

SQL> select GROUP#,THREAD#,SEQUENCE#,BYTES,MEMBERS,ARCHIVED,STATUS from v$log;


GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
1 1 821 52428800 1 YES INACTIVE
2 1 822 52428800 1 YES ACTIVE
3 2 241 52428800 1 YES INACTIVE
4 2 242 52428800 1 YES ACTIVE
11 1 823 524288000 2 NO CURRENT
12 1 0 524288000 2 YES UNUSED
13 1 0 524288000 2 YES UNUSED
14 2 243 524288000 2 NO CURRENT
15 2 0 524288000 2 YES UNUSED
16 2 0 524288000 2 YES UNUSED
10 rows selected.
等待......
SQL> select GROUP#,THREAD#,SEQUENCE#,BYTES,MEMBERS,ARCHIVED,STATUS from v$log;


GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
1 1 821 52428800 1 YES INACTIVE
2 1 822 52428800 1 YES INACTIVE
3 2 241 52428800 1 YES INACTIVE
4 2 242 52428800 1 YES INACTIVE
11 1 823 524288000 2 NO CURRENT
12 1 0 524288000 2 YES UNUSED
13 1 0 524288000 2 YES UNUSED
14 2 243 524288000 2 NO CURRENT
15 2 0 524288000 2 YES UNUSED
16 2 0 524288000 2 YES UNUSED

10 rows selected.

5.删除旧日志组

SQL> alter database drop logfile group 1;


Database altered.


SQL> alter database drop logfile group 2;


Database altered.


SQL> alter database drop logfile group 3;


Database altered.


SQL> alter database drop logfile group 4;


Database altered.

6.确认完成日志组的扩大

SQL> select GROUP#,THREAD#,SEQUENCE#,BYTES,MEMBERS,ARCHIVED,STATUS from v$log;


GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
11 1 823 524288000 2 NO CURRENT
12 1 0 524288000 2 YES UNUSED
13 1 0 524288000 2 YES UNUSED
14 2 243 524288000 2 NO CURRENT
15 2 0 524288000 2 YES UNUSED
16 2 0 524288000 2 YES UNUSED


"RAC怎么扩大online日志组大小"的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注网站,小编将为大家输出更多高质量的实用文章!

0