作者:雨竹清风
加入重做日志组的SQL命令为:
alter database add logfile (路径+文件名) size _M;
示例如下:
SQL> select GROUP#, STATUS, TYPE, MEMBER from v$logfile;
GROUP# STATUS TYPE MEMBER
---------- ------- ------- --------------------------------------------------
3 STALE ONLINE D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO03.LOG
2 STALE ONLINE D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO02.LOG
1 ONLINE D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO01.LOG
SQL> alter database add logfile('D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO04a.LOG','D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO04b.LOG') size 4M;
数据库已更改。
添加完后进行验证。
SQL> select GROUP#, STATUS, TYPE, MEMBER from v$logfile;
GROUP# STATUS TYPE MEMBER
---------- ------- ------- --------------------------------------------------
3 STALE ONLINE D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO03.LOG
2 STALE ONLINE D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO02.LOG
1 ONLINE D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO01.LOG
4 ONLINE D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO04A.LOG
4 ONLINE D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO04B.LOG
删除重做日志组的sql命令为:alter database drop logfile group 组号;
示例如下:
SQL> alter database drop logfile group 4;
数据库已更改。
删除后进行验证。
SQL> select GROUP#, STATUS, TYPE, MEMBER from v$logfile;
GROUP# STATUS TYPE MEMBER
---------- ------- ------- --------------------------------------------------
3 STALE ONLINE D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO03.LOG
2 STALE ONLINE D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO02.LOG
1 ONLINE D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO01.LOG