『ORACLE』RAC—增删日志组
Posted 九號客栈
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了『ORACLE』RAC—增删日志组相关的知识,希望对你有一定的参考价值。
[email protected] rac1>select group#,thread#,members,status,bytes/1024/1024 as size_m from v$log;
GROUP# THREAD# MEMBERS STATUS SIZE_M
---------------------- ------------------ -------------- ----------------- ----------
1 1 1 CURRENT 50
2 1 1 INACT 50
3 2 1 INACTIVE 50
4 2 1 CURRENT 50
[email protected] rac1>select group#,member from v$logfile order by 1;
GROUP# MEMBER
------------ ----------------------------------------------------------------------------------------
1 +DATA/racdb/onlinelog/group_1.261.942339581
2 +DATA/racdb/onlinelog/group_2.262.942339581
3 +DATA/racdb/onlinelog/group_3.266.942339807
4 +DATA/racdb/onlinelog/group_4.267.942339809
[email protected] rac1>alter database add logfile thread 1 group 5 ‘+DATA‘ size 50M;
Database altered.
[email protected] rac1>alter database add logfile thread 2 group 6 ‘+DATA‘ size 50M;
Database altered.
[email protected] rac1>select group#,thread#,members,status,bytes/1024/1024 as size_m from v$log;
GROUP# THREAD# MEMBERS STATUS SIZE_M
---------- ---------- ---------- ---------------- ----------
1 1 1 CURRENT 50
2 1 1 INACTIVE 50
3 2 1 INACTIVE 50
4 2 1 CURRENT 50
5 1 1 UNUSED 50
6 2 1 UNUSED 50
[email protected] rac1>select group#,member from v$logfile order by 1;
GROUP# MEMBER
-------------- ----------------------------------------------------------------------------------------
1 +DATA/racdb/onlinelog/group_1.261.942339581
2 +DATA/racdb/onlinelog/group_2.262.942339581
3 +DATA/racdb/onlinelog/group_3.266.942339807
4 +DATA/racdb/onlinelog/group_4.267.942339809
5 +DATA/racdb/onlinelog/group_5.271.942452713
6 +DATA/racdb/onlinelog/group_6.272.942452765
6 rows selected.
删除日志组
注:如果要删除的日志组的状态为current或active,让其变为inactive
alter system switch logfile;
alter system checkpoint;
[email protected] rac1>alter database drop logfile group 5;
Database altered.
[email protected] rac1>alter database drop logfile group 6;
Database altered.
[email protected] rac1>select group#,thread#,members,status,bytes/1024/1024 as size_m from v$log;
GROUP# THREAD# MEMBERS STATUS SIZE_M
---------- ---------- ---------- ---------------- ----------
1 1 1 CURRENT 50
2 1 1 INACTIVE 50
3 2 1 INACTIVE 50
4 2 1 CURRENT 50
[email protected] rac1>select group#,member from v$logfile order by 1;
GROUP# MEMBER
-------------- ----------------------------------------------------------------------------------------
1 +DATA/racdb/onlinelog/group_1.261.942339581
2 +DATA/racdb/onlinelog/group_2.262.942339581
3 +DATA/racdb/onlinelog/group_3.266.942339807
4 +DATA/racdb/onlinelog/group_4.267.942339809
以上是关于『ORACLE』RAC—增删日志组的主要内容,如果未能解决你的问题,请参考以下文章
Installation Oracle11gR2 RAC---修改在线日志