重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1679|回复: 0
打印 上一主题 下一主题

[Oracle] ORA-01537, ORA-00376: When Recreating a Datafile After Offline Drop

[复制链接]
跳转到指定楼层
楼主
发表于 2021-8-15 19:40:07 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 刘泽宇 于 2021-8-15 19:42 编辑

参照官方文档ID:100718.1
Problem Description
-------------------
You have offline dropped a datafile then try to recreate the datafile (ALTER
DATABASE ADD DATAFILE) with the same name and get error message:

ORA-1537 (datafile already exists) even though you have offline dropped it.

ORA-01537: "cannot add data file '%s' - file already part of database"
     Cause:  During CREATE or ALTER TABLESPACE, a file being added is already
             part of the database.
    Action:  Use a different file name.

ORA-00376: "file %s cannot be read at this time"
     Cause:  attempting to read from a file that is not readable. Most likely
             the file is offline.
    Action: Check the state of the file. Bring it online


Solution Description
--------------------
Before proceeding, see Note:111316.1  How to 'DROP' a Datafile from a
Tablespace.  

If a tablespace has only one datafile then dropping the tablespace will
remove details of the datafile from the data dictionary.
If a tablespace has more than one datafile, then to remove the datafile,
the tablespace must be dropped and recreated having exported any data
that needs to be retained.

To remove details of the datafile from the Data Dictionary:

1) Export the entire tablespace contents.  

2) Drop the tablespace, including contents.

3) Rebuild the tablespace with the datafiles you want it to contain.  

4) Import the data back in.

Explanation
-----------
The Data Dictionary still contains information that this datafile
exists. Offline drop of a datafile does not remove it from the Data
Dictionary.



分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

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

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-6-17 03:20 , Processed in 0.087656 second(s), 20 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表