SQL> a.group#, a.member, b.bytes/1024/1024 MB, b.archived, b.status
2 from v$logfile a, v$log b
3 where a.group#=b.group#
4 order by 1, 2;
SQL> alter database add logfile group 4
2 '/ORA19/app/oracle/oradata/ORACLE19/redo04_a.log' size 10M;
SQL> a.group#, a.member, b.bytes/1024/1024 MB, b.archived, b.status
2 from v$logfile a, v$log b
3 where a.group#=b.group#
4 order by 1, 2;
SQL> alter database add logfile member
2 '/ORA19/app/oracle/oradata/ORACLE19/redo04_b.log' to group 4;
SQL> a.group#, a.member, b.bytes/1024/1024 MB, b.archived, b.status
2 from v$logfile a, v$log b
3 where a.group#=b.group#
4 order by 1, 2;
SQL> alter database drop logfile member
2 '/ORA19/app/oracle/oradata/ORACLE19/redo04_b.log';
SQL> a.group#, a.member, b.bytes/1024/1024 MB, b.archived, b.status
2 from v$logfile a, v$log b
3 where a.group#=b.group#
4 order by 1, 2;
SQL> alter database drop logfile group 4;
SQL> a.group#, a.member, b.bytes/1024/1024 MB, b.archived, b.status
2 from v$logfile a, v$log b
3 where a.group#=b.group#
4 order by 1, 2;
모든 Redo Log File을 /home/oracle/disk1
로 이동하세요.
그룹번호는 1, 2, 3으로 3개의 그룹을 만들고 각 멤버는 1개씩, 크기는 각 5M.
SQL> select a.group#, a.member, b.bytes/1024/1024 MB, b.archived, b.status
from v$logfile a, v$log b
where a.group#=b.group#
order by 1, 2;
SQL> select member from v$logfile;
SQL> select status from v$instance;
SQL> shutdown immediate;
SQL> startup mount;
SQL> !mkdir /home/oracle/disk1
SQL> !cp /ORA19/app/oracle/oradata/ORACLE19/redo01.log /home/oracle/disk1/redo01.log
SQL> !cp /ORA19/app/oracle/oradata/ORACLE19/redo02.log /home/oracle/disk1/redo02.log
SQL> !cp /ORA19/app/oracle/oradata/ORACLE19/redo03.log /home/oracle/disk1/redo03.log
SQL> alter database rename
2 file '/ORA19/app/oracle/oradata/ORACLE19/redo01.log'
3 to '/home/oracle/disk1/redo01.log';
SQL> alter database rename
2 file '/ORA19/app/oracle/oradata/ORACLE19/redo02.log'
3 to '/home/oracle/disk1/redo02.log';
SQL> alter database rename
2 file '/ORA19/app/oracle/oradata/ORACLE19/redo03.log'
2 to '/home/oracle/disk1/redo03.log';
SQL> select member from v$logfile;
SQL> alter database open;
SQL> select status from v$instance;
SQL> rm /ORA19/app/oracle/oradata/ORACLE19/redo01.log /ORA19/app/oracle/oradata/ORACLE19/redo02.log /ORA19/app/oracle/oradata/ORACLE19/redo03.log
/home/oracle/disk1/redo01_a.log, redo02_a.log, redo03_a.log
/home/oracle/disk2/redo01_b.log, redo02_b.log, redo03_b.log
로 구성을 변경하세요.
SQL> select a.group#, a.member, b.bytes/1024/1024 MB, b.archived, b.status
2 from v$logfile a, v$log b
3 where a.group#=b.group#
4 order by 1, 2;
SQL> select status from v$instance;
SQL> select member from v$logfile;
SQL> shutdown immediate;
SQL> startup mount;
SQL> !mkdir /home/oracle/disk1 /home/oracle/disk2
SQL> !cp /home/oracle/disk1/redo01.log /home/oracle/disk1/redo01_a.log
SQL> !cp /home/oracle/disk1/redo02.log /home/oracle/disk1/redo02_a.log
SQL> !cp /home/oracle/disk1/redo03.log /home/oracle/disk1/redo03_a.log
SQL> !cp /home/oracle/disk1/redo01_a.log /home/oracle/disk2/redo01_b.log
SQL> !cp /home/oracle/disk1/redo02_a.log /home/oracle/disk2/redo02_b.log
SQL> !cp /home/oracle/disk1/redo03_a.log /home/oracle/disk2/redo03_b.log
SQL> alter database rename
2 file '/home/oracle/disk1/redo01.log'
3 to '/home/oracle/disk1/redo01_a.log';
SQL> alter database rename
2 file '/home/oracle/disk1/redo02.log'
3 to '/home/oracle/disk1/redo02_a.log';
SQL> alter database rename
2 file '/home/oracle/disk1/redo03.log'
3 to '/home/oracle/disk1/redo03_a.log';
SQL> alter database add logfile member
2 '/home/oracle/disk2/redo01_b.log' to group 1;
SQL> alter database add logfile member
2 '/home/oracle/disk2/redo02_b.log' to group 2;
SQL> alter database add logfile member
2 '/home/oracle/disk2/redo03_b.log' to group 3;
SQL> select member from v$logfile;
SQL> alter database open;
SQL> select status from v$instance;
$ rm /home/oracle/disk1/redo01.log /home/oracle/disk1/redo02.log /home/oracle/disk1/redo03.log
/home/oracle/disk3/control01.ctl, redo01_a.log, redo02_a.log, redo03_a.log
/home/oracle/disk4/control02.ctl, redo01_b.log, redo02_b.log, redo03_b.log
/home/oracle/disk5/control03.ctl, redo01_c.log, redo02_c.log, redo03_c.log
로 구성하세요.
Control File 작업
Redo Log File 작업
-- Control File 작업
SQL> select status from v$instance;
SQL> show parameter spfile;
SQL> select name from v$controlfile;
SQL> !mkdir /home/oracle/disk3 /home/oracle/disk4 /home/oracle/disk5
SQL> !cp <기존 Control File 경로> /home/oracle/disk3/control01.dbf
SQL> !cp <기존 Control File 경로> /home/oracle/disk4/control02.dbf
SQL> !cp <기존 Control File 경로> /home/oracle/disk5/control03.dbf
SQL> alter system set control_files='/home/oracle/disk3/control01.ctl',
2 '/home/oracle/disk4/control02.ctl',
3 '/home/oracle/disk5/control03.ctl'
4 scope=spfile;
SQL> shutdown immediate;
SQL> startup;
SQL> select status from v$instance;
SQL> select name from v$controlfile;
SQL> !rm <기존 Control File 경로>
-- Redo Log File 작업
SQL> select a.group#, a.member, b.bytes/1024/1024 MB, b.archived, b.status
2 from v$logfile a, v$log b
3 where a.group#=b.group#
4 order by 1, 2;
SQL> select member from v$logfile;
SQL> show parameter spfile;
SQL> shutdown immediate;
SQL> startup mount;
SQL> !cp /home/oracle/disk1/redo01_a.log /home/oracle/disk3/redo01_a.log
SQL> !cp /home/oracle/disk1/redo02_a.log /home/oracle/disk3/redo02_a.log
SQL> !cp /home/oracle/disk1/redo03_a.log /home/oracle/disk3/redo03_a.log
SQL> !cp /home/oracle/disk2/redo01_b.log /home/oracle/disk4/redo01_b.log
SQL> !cp /home/oracle/disk2/redo02_b.log /home/oracle/disk4/redo02_b.log
SQL> !cp /home/oracle/disk2/redo03_b.log /home/oracle/disk4/redo03_b.log
SQL> alter database rename
2 file '/home/oracle/disk1/redo01_a.log'
3 to '/home/oracle/disk3/redo01_a.log';
SQL> alter database rename
2 file '/home/oracle/disk1/redo02_a.log'
3 to '/home/oracle/disk3/redo02_a.log';
SQL> alter database rename
2 file '/home/oracle/disk1/redo03_a.log'
3 to '/home/oracle/disk3/redo03_a.log';
SQL> alter database rename
2 file '/home/oracle/disk2/redo01_b.log'
3 to '/home/oracle/disk4/redo01_b.log';
SQL> alter database rename
2 file '/home/oracle/disk2/redo02_b.log'
3 to '/home/oracle/disk4/redo02_b.log';
SQL> alter database rename
2 file '/home/oracle/disk2/redo03_b.log'
3 to '/home/oracle/disk4/redo03_b.log';
SQL> select a.group#, a.member, b.bytes/1024/1024 MB, b.archived, b.status
2 from v$logfile a, v$log b
3 where a.group#=b.group#
4 order by 1, 2;
SQL> alter database open;
SQL> select status from v$instance;
SQL> alter database add logfile member
2 '/home/oracle/disk5/redo01_c.log' to group 1;
SQL> alter database add logfile member
2 '/home/oracle/disk5/redo02_c.log' to group 2;
SQL> alter database add logfile member
2 '/home/oracle/disk5/redo03_c.log' to group 3;
SQL> select a.group#, a.member, b.bytes/1024/1024 MB, b.archived, b.status
2 from v$logfile a, v$log b
3 where a.group#=b.group#
4 order by 1, 2;
SQL> !rm <기존 Redo Log File들>