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!

Why can not drop first datafile of tablespace?

Mustafa KALAYCINov 15 2017 — edited Nov 16 2017

Hello everyone,

I am rereading the documentation and I really do not need to do this but for learning purpose, Oracle says that we can not drop first datafile of a tablespace even if it is empty and tablespace has another datafile.

SQL> CREATE TABLESPACE TBS2 DATAFILE 'c:\tbs2_1.dbf' SIZE 2m, 'c:\tbs2_2.dbf' SIZE 2M;

Tablespace created.

SQL> alter tablespace tbs2 drop datafile 'c:\tbs2_1.dbf';

alter tablespace tbs2 drop datafile 'c:\tbs2_1.dbf'

*

ERROR at line 1:

ORA-03263: cannot drop the first file of tablespace TBS2

what is Oracle storing to the first datafile or for what purpose Oracle does not allow me to drop first datafile?

SQL> select * from v$version;

BANNER

--------------------------------------------------------------------------------

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

PL/SQL Release 11.2.0.1.0 - Production

CORE    11.2.0.1.0      Production

TNS for 64-bit Windows: Version 11.2.0.1.0 - Production

NLSRTL Version 11.2.0.1.0 - Production

thanks,

SQL>

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 14 2017
Added on Nov 15 2017
16 comments
2,208 views