龙空技术网

oracle在线增加redo日志组成员

思庄认证培训 83

前言:

此刻我们对“oracle添加redo日志组”都比较珍视,大家都需要学习一些“oracle添加redo日志组”的相关文章。那么小编同时在网上搜集了一些关于“oracle添加redo日志组””的相关文章,希望同学们能喜欢,咱们一起来学习一下吧!

文档课题:oracle在线增加redo日志组成员.

数据库:oracle11.2.0.4

操作过程

SYS@orcl>select group#,bytes/1024/1024 "size(M)",status,archived from v$log;

GROUP# size(M) STATUS ARC

-------------------- ---------------- ---

1 50 INACTIVE YES

2 50 INACTIVE YES

3 50 CURRENT NO

SYS@orcl>select member from v$logfile;

MEMBER

--------------------------------------------------------------------------------

/u01/app/oracle/oradata/orcl/redo03.log

/u01/app/oracle/oradata/orcl/redo02.log

/u01/app/oracle/oradata/orcl/redo01.log

SYS@orcl>alter database add logfile member'/u01/app/oracle/fast_recovery_area/ORCL/onlinelog/redo01b.log' to group 1;

Databasealtered.

SYS@orcl>select group#,members,bytes/1024/1024 "size(M)",status,archived fromv$log;

GROUP# MEMBERS size(M) STATUS ARC

-------------------- ---------- ---------------- ---

1 2 50 INACTIVE YES

2 1 50 INACTIVE YES

3 1 50 CURRENT NO

SYS@orcl>alter database add logfile member'/u01/app/oracle/fast_recovery_area/ORCL/onlinelog/redo02b.log' to group 2;

Databasealtered.

SYS@orcl>select group#,members,bytes/1024/1024 "size(M)",status,archived fromv$log;

GROUP# MEMBERS size(M) STATUS ARC

-------------------- ---------- ---------------- ---

1 2 50 INACTIVE YES

2 2 50 INACTIVE YES

3 1 50 CURRENT NO

SYS@orcl>alter system switch logfile

2 ;

Systemaltered.

SYS@orcl>alter system checkpoint;

Systemaltered.

SYS@orcl>select group#,members,bytes/1024/1024 "size(M)",status,archived fromv$log;

GROUP# MEMBERS size(M) STATUS ARC

-------------------- ---------- ---------------- ---

1 2 50 CURRENT NO

2 2 50 INACTIVE YES

3 1 50 INACTIVE YES

SYS@orcl>alter database add logfile member '/u01/app/oracle/fast_recovery_area/ORCL/onlinelog/redo03b.log'to group 3;

Databasealtered.

SYS@orcl>select group#,members,bytes/1024/1024 "size(M)",status,archived fromv$log;

GROUP# MEMBERS size(M) STATUS ARC

-------------------- ---------- ---------------- ---

1 2 50 CURRENT NO

2 2 50 INACTIVE YES

3 2 50 INACTIVE YES

SYS@orcl>select member from v$logfile;

MEMBER

--------------------------------------------------------------------------------

/u01/app/oracle/oradata/orcl/redo03.log

/u01/app/oracle/oradata/orcl/redo02.log

/u01/app/oracle/oradata/orcl/redo01.log

/u01/app/oracle/fast_recovery_area/ORCL/onlinelog/redo01b.log

/u01/app/oracle/fast_recovery_area/ORCL/onlinelog/redo02b.log

/u01/app/oracle/fast_recovery_area/ORCL/onlinelog/redo03b.log

6rows selected.

说明:如上所示,成功添加日志组成员.

标签: #oracle添加redo日志组