在没有备份的情况下重新创建丢失的数据文件 (Doc ID 1149946.1)
Recreating a missing datafile with no backups (Doc ID 1149946.1)
APPLIES TO:
Oracle Database - Enterprise Edition - Version 10.2.0.2 and later
Information in this document applies to any platform.
***Checked for relevance on 16-Apr-2014***
GOAL
How to recreate a datafile that is missing at the operating system level. Missing/inaccessible files may be reported with one or more of these errors:
如何重新创建操作系统级别上缺少的数据文件。丢失/无法访问的文件可能会报告,其中包含以下一个或多个错误
ORA-01116: error in opening database file %s
ORA-27041: unable to open file
ORA-01157: cannot identify/lock data file %s - see DBWR trace file
ORA-01119: error in creating database file '%s'
No backup or copy of the datafile is required. We only need the redo logs starting from the time of the datafile creation to the current point in time.
无需备份或复制数据文件。我们只需要从创建数据文件到当前时间点的 redo logs
Note: plugged-in datafiles do not apply in this scenario and needs to be plugged-in again from its source.
注意:插入的数据文件在这种情况下不适用,需要从其源中再次插入
SOLUTION
When a datafile goes missing at the operating system level, you would normally need to restore and recover it from a backup. If you do not have backups of this datafile, but do have redo logs you can still create and recover the datafile. You only need the redo logs starting from the datafile creation time to now.
当数据文件在操作系统级别丢失时,通常需要从备份中还原和恢复它。如果您没有此数据文件的备份,但是有 redo logs,则仍然可以创建和恢复该数据文件。您只需要从数据文件创建时间到现在的 redo logs
Prior to 10g, you would use the following SQL command: 在10g之前,您将使用以下SQL命令
SQL> alter database create datafile 'missing name' as 'misisng name';
SQL> recover datafile 'missing name';
SQL> alter database datafile '<missing name>' online;
As of 10g, you can also do this in RMAN. 从10g开始,您也可以在RMAN中执行此操作
1) RMAN will create the datafile if there is no backups or copies of this datafile:
如果没有该数据文件的备份或副本,RMAN将创建该数据文件
RMAN> restore datafile <missing file id>;
2) Recover the newly created datafile: 恢复新创建的数据文件
RMAN> recover datafile <missing file id>;
3) Bring it online:
RMAN> sql 'alter database datafile <missing file id> online';
Example:
RMAN> list copy of datafile 6; specification does not match any datafile copy in the repository RMAN> list backup of datafile 6; specification does not match any backup in the repository RMAN> restore datafile 6; Starting restore at 14 JUL 10 10:20:02
using channel ORA_DISK_1 creating datafile file number=6 name=/opt/app/oracle/oradata/ORA112/datafile/o1_mf_leng_ts_63t08t64_.dbf
restore not done; all files read only, offline, or already restored
Finished restore at 14 JUL 10 10:20:05 RMAN> recover datafile 6; Starting recover at 14 JUL 10 10:21:02
using channel ORA_DISK_1 starting media recovery
media recovery complete, elapsed time: 00:00:00 Finished recover at 14 JUL 10 10:21:02 RMAN> sql 'alter database datafile 6 online'; sql statement: alter database datafile 6 online
在没有备份的情况下重新创建丢失的数据文件 (Doc ID 1149946.1)的更多相关文章
- 在没备份undo的情况下,undo丢失,重启数据库报ORA-01157错误
今天做了一下undo隐藏参数的实验 在没有备份的情况下,删除正在使用的undo,然后关机 (本次使用的的oracle的隐藏参数,慎用!!!!!!!!!!!!!!) idle> select * ...
- target存放的是编译后的.class文件地方 默认情况下不会讲非class文件放入进入 如果要使用非.class文件 需要通过增加配置方式自动加入文件
target存放的是编译后的.class文件地方 默认情况下不会讲非class文件放入进入 如果要使用非.class文件 需要通过增加配置方式自动加入文件
- Django框架,python2和python3共存的情况下,创建Django项目
一.python2和python3共存的情况下,直接使用 django-admin startproject Django-project 这个时候系统默认使用的是python2创建,可能由于pyth ...
- 存在网路的情况下重命名SDE中数据图层错误(The orphan junction feature class cannot be renamed)
运行环境为ArcGIS9.3,VS2008. 问题描述:数据通过SDE存储在Oracle10g数据库中,数据集中存在几何网络,在存在网络的情况下通过程序对其中的数据图层进行重命名,弹出"Th ...
- ng-file-upload(在单文件选择,并且通过点击“上传”按钮上传文件的情况下,如何在真正选择文件之前保留上一文件信息?)
文章前面研究ng-file-upload可能涉及指令: You can use ng-model or ngf-change instead of specifying function for ng ...
- 使用Apache下poi创建和读取excel文件
一:使用apache下poi创建excel文档 @Test /* * 使用Apache poi创建excel文件 */ public void testCreateExcel() { // 1:创建一 ...
- 如何将RAC数据库的 RMAN Disk 备份 Restore 到另一个节点上的单个实例 (Doc ID 415579.1)
HowTo Restore RMAN Disk backups of RAC Database to Single Instance On Another Node (Doc ID 415579.1) ...
- 在windows下,将mysql离线数据文件导入本地mysql数据库
1. 查看mysql路径 SELECT @@basedir AS basePath FROM DUAL 其实mysql5.6 的数据文件在 C:\ProgramData\MySQL\MySQL Ser ...
- [Android]利用run-as命令在不root情况下读取data下面的数据
正文 一.关键步骤 主要是run-as命令: over@over-ThinkPad-R52:~$ adb shell $ run-as com.package $ cd /data/data/co ...
随机推荐
- cpv framework 0.1 正式发布 (C++ 网页框架)
项目地址 https://github.com/cpv-project/cpv-framework 项目介绍 cpv framework 是一个 C++ 编写的网页框架,基于 seastar fram ...
- Http中URI协议 和URL协议的区别和联系
虽然说URL和URI是整个网络协议栈很常用的东西.可是,假如你去面试求职者其中的差别,估计十个人有八个人答复不上来. 想要熟悉基础知识的朋友最好还是看一下我这个文章. “A Uniform Resou ...
- asp.net core 3.0 选项模式1:使用
本篇只是从应用角度来说明asp.net core的选项模式,下一篇会从源码来分析 1.以前的方式 以前我们使用web.config/app.config时是这样使用配置的 var count = Co ...
- Spring Boot启动提示:org.apache.catalina.LifecycleException: A child container failed during start
一.问题回顾 最近在做一个新项目,从git上下载导入idea后,启动项目,但是报了如下错误: java.util.concurrent.ExecutionException: org.apache.c ...
- Comet OJ - Contest #11 B题 usiness
###题目链接### 题目大意:一开始手上有 0 个节点,有 n 天抉择,m 种方案,在每天中可以选择任意种方案.任意次地花费 x 个节点(手上的节点数不能为负),使得在 n 天结束后,获得 y 个节 ...
- vc6.0 绿色版 下载地址
最新版的vs2019已经完全不支持生成运行在xp下的应用程序 每次在xp下测试,都需要配置好vc6.0,但乱七八糟的太多了,给出地址,绿色版可用 http://www.downcc.com/soft/ ...
- SVN异常,Previous operation has not finished; run 'cleanup' if it was interrupted
SVN在提交.更新.cleanup时报错:Problem running logsvn: Failed to run the WC DB work queue associated with 'D:\ ...
- Geoserver安装
准备内容 安装环境:win10*64位专业版 安装文件:geoserver-2.15.2 安装步骤 安装JDK 1.安装GeoServer是基于Java的环境,所以需要先装Jdk环境. 2.前往官网下 ...
- ftp上传文件,上传的文件大小是0
此问题是最近出现,代码和配置完全没改,试过所有的办法,两天了一直都解决不了,用完弃坑. 防火墙.被动模式主动模式,编码,服务端内存,日志,common-net.jar版本问题,服务端配置,nginx配 ...
- Django实现标签联动以及xadmin中实现标签联动
如图,即实现点击一个城市,出现对应的学校名称.开始一直以为是建立数据表的时候实现的,原来是通过ajax实现的. 思路:当get请求显示原始状态(即下拉框呈现全部内容).当点击一个城市后,通过ajax的 ...