Welcome 微信登录

首页 / 数据库 / MySQL / Oracle 数据库模拟数据文件损坏恢复

Oracle数据文件有时候因为某种原因会导致损坏而导致无法启动数据库,那如何恢复呢?下面是一次模拟实验,如下1. 首先创建一个表空间TEST,在创建一个表test在表空间test上SQL> create tablespace test datafile "/u01/app/oracle/oradata/lhz/test01.dbf" size 10M; 
SQL>  create table test as  select * from dba_objects;Table createdSQL> alter table test move tablespace test;Table alteredSQL> select count(*) from test; 
  COUNT(*)----------   50881 
2. 然后用vi编辑数据文件
[oracle@odb1 ~]$ vi /u01/app/oracle/oradata/lhz/test01.dbf3.随便输入什么字符,保存4.关闭数据库实例SQL> shutdown immediate;Database closed.Database dismounted.ORACLE instance shut down.5.启动实例SQL> startupORACLE instance started. 
Total System Global Area  599785472 bytesFixed Size                  2098112 bytesVariable Size           243272768 bytesDatabase Buffers          348127232 bytesRedo Buffers                6287360 bytesDatabase mounted.ORA-01157: cannot identify/lock data file 9 - see DBWR trace fileORA-01110: data file 9: "/u01/app/oracle/oradata/lhz/test01.dbf"
看到报错信息数据文件不能验证或锁定数据文件
  • 1
  • 2
  • 下一页
Oracle Flashback database数据库密码的破解(以破解MySQL数据库为例)实验相关资讯      Oracle 数据库恢复  本文评论 查看全部评论 (0)
表情: 姓名: 字数