how to drop a datafile [message #537779] |
Sat, 31 December 2011 01:15  |
andy huang
Messages: 498 Registered: July 2011
|
Senior Member |
|
|
Dear all,
How to drop a datafile of tablespace.
SQL> alter database datafile '/u01/app/oracle/oradata/oracl/hxl01.dbf' offline drop;
Database altered.
The command success,but the dic view show the datafile also.
SQL> select file_name,tablespace_name from dba_data_files;
FILE_NAME TABLESPACE_NAME
--------------------------------------------- ------------------------------
/u01/app/oracle/oradata/oracl/users01.dbf USERS
/u01/app/oracle/oradata/oracl/sysaux01.dbf SYSAUX
/u01/app/oracle/oradata/oracl/undotbs01.dbf UNDOTBS1
/u01/app/oracle/oradata/oracl/system01.dbf SYSTEM
/u01/app/oracle/oradata/oracl/hxl02.dbf TPS_TEST
/u01/app/oracle/oradata/oracl/hxl01.dbf TPS_TEST
6 rows selected.
|
|
|
|
|
Re: how to drop a datafile [message #537786 is a reply to message #537784] |
Sat, 31 December 2011 01:58   |
andy huang
Messages: 498 Registered: July 2011
|
Senior Member |
|
|
hi,
I want to remove a datafile in a tablespace,but raise error.
SQL> Alter tablespace tps_test drop datafile '/u01/app/oracle/oradata/oracl/hxl02.dbf';
Alter tablespace tps_test drop datafile '/u01/app/oracle/oradata/oracl/hxl02.dbf'
*
ERROR at line 1:
ORA-00060: deadlock detected while waiting for resource
|
|
|
|
|