Renaming/moving large data files

posted Oct 8, 2010, 6:17 PM by Sachchida Ojha
$SQLplus / as sysdba
sqlplus>Shutdown immediate;

Copy large data files using DD command.
dd if=/u09/MJBDB/oradata/ts_voipdm_data01.dbf of=/u10/MJBDB/oradata/ts_voipdm_data01.dbf bs=2048K
dd if=/u09/MJBDB/oradata/ts_voipdm_data02.dbf of=/u10/MJBDB/oradata/ts_voipdm_data02.dbf bs=2048K
dd if=/u09/MJBDB/oradata/ts_voipdm_data03.dbf of=/u10/MJBDB/oradata/ts_voipdm_data03.dbf bs=2048K
dd if=/u09/MJBDB/oradata/ts_voipdm_index01.dbf of=/u10/MJBDB/oradata/ts_voipdm_index01.dbf bs=2048K
dd if=/u09/MJBDB/oradata/ts_voipdm_index02.dbf of=/u10/MJBDB/oradata/ts_voipdm_index02.dbf bs=2048K

$SQLplus / as sysdba
sqlplus>startup mount;

sqlplus>ALTER DATABASE RENAME FILE '/u09/MJBDB/oradata/ts_voipdm_data01.dbf' TO '/u10/MJBDB/oradata/ts_voipdm_data01.dbf';
sqlplus>ALTER DATABASE RENAME FILE '/u09/MJBDB/oradata/ts_voipdm_data02.dbf' TO '/u10/MJBDB/oradata/ts_voipdm_data02.dbf';
sqlplus>ALTER DATABASE RENAME FILE '/u09/MJBDB/oradata/ts_voipdm_data03.dbf' TO '/u10/MJBDB/oradata/ts_voipdm_data03.dbf';
sqlplus>ALTER DATABASE RENAME FILE '/u09/MJBDB/oradata/ts_voipdm_index01.dbf' TO '/u10/MJBDB/oradata/ts_voipdm_index01.dbf';
sqlplus>ALTER DATABASE RENAME FILE '/u09/MJBDB/oradata/ts_voipdm_index02.dbf' TO '/u10/MJBDB/oradata/ts_voipdm_index02.dbf';

sqlplus>alter database open;


Comments