How to delete datafile if Tablespace contains 2 datafiles [message #137885] |
Sun, 18 September 2005 09:44 |
dnvs_praveen
Messages: 47 Registered: July 2005 Location: bangalore
|
Member |
|
|
Hi
I know that my tablespace is having 2 datafiles.
If i give the statement 'alter database datafile '/home/oracle/newdb2/scotttss.dbf' offline drop' still datafile is presenting in the location itself and also when i give the statement 'select tablespace_name, file_name from dba_data_files' i can able to see the filename.
If i want to delete this datafile from dictionary and also from disk, then what statement i should give.
Before giving how to check in this particular datafile, any data presented or not?
Praveen
|
|
|
|
|
|
Re: How to delete datafile if Tablespace contains 2 datafiles [message #140080 is a reply to message #137885] |
Fri, 30 September 2005 14:15 |
AnalystParth
Messages: 15 Registered: September 2005 Location: India
|
Junior Member |
|
|
Praveen, unfortunately dropping datafile in oracle is a messy affair.
Not only will it let you drop it, but depending upon the oracle version you can notice some wierd behaviours such as:
1. Losing data along with the datafile.
2. Tables trying to extend into the already dropped datafile and throwing out an error.
3. applications going into either a hang or dumping internal errors intermittently.
The typical recommended procedure, like Frank mentioned is to drop and recreate the tablespace. But since you may not want to lose the information in the tablespace before dropping it, take an export backup of the tablespace info, drop the tablespace, recreate tablespace and import back.
--Parth
|
|
|