软件世界网 购物 网址 三丰软件 | 小说 美女秀 图库大全 游戏 笑话 | 下载 开发知识库 新闻 开发 图片素材
多播视频美女直播
↓电视,电影,美女直播,迅雷资源↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
移动开发 架构设计 编程语言 Web前端 互联网
开发杂谈 系统运维 研发管理 数据库 云计算 Android开发资料
  软件世界网 -> 数据库 -> oracle11g云迁移报错ORA -> 正文阅读

[数据库]oracle11g云迁移报错ORA

1,今天进行oracle云迁移,执行到rman的restore database;的时候报错信息:
	RMAN> restore database;


	Starting restore at 21-MAR-16
	using channel ORA_DISK_1


	creating datafile file number=1 name=/data/oracle/powerdes/system01.dbf
	RMAN-00571: ===========================================================
	RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
	RMAN-00571: ===========================================================
	RMAN-03002: failure of restore command at 03/21/2016 20:47:09
	ORA-01180: can not create datafile 1
	ORA-01110: data file 1: '/data/oracle/powerdes/system01.dbf'


	RMAN> exit

2,方案一:看到不能create,查看到/data/oracle/powerdes目录已经有 ,所以移除mv,此方案不能生效
[oracle@yueworldoracle_crm backup]$ mkdir /tmp/oracle/
[oracle@yueworldoracle_crm backup]$ mv /data/oracle/powerdes/*.dbf /tmp/oracle/
3,方案二:重新去原idc库上备份控制文件,再进行恢复,此方案还是不通
去原来的库上,备份控制文件:
RMAN> backup current controlfile;
Starting backup at 21-MAR-16
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=139 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_1: starting piece 1 at 21-MAR-16
channel ORA_DISK_1: finished piece 1 at 21-MAR-16
piece handle=/oracle/app/oracle/flash_recovery_area/POWERDES/backupset/2016_03_21/o1_mf_ncnnf_TAG20160321T211047_cgzwprbc_.bkp tag=TAG20160321T211047 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 21-MAR-16
RMAN> exit
将控制文件传输到云库上面:
[oracle@wgq__web_3_90 data]$ scp -P5001 /oracle/app/oracle/flash_recovery_area/POWERDES/backupset/2016_03_21/o1_mf_ncnnf_TAG20160321T211047_cgzwprbc_.bkp 2.15.27.6:/oracle/backup/
oracle@42.159.237.46's password: 
o1_mf_ncnnf_TAG20160321T211047_cgzwprbc_.bkp                                                                                                                                                                                                100% 9600KB   4.7MB/s   00:02    
[oracle@wgq__web_3_90 data]$ 
RMAN> restore controlfile to '/oracle/app/oracle/powerdes/control01.ctl' from '/oracle/backup/o1_mf_ncnnf_TAG20160321T211047_cgzwprbc_.bkp';
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:03
Finished restore at 21-MAR-16
RMAN> 
......省略alter database mount; catalog start with 过程...
RMAN> restore database;
Starting restore at 21-MAR-16
using channel ORA_DISK_1
creating datafile file number=1 name=/data/oracle/powerdes/system01.dbf
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 03/21/2016 21:23:09
ORA-01180: can not create datafile 1
ORA-01110: data file 1: '/data/oracle/powerdes/system01.dbf'
RMAN> 
        文章来源地址:http://blog.csdn.net/mchdba/article/details/50951880,未经过原作者mchdba允许,谢绝转载。
4,方案三:闪回区有归档,影响了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
......
......显示全文...
    点击查看全文


上一篇文章      下一篇文章      查看所有文章
2016-03-23 23:59:42  
数据库 最新文章
Python&MySQL&PyQt
最新用python来操作mysql完全解析
mongodb的安装详解
1.PDO简介
《MySQL必知必会学习笔记》:高级联结
【翻译自mos文章】怎么对Microsoft(Office)
MyCAT全局表描述及示例
ocp
关于SQL数据表存储过程表名前缀换成dbo代码
数据库调优教程(二)慢查询数据准备
360图书馆 软件开发资料 文字转语音 购物精选 软件下载 新闻资讯 小游戏 Chinese Culture 股票 三丰软件 开发 中国文化 网文精选 阅读网 看图 日历 万年历 2018年11日历
2018-11-16 20:18:43
多播视频美女直播
↓电视,电影,美女直播,迅雷资源↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  软件世界网 --