oracle数据文件损坏没开归档,【案例】Oracle报错ORA-01100 数据文件丢失后使用归档恢复数据...

【案例】Oracle报错ORA-01100 数据文件丢失后使用归档恢复数据

时间:2016-10-26 20:31   来源:Oracle研究中心   作者:HTZ   点击:

天萃荷净

Oracle研究中心案例分析:运维DBA反映生产Oracle环境数据库数据文件丢失.使用创建数据文件以后的所有归档进行恢复数据文件。ORA-01100 数据文件丢失.无备份.有创建数据文件以后的所有归档的恢复。

本次实验是测试在数据文件丢失.无备份.有归档日志的情况下的恢复.是看到itpub一个人的提问.这种情况在生产环境中基本不存在.因为不可能会保留那么的归档日志。整个实验的前提条件是:数据库运行在归档模式.并且从创建数据文件文件以来的归档日志必须存在。

1.数据库版本

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 – 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

2.修改数据库为归档

oracleplus.net>archive log list;

Database log mode No Archive Mode

Automatic archival Disabled

Archive destination USE_DB_RECOVERY_FILE_DEST

Oldest online log sequence 22

Current log sequence 24

oracleplus.net>shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

oracleplus.net>startup mount;

ORACLE instance started.

Total System Global Area 1068937216 bytes

Fixed Size 2260088 bytes

Variable Size 184550280 bytes

Database Buffers 876609536 bytes

Redo Buffers 5517312 bytes

Database mounted.

oracleplus.net>alter database archivelog ;

Database altered.

oracleplus.net>alter database open;

Database altered.

3.创建表空间与测试表

oracleplus.net>create tablespace htz01 datafile ‘/oracle/app/oracle/oradata/orcl1124/htz0101.dbf’ size 10m;

Tablespace created.

oracleplus.net>drop tabOracleoracleplus.netle scott.htz;

Table dropped.

oracleplus.net>create table scott.htz as select * from dba_objects where rownum=1;

Table created.

oracleplus.net>select count(*) from scott.htz;

COUNT(*)

———-

1

oracleplus.net>alter system archive log current;

System

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值