change the path of datafile,redolog,controlfile

the customer need to relocate the path of $ORADATA to diskarray partition which means that you need to change the path of controlfile,redolog,datafiles.

there is the example to solve this case:

1.generate a  new pfile using the spfile and change the path of controlfiles

remember to copy the controlfile to the new location

2.startup mount pfile=’/new_path/new_pfile.ora’

3.path mapping

/home/oracle/oradata/trade/system01.dbf ----> /oradata/trade/system01.dbf

/home/oracle/oradata/trade/sysaux01.dbf----->/oradata/trade/sysaux01.dbf

/home/oracle/oradata/trade/users01.dbf------> /oradata/trade/users01.dbf

/home/oracle/oradata/trade/temp01.dbf----->/oradata/trade/temp01.dbf

/home/oracle/oradata/trade/TRADE.dbf----->/oradata/trade/TRADE.dbf

/home/oracle/oradata/trade/undotbs01.dbf---->/oradata/trade/undotbs01.dbf

copy all the datafile to new path

//start mount to use the controlfile in new location and change the path of datafiles including tempfiles

[oracle@hundsun trade]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.5.0 - Production on Sat Apr 13 06:48:21 2013

Copyright (c) 1982, 2010, Oracle. All Rights Reserved.

Connected to an idle instance.

SQL> set linesize 160
SQL> startup mount pfile='/oradata/trade/init_trade.ora';
ORACLE instance started.

Total System Global Area 289406976 bytes
Fixed Size 2095736 bytes
Variable Size 239076744 bytes
Database Buffers 41943040 bytes

-------

alter database rename file '/home/oracle/oradata/trade/system01.dbf' to '/oradata/trade/system01.dbf'

alter database rename file '/home/oracle/oradata/trade/sysaux01.dbf' to '/oradata/trade/sysaux01.dbf'

alter database rename file '/home/oracle/oradata/trade/users01.dbf' to '/oradata/trade/users01.dbf'

alter database rename file '/home/oracle/oradata/trade/temp01.dbf' to '/oradata/trade/temp01.dbf'

alter database rename file '/home/oracle/oradata/trade/TRADE.dbf' to '/oradata/trade/TRADE.dbf'

alter database rename file '/home/oracle/oradata/trade/undotbs01.dbf' to '/oradata/trade/undotbs01.dbf'

4.change the path of redo log

alter database rename file '/home/oracle/oradata/trade/redo01.log' to '/oradata/trade/redo01.log'

alter database rename file '/home/oracle/oradata/trade/redo02.log' to '/oradata/trade/redo02.log'

alter database rename file '/home/oracle/oradata/trade/redo03.log' to '/oradata/trade/redo03.log'
//screen cuts of changing redo log

SQL> alter database rename file '/home/oracle/oradata/trade/system01.dbf' to '/oradata/trade/system01.dbf';

Database altered.

SQL> alter database rename file '/home/oracle/oradata/trade/sysaux01.dbf' to '/oradata/trade/sysaux01.dbf';

Database altered.

SQL> alter database rename file '/home/oracle/oradata/trade/users01.dbf' to '/oradata/trade/users01.dbf';

Database altered.

SQL> alter database rename file '/home/oracle/oradata/trade/temp01.dbf' to '/oradata/trade/temp01.dbf';

Database altered.

SQL> alter database rename file '/home/oracle/oradata/trade/TRADE.dbf' to '/oradata/trade/TRADE.dbf';

Database altered.

SQL> alter database rename file '/home/oracle/oradata/trade/undotbs01.dbf' to '/oradata/trade/undotbs01.dbf';

Database altered.

SQL> alter database rename file '/home/oracle/oradata/trade/redo01.log' to '/oradata/trade/redo01.log';

Database altered.

SQL> alter database rename file '/home/oracle/oradata/trade/redo02.log' to '/oradata/trade/redo02.log';

Database altered.

SQL> alter database rename file '/home/oracle/oradata/trade/redo03.log' to '/oradata/trade/redo03.log';

Database altered.

SQL> alter database open;

Database altered.

//create a new spfile

SQL> create spfile from pfile=’/oradata/trade/init_trade.ora’;

File created.

you can also follow this link:

http://docs.oracle.com/cd/B28359_01/server.111/b28310/dfiles005.htm

–EOF–