There are 2 methods to move the data files of the tablespace to other location.
1 . When Database is Up (for some tablespace or datafile)
To move or rename the Data File when database is up we should take the related tablespaces (eg. TESTD) offline, at this status we can’t do DML or SELECT to all objects that stored in that tablespace.
ATTENTION: You can use this way if the datafile that need to be changed or moved is not belong to SYSTEM tablespaces, and not contain active rollback segments or temporary segments.
Take the Tablespace Offline
- [oracle@levicorp ~] sqlplus ‘/as sysdba’
- SQL > ALTER TABLEPSPACE testd OFFLINE;