Get the App
SLTechnology News&Howtos  ›  Database  › 

How does RAC expand the size of online log groups

Shulou Source: shulou.com Published: 2022-05-31 14:30:50 09月24日 Update

This article introduces the relevant knowledge of "RAC how to expand the size of online log group". In the operation process of actual cases, many people will encounter such difficulties. Next, let Xiaobian lead you to learn how to deal with these situations! I hope you can read carefully and learn something!

1. View current default log groups

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. Add log groups and members

node 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;

node 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. switch log

node 1

SQL> alter system switch logfile;

System altered.

node 2

SQL> alter system switch logfile;

System altered.

4. query and wait

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.

Wait...

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. Delete old log groups

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. Confirm completion of expansion of log group

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 how to expand the online log group size" content is introduced here, thank you for reading. If you want to know more about industry-related knowledge, you can pay attention to the website. Xiaobian will output more high-quality practical articles for everyone!

Tags: Logs nodes size content more knowledge practicality achievement next dilemma reality situation members articles cases editing websites industries processes high quality Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei macOS MySQL MariaDB Linux