기억을 더듬어서 적었으니 실제 이관 할 때는 로컬에서 꼭 테스트해보기~
-----> 각각 처리할때마다 실제 파일을 그때 옮겨야됨(각각 계속 기록이되기때문 중요!!!)
set oracle_sid=TESTDB
sqlplus /nolog
conn /as sysdba
shutdown immediate;
startup mount;
alter database rename file 'C:\oradata\TESTDB\REDO01.log' to 'D:\oradata\TESTDB\REDO01.log';
alter database rename file 'C:\oradata\TESTDB\REDO02.log' to 'D:\oradata\TESTDB\REDO02.log';
alter database rename file 'C:\oradata\TESTDB\REDO03.log' to 'D:\oradata\TESTDB\REDO03.log';
--위치만 바뀌고 다른건 똑같기때문에 그룹명 추가는 안해도됨!!
alter database add logfile member 'C:\oradata\TESTDB\REDO01.log' to group 1;
alter database add logfile member 'C:\oradata\TESTDB\REDO02.log' to group 2;
alter database add logfile member 'C:\oradata\TESTDB\REDO03.log' to group 3;
select member from v$logfile;
shutdown immediate;
startup;
alter system set control_files='D:\oradata\TESTDB\control01.ctl','D:\oradata\fast_recovery_area\TESTDB\control02.ctl' scope=spfile;
shutdown immediate;
startup;
show parameter control
shutdown immediate;
startup mount;
alter database rename file 'C:\oradata\TESTDB\SYSTEM01.dbf' to 'D:\oradata\ASRS2\SYSTEM01.dbf';
alter database rename file 'C:\oradata\TESTDB\SYSAUX01.dbf' to 'D:\oradata\ASRS2\SYSAUX01.dbf';
alter database rename file 'C:\oradata\TESTDB\UNDOTBS01.dbf' to 'D:\oradata\ASRS2\UNDOTBS01.dbf';
alter database rename file 'C:\oradata\TESTDB\USERS01.dbf' to 'D:\oradata\ASRS2\USERS01.dbf';
alter database rename file 'C:\oradata\TESTDB\PMCIF.dbf' to 'D:\oradata\ASRS2\PMCIF.dbf';
alter database rename file 'C:\oradata\TESTDB\ASRS2.dbf' to 'D:\oradata\ASRS2\ASRS2.dbf';
alter database rename file 'C:\oradata\TESTDB\ASRS2_IDX.dbf' to 'D:\oradata\ASRS2\ASRS2_IDX.dbf';
startup;
select name from v$datafile;