offline drop datafile疑問?

[复制链接]
查看11 | 回复9 | 2010-12-6 21:04:31 | 显示全部楼层 |阅读模式
oracle9206
今天tablespace空間不夠了,同事新增了一個datafile,
後發現路徑放的不對,然後就執行offline drop了,同時刪了OS的文件
但是為什麼在v$datafile看到的狀態是recover?
回复

使用道具 举报

千问 | 2010-12-6 21:04:31 | 显示全部楼层
还有 空间怎么删除
回复

使用道具 举报

千问 | 2010-12-6 21:04:31 | 显示全部楼层
'offilne drop'does not mean oracle delete the datefile.
I think oracle doesnt support delete datafiles.You should rename the datafile instead of droping it.
回复

使用道具 举报

千问 | 2010-12-6 21:04:31 | 显示全部楼层
数据文件加到表空间中,就好比给水杯添加水!一旦加了就不可以删除datafile,除非整个表空间drop;
你offline drop,当然成了recover。
回复

使用道具 举报

千问 | 2010-12-6 21:04:31 | 显示全部楼层
drop tablespace
recreat tablespace
回复

使用道具 举报

千问 | 2010-12-6 21:04:31 | 显示全部楼层
10g可以把没有使用过的datafile直接drop 掉 而不用drop 表空间
9i不可以
回复

使用道具 举报

千问 | 2010-12-6 21:04:31 | 显示全部楼层
最初由 ddba 发布
[B]10g可以把没有使用过的datafile直接drop 掉 而不用drop 表空间
9i不可以 [/B]

能给出在10g中diop datafile 具体命令吗?
回复

使用道具 举报

千问 | 2010-12-6 21:04:31 | 显示全部楼层
最初由 ddba 发布
[B]10g可以把没有使用过的datafile直接drop 掉 而不用drop 表空间
9i不可以 [/B]



回复

使用道具 举报

千问 | 2010-12-6 21:04:31 | 显示全部楼层
最初由 supersea 发布
[B]
能给出在10g中diop datafile 具体命令吗? [/B]

You use the DROP DATAFILE and DROP TEMPFILE clauses of the ALTER TABLESPACE command to drop a single datafile or tempfile. The datafile must be empty. (A datafile is considered to be empty when no extents remain allocated from it.) When you drop a datafile or tempfile, references to the datafile or tempfile are removed from the data dictionary and control files, and the physical file is deleted from the file system or Automatic Storage Management (ASM) disk group.
The following example drops the datafile identified by the alias example_df3.f in the ASM disk group DGROUP1. The datafile belongs to the example tablespace.
ALTER TABLESPACE example DROP DATAFILE '+DGROUP1/example_df3.f';
The next example drops the tempfile lmtemp02.dbf, which belongs to the lmtemp tablespace.
ALTER TABLESPACE lmtemp DROP TEMPFILE '/u02/oracle/data/lmtemp02.dbf';
This is equivalent to the following statement:
ALTER DATABASE TEMPFILE '/u02/oracle/data/lmtemp02.dbf' DROP
INCLUDING DATAFILES;
Restrictions for Dropping Datafiles:
The following are restrictions for dropping datafiles and tempfiles:
The database must be open.
If a datafile is not empty, it cannot be dropped.
If you must remove a datafile that is not empty and that cannot be made empty by dropping schema objects, you must drop the tablespace that contains the datafile.
You cannot drop the first or only datafile in a tablespace.
This means that DROP DATAFILE cannot be used with a bigfile tablespace.
You cannot drop datafiles in a read-only tablespace.
You cannot drop datafiles in the SYSTEM tablespace.
If a datafile in a locally managed tablespace is offline, it cannot be dropped.
回复

使用道具 举报

千问 | 2010-12-6 21:04:31 | 显示全部楼层
alter tablespace tablespace_name drop datafile '......datafile_name';
不清楚的好好看看楼上
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行