Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to drop a datafile

628668Sep 1 2008 — edited Sep 1 2008
in a article i saw this....

*"The datafile cannot be dropped by using the ALTER TABLESPACE...DROP DATAFILE statement. The DROP DATAFILE clause is not valid for the ALTER TABLESPACE statement."*

but when i drop a datafile from the EM console and look the sql query....is was like this...

ALTER TABLESPACE "TABLESPSP" DROP DATAFILE 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\DB8888\QWERTY'
ALTER TABLESPACE "TABLESPSP" OFFLINE NORMAL

there it uses ALTER TABLESPACE with DROP DATAFILE.... statement

what this mean.....



This is the Explanation i got from the article...

To drop a datafile from the database, you should take the datafile offline by using the ALTER
DATABASE...DATAFILE...OFFLINE statement and then drop the datafile by using the ALTER DATABASE...DROP
DATAFILE statement.

The datafile cannot be dropped by using the ALTER TABLESPACE...DROP DATAFILE statement. The DROP DATAFILE clause is not valid with the ALTER TABLESPACE statement.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 29 2008
Added on Sep 1 2008
10 comments
4,953 views