Take the datafiles offline and drop them.
Hi Prodadmin,
If there is data in the data files and you try to resize(reduce) it some times it does give you error. Infact I tried once and it did not give me error and the database crashed and I have to recover it from the backups. Of course the file I was resizing was from a data tablespace not from TEMP or UNDO tablespace. Since that incedence I don't dare to do the resizing act in my life again, but I have seen some DBAs are comfortable doing it.
In your case you can do as follows (for 8i):
1. Do this in the maintenace window not when users are connected.
2. Stop and start the database.
3. Force an archive log. (Preferable SQL > ARCHIVE LOG LIST ; )
3. Stop the database and take a cold backup and start it again.
4. Identify the databafiles to be removed from the TEMP/UNDO tablespaces.
5. Take each datafile (that you want to drop) offline and drop them. The command should be similar (not same) to the command shown below.
ALTER DATABASE DATAFILE '/u02/oracle/rbdb1/users03.dbf' OFFLINE DROP;
6. The above procedure just delinks the datafiles from oracle tablespaces but they sill remain in the filesystem (unless you are using OMF feature of 9i).
7. Delete the files from the OS.
8. Stop the database, take a cold backup and restart the database.
Note:
MAKE SURE TO TAKE A COLD BACKUP AS MENTIONED IN STEP 3.
MAKE SURE TO TAKE A COLD BACKUP AS MENTIONED IN STEP 3.
MAKE SURE TO TAKE A COLD BACKUP AS MENTIONED IN STEP 3.
MAKE SURE TO TAKE A COLD BACKUP AS MENTIONED IN STEP 3.
MAKE SURE TO TAKE A COLD BACKUP AS MENTIONED IN STEP 3.
-Hidayath.