here it is a quick tip „how to move oracle tablespace datafile from one file to another“. i’ve spent a while searching for this, so maybe someone will find this useful too. i needed to free up some space on my laptop disk drive by moving huge oracle data files (*.ora) to an external disk. (also thanks to dlabik for consultation).
ALTER TABLESPACE DATA02 OFFLINE;
ALTER TABLESPACE DATA02
RENAME DATAFILE 'D:\oracle\oradata\mboruvka\DATA021.ORA' TO 'G:\oracle\oradata\mboruvka\DATA021.ORA';
ALTER DATABASE BACKUP CONTROLFILE TO TRACE;
ALTER TABLESPACE DATA02 ONLINE;
note: with this procedure it is not necessary to shutdown db.
You’re getting better 🙂>>Just wondering – why do you need the recovery step??? It shouldn’t be necessary at all. At the same time you’re missing the last step – backup a controlfile 😉
To se mi líbíTo se mi líbí
I see, the backup control file is there but it should be at the end of the procedure. >It whould reflect the offline status of the file beeing moved otherwise…
To se mi líbíTo se mi líbí
regarding the <>recovery<> command: I had this problem: < HREF="http://www.cryer.co.uk/brian/oracle/ORA01113.htm" REL="nofollow">ORA-01113: file n needs media recovery<>.
To se mi líbíTo se mi líbí