网站首页 > 技术文章 正文
记一次rman 数据恢复问题处理案例:
为了省去创建参数文件等和目录文件的麻烦,直接通过创建实例法恢复。
执行恢复时 报错rman恢复 ORA-01180: can not create datafile 1
闪回区有归档,影响了restore,所以删除闪存区的归档日志
搜索归档目录,发现处于闪回区的目录下面:
[root@yueworldoracle_crm soft]# find /data -name archivelog
/data/oracle/app/oracle/flash_recovery_area/POWERDES/archivelog
[root@yueworldoracle_crm soft]# su - oracle
[oracle@yueworldoracle_crm ~]$ cd /data/oracle/app/oracle/flash_recovery_area/POWERDES/archivelog
[oracle@yueworldoracle_crm archivelog]$ ll
total 20
drwxrwxrwx. 2 oracle oinstall 4096 Mar 17 22:05 2016_03_17
drwxrwxrwx. 2 oracle oinstall 4096 Mar 18 22:17 2016_03_18
drwxrwxrwx. 2 oracle oinstall 4096 Mar 19 17:02 2016_03_19
drwxrwxrwx. 2 oracle oinstall 4096 Mar 20 06:00 2016_03_20
drwxrwxrwx. 2 oracle oinstall 4096 Mar 21 00:29 2016_03_21
[oracle@yueworldoracle_crm archivelog]$ du -sh *
40M 2016_03_17
237M 2016_03_18
210M 2016_03_19
177M 2016_03_20
182M 2016_03_21
将这些归档日志移除到临时目录:
[oracle@yueworldoracle_crm archivelog]$ mkdir /data/backup2/
[oracle@yueworldoracle_crm archivelog]$ mv * /data/backup2/
[oracle@yueworldoracle_crm archivelog]$ ll
[oracle@yueworldoracle_crm archivelog]$ ll
total 0
[oracle@yueworldoracle_crm archivelog]$ pwd
/data/oracle/app/oracle/flash_recovery_area/POWERDES/archivelog
开始再做rman恢复操作,先启动到nomount状态:
[oracle@yueworldoracle_crm archivelog]$ rlwrap sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Mon Mar 21 23:43:37 2016
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> shutdown immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup nomount pfile='/oracle/backup/pfile_20160321.ora';
ORACLE instance started.
Total System Global Area 1603411968 bytes
Fixed Size 2213776 bytes
Variable Size 1023412336 bytes
Database Buffers 570425344 bytes
Redo Buffers 7360512 bytes
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
开始rman恢复控制文件:
[oracle@yueworldoracle_crm archivelog]$ rlwrap rman target /
Recovery Manager: Release 11.2.0.1.0 - Production on Mon Mar 21 23:44:08 2016
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: POWERDES (not mounted)
RMAN> restore controlfile to '/data/oracle/powerdes/control01.ctl' from '/oracle/backup/2016-03-21_2/full_POWERDES_20160321_25.bak';
Starting restore at 21-MAR-16
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=134 device type=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 21-MAR-16
加载到mount状态:
RMAN> alter database mount
2> ;
database mounted
released channel: ORA_DISK_1
RMAN>
注册备份集:
RMAN> catalog start with '/oracle/backup/2016-03-21_2';
Starting implicit crosscheck backup at 21-MAR-16
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=134 device type=DISK
Crosschecked 6 objects
Finished implicit crosscheck backup at 21-MAR-16
Starting implicit crosscheck copy at 21-MAR-16
using channel ORA_DISK_1
Finished implicit crosscheck copy at 21-MAR-16
searching for all files in the recovery area
cataloging files...
no files cataloged
searching for all files that match the pattern /oracle/backup/2016-03-21_2
List of Files Unknown to the Database
=====================================
File Name: /oracle/backup/2016-03-21_2/rman_backup.log
File Name: /oracle/backup/2016-03-21_2/full_POWERDES_20160321_25.bak
File Name: /oracle/backup/2016-03-21_2/arch_POWERDES_20160321_26.bak
File Name: /oracle/backup/2016-03-21_2/full_POWERDES_20160321_24.bak
Do you really want to catalog the above files (enter YES or NO)? YES
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: /oracle/backup/2016-03-21_2/full_POWERDES_20160321_25.bak
File Name: /oracle/backup/2016-03-21_2/arch_POWERDES_20160321_26.bak
File Name: /oracle/backup/2016-03-21_2/full_POWERDES_20160321_24.bak
List of Files Which Where Not Cataloged
=======================================
File Name: /oracle/backup/2016-03-21_2/rman_backup.log
RMAN-07517: Reason: The file header is corrupted
进行restore操作,将备份集恢复到数据文件,看到恢复正常不报错了:
RMAN> restore database;
Starting restore at 21-MAR-16
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to /data/oracle/powerdes/system01.dbf
channel ORA_DISK_1: restoring datafile 00002 to /data/oracle/powerdes/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00003 to /data/oracle/powerdes/undotbs01.dbf
channel ORA_DISK_1: restoring datafile 00004 to /data/oracle/powerdes/users01.dbf
channel ORA_DISK_1: restoring datafile 00005 to /data/oracle/powerdes/powerdesk01.dbf
channel ORA_DISK_1: restoring datafile 00006 to /data/oracle/powerdes/plas01.dbf
channel ORA_DISK_1: restoring datafile 00007 to /data/oracle/powerdes/plcrm01.dbf
channel ORA_DISK_1: restoring datafile 00008 to /data/oracle/powerdes/pl01.dbf
channel ORA_DISK_1: restoring datafile 00009 to /data/oracle/powerdes/help01.dbf
channel ORA_DISK_1: reading from backup piece /oracle/backup/2016-03-21_2/full_POWERDES_20160321_24.bak
猜你喜欢
- 2024-11-14 oracle 19C ora-27104 故障解决方案
- 2024-11-14 PCS 7 CFC的常用功能与操作 pcs ccs
你 发表评论:
欢迎- 613℃几个Oracle空值处理函数 oracle处理null值的函数
- 604℃Oracle分析函数之Lag和Lead()使用
- 593℃0497-如何将Kerberos的CDH6.1从Oracle JDK 1.8迁移至OpenJDK 1.8
- 590℃Oracle数据库的单、多行函数 oracle执行多个sql语句
- 584℃Oracle 12c PDB迁移(一) oracle迁移到oceanbase
- 578℃【数据统计分析】详解Oracle分组函数之CUBE
- 567℃最佳实践 | 提效 47 倍,制造业生产 Oracle 迁移替换
- 559℃Oracle有哪些常见的函数? oracle中常用的函数
- 最近发表
-
- PageHelper - 最方便的 MyBatis 分页插件
- 面试二:pagehelper是怎么实现分页的,
- MyBatis如何实现分页查询?(mybatis-plus分页查询)
- SpringBoot 各种分页查询方式详解(全网最全)
- 如何在Linux上运行exe文件,怎么用linux运行windows软件
- 快速了解hive(快速了解美国50个州)
- Python 中的 pyodbc 库(pydbclib)
- Linux搭建Weblogic集群(linux weblogic部署项目步骤)
- 「DM专栏」DMDSC共享集群之部署(一)——共享存储配置
- 故障分析 | MySQL 派生表优化(mysql pipe)
- 标签列表
-
- 前端设计模式 (75)
- 前端性能优化 (51)
- 前端模板 (66)
- 前端跨域 (52)
- 前端缓存 (63)
- 前端aes加密 (58)
- 前端脚手架 (56)
- 前端md5加密 (54)
- 前端路由 (61)
- 前端数组 (73)
- 前端js面试题 (50)
- 前端定时器 (59)
- 前端获取当前时间 (50)
- Oracle RAC (76)
- oracle恢复 (77)
- oracle 删除表 (52)
- oracle 用户名 (80)
- oracle 工具 (55)
- oracle 内存 (55)
- oracle 导出表 (62)
- oracle约束 (54)
- oracle 中文 (51)
- oracle链接 (54)
- oracle的函数 (58)
- 前端调试 (52)
本文暂时没有评论,来添加一个吧(●'◡'●)