1.关闭数据库
shutdown
2.使用os 命令将redo log files 拷贝到新的位置
mv /u01/app/Oracle/oradata/MYNEWDB/onlinelog/o1_mf_1_89y70t1b_.log /home/o1_mf_1_89y70t1b_test.log
3.启动数据库,只装载,不打开。
CONNECT / as SYSDBA
STARTUP MOUNT
4.重命名redo log member
ALTER DATABASE RENAME FILE '/u01/app/oracle/oradata/MYNEWDB/onlinelog/o1_mf_1_89y70t1b_.log' TO '/home/o1_mf_1_89y70t1b_test.log';
5.打开数据库
alter database open;
6.确认是否已经切换到新的位置
SQL> select * from v$logfile;
rows will be truncated
GROUP# STATUS TYPE MEMBER
---------- ------- ------- -----------------------------------------------------
3 ONLINE /u01/app/oracle/oradata/MYNEWDB/onlinelog/o1_mf_3_814
2 ONLINE /u01/app/oracle/oradata/MYNEWDB/onlinelog/o1_mf_2_814
1 ONLINE /home/o1_mf_1_89y70t1b_test.log
4 ONLINE /u01/app/oracle/oradata/MYNEWDB/onlinelog/o1_mf_4_8b3