First, system table Space Data Files Migration :
Sql> conn/@tmpdb as Sysdba connected.
sql> desc dba_data_files;
is the name empty? Type-----------------------------------------------------------------------------
file_name VARCHAR2 (513) file_id number tablespace_name VARCHAR2 (+) BYTES number BLOCKS number STATUS VARCHAR2 (9) RELATIVE _FNO number autoextensible VARCHAR2 (3) maxbytes number Maxblocks number increment_by number User_bytes number User_blocks Number Online_status VARCHAR2 (7)
Sql> Select File_name,tablespace_name from dba_data_files where tablespace_name= ' SYSTEM ';
file_name--------------------------------------------------------------------------------
Tablespace_name------------------------------D:\ORACLE\PRODUCT\10.2.0\ORADATA\STUDY\SYSTEM01. DBF SYSTEM
sql> shutdown Immediate
The database is closed.
The database has been uninstalled.
The ORACLE routine has been closed.
Sql> Host copy D:\oracle\product\10.2.0\oradata\study\system.dbf D:\oracle\study
The system cannot find the file specified.
Sql> host copy D:\oracle\product\10.2.0\oradata\study\system.dbf d:\oracle\study \ system cannot find the file specified.
Sql> host copy D:\oracle\product\10.2.0\oradata\study\SYSTEM01. DBF D:\oracle\stu dy\ has copied 1 files.
Sql> Startup Mount ORACLE routine has been started.
Total System Global area 1140850688 bytes Fixed size 2065184 bytes Variable Size 301993184 bytes
Database Buffers 822083584 bytes Redo buffers 14708736 bytes
The database is loaded.
Sql> ALTER DATABASE rename file ' D:\oracle\product\10.2.0\oradata\study\system01. dbf ' to ' D:\oracle\study\ SYSTEM01.DBF '; The
database has changed.
Sql> ALTER DATABASE open; The
database has changed.
Sql> Select File_name,tablespace_name from dba_data_files where tablespace_name= ' SYSTEM ';
file_name--------------------------------------------------------------------------------
Tablespace_ NAME------------------------------D:\ORACLE\STUDY\SYSTEM01. DBF SYSTEM
sql> Select File_name,tablespace_name from dba_data_files where tablespace_name= ' USERS ';
file_name--------------------------------------------------------------------------------
Tablespace_name-- ----------------------------D:\ORACLE\PRODUCT\10.2.0\ORADATA\STUDY\USERS01. DBF USERS
II, Non-system tablespace data file movement:
Sql> alter TABLESPACE users offline 2;
Table space has changed.
Sql> host copy D:\oracle\product\10.2.0\oradata\study\user01.dbf d:\oracle\study \ system cannot find the file specified.
Sql> host copy D:\oracle\product\10.2.0\oradata\study\users01.dbf D:\oracle\stud y\ has copied 1 files.
sql> alter tablespace users rename datafile ' D:\oracle\product\10.2.0\oradata\st udy\users01.dbf ' to ' d:\oracle\ STUDY\USERS01.DBF ';
Table space has changed.
sql> alter tablespace users online 2;
Table space has changed.
Sql> Select File_name,tablespace_name from dba_data_files where tablespace_name= ' USERS ';
file_name--------------------------------------------------------------------------------
Tablespace_name------------------------------D:\ORACLE\STUDY\USERS01. DBF USERS
Sql>
Oracle Transfer Table Space