jump to navigation

Oracle – Delete a Datafile Juni 24, 2007

Posted by Tyo in Oracle.
trackback

A quite sometimes ago my friend asking about how to delete a datafile because he create too many datafiles in his tablespaces. i’m not sure why he want to do that, but because he said that it create a problem with some ORA error when he take the datafiles directly offline and delete it manual, then he restart the pc and then try to open the database via sqlplus. because i’m not in his place, i just assuming that the database state is in mount position but not open. since the oracle is still looking for the datafile that he is manually delete previously.

this is what i do when i delete the datafile from oracle :

=========================================

SHUTDOWNSTARTUP MOUNT

ALTER DATABASE DATAFILE ‘C:\ORACLE\PRODUCT\ORADATA\DATAFILE\USER01.DBF’
OFFLINE DROP;
or

ALTER TABLESPACE users DROP DATAFILE ‘C:\ORACLE\PRODUCT\ORADATA\DATAFILE\USER01.DBF’

ALTER DATABASE OPEN;

EXIT;

=============================================

for some reason this is working for me. i’m not sure for others, for my suggestion is try this on a testing server and do not try it on production server directly. and next time try to consider first whenever create a datafile or modify the tablespaces.

Komentar»

No comments yet — be the first.