Database open, migrate data under the Users table space to/home/oracle/dsk1 (can be renamed)
Col name for A50
Sql> select file#,name,checkpoint_change# from V$datafile;
file# NAME checkpoint_change#
---------- -------------------------------------------------- ------------------
1/U01/APP/ORACLE/ORADATA/ORA11GR2/SYSTEM01.DBF 1043045
2/U01/APP/ORACLE/ORADATA/ORA11GR2/SYSAUX01.DBF 1043045
3/U01/APP/ORACLE/ORADATA/ORA11GR2/UNDOTBS01.DBF 1043045
4/U01/APP/ORACLE/ORADATA/ORA11GR2/USERS01.DBF 1043045
5/U01/APP/ORACLE/ORADATA/ORA11GR2/EXAMPLE01.DBF 1043045
6/U01/APP/ORACLE/ORADATA/ORA11GR2/USERS02.DBF 1044441
Sql> alter system checkpoint;
Select file#,name,checkpoint_change# from V$datafile;
Alter TABLESPACE users offline;
Select file#,name,checkpoint_change# from V$datafile;
Alter tablespace users rename DataFile '/u01/app/oracle/oradata/ora11gr2/users01.dbf ' to '/home/oracle/dsk1/ USERS01.DBF ';
Alter tablespace users rename DataFile '/u01/app/oracle/oradata/ora11gr2/users02.dbf ' to '/home/oracle/dsk1/ USERS02.DBF '; Modify the contents of the control file
Select name from V$datafile;
sql> alter tablespace users online;
Summary of four steps
1 tablespace offline
2 CP datafile to Dest
3 alter tablespace XXX rename
4 TBS online
Database open state, how to modify the data file path (can be used to change the name of the path)