博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
关于无法标识/锁定数据库文件
阅读量:6114 次
发布时间:2019-06-21

本文共 1672 字,大约阅读时间需要 5 分钟。

今天在导库的时候失败了,就把oracle服务给停了,然后把表空间文件给删了.结果在启动实例的时候报了如下错误:

后来通过执行一下查询发现,实例的状态为mounted.

1 SELECT * FROM V$INSTANCE;

没办法,内事不决问百度,发现如下解决办法:

1 alter database datafile 'd:\xx.dbf' offline drop;2 alter database open;

oracle 官方说明如下:

Altering Datafile Availability

You can alter the availability of individual datafiles or tempfiles by taking them offline or bringing them online. Offline datafiles are unavailable to the database and cannot be accessed until they are brought back online.

Reasons for altering datafile availability include the following:

  • You want to perform an offline backup of a datafile.

  • You want to rename or relocate a datafile. You must first take it offline or take the tablespace offline.

  • The database has problems writing to a datafile and automatically takes the datafile offline. Later, after resolving the problem, you can bring the datafile back online manually.

  • A datafile becomes missing or corrupted. You must take it offline before you can open the database.

Taking Datafiles Offline in NOARCHIVELOG Mode

To take a datafile offline when the database is in NOARCHIVELOG mode, use the ALTER DATABASE statement with both the DATAFILE and OFFLINE FOR DROP clauses.

  • The OFFLINE keyword causes the database to mark the datafile OFFLINE, whether or not it is corrupted, so that you can open the database.

  • The FOR DROP keywords mark the datafile for subsequent dropping. Such a datafile can no longer be brought back online.

The following statement takes the specified datafile offline and marks it to be dropped:

ALTER DATABASE DATAFILE '/u02/oracle/rbdb1/users03.dbf' OFFLINE FOR DROP;

 

转载于:https://www.cnblogs.com/kairui/archive/2013/03/23/ora_01157.html

你可能感兴趣的文章
div+css 你知道多少?值得一看
查看>>
全网最详细的Git学习系列之介绍各个Git图形客户端(Windows、Linux、Mac系统皆适用ing)(图文详解)...
查看>>
NET插件系统之一,开头:MEF的一些疑问和相关思考
查看>>
iOS:分组的表格视图UITableView,可以折叠和展开
查看>>
GNU make manual 翻译( 九十八)
查看>>
一个人的渺小与微不足道。
查看>>
不同场景下 MySQL 的迁移方案
查看>>
GNU make manual 翻译( 一百六十四)
查看>>
ASP.NET中 DetailsView(详细视图)的使用前台绑定
查看>>
Hadoop示例程序WordCount详解及实例
查看>>
一道面试题带来的前端优化——实现星星点评
查看>>
CoderZh首款Python联机对战游戏 - NancyTetris1.0倾情发布(二)
查看>>
poj3250 Bad Hair Day
查看>>
React Native 网络请求
查看>>
WPF/Silverlight的数据绑定设计的真糟糕
查看>>
SQL复制多表数据
查看>>
排序的基本概念与分类
查看>>
成功将ubuntu8.10升级到了9.10
查看>>
python3-类与对象
查看>>
Python正则表达式指南
查看>>