天天看点

RMAN Restore异常终止,报错:Cannot allocate memory

RMAN restore过程中报Cannot allocate memory

现象:

channel ORA_DISK_1: restoring datafile 00030 to +TESTDG/rac/datafile/users.292.817416403

channel ORA_DISK_1: reading from backup piece /UNID/full_eaope61n.bak

channel ORA_DISK_1: ORA-19870: error while restoring backup piece /UNID/full_eaope61n.bak

ORA-19501: read error on file "/UNID/full_eaope61n.bak", block number 6610944 (block size=8192)

ORA-27072: File I/O error

Linux-x86_64 Error: 12: Cannot allocate memory

Additional information: 4

Additional information: 6610944

Additional information: -1

failover to previous backup

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of restore command at 11/21/2013 17:21:50

RMAN-06026: some targets not found - aborting restore

RMAN-06023: no backup or copy of datafile 4 found to restore

连续几次都报Linux-x86_64 Error: 12: Cannot allocate memory

RMAN Restore脚本极其简单:

restore command: nohup rman target / cmdfile=/home/oracle/rman log=/home/oracle/rman.log &

[[email protected] ~]$ cat /home/oracle/rman

restore database;

[[email protected] ~]$

分析:

1、RMAN原库与恢复目的库配置相差较大:

source:

[[email protected] ~]$ free -g

 total used free shared buffers cached

Mem: 15 15 0 0 0 6

-/+ buffers/cache: 9 6

Swap: 17 1 15

target:

[[email protected] ~]# free -g

 total used free shared buffers cached

Mem: 3 3 0 0 0 2

-/+ buffers/cache: 0 3

Swap: 5 1 4

2、客户备份脚本非常简单:

cat backup.cmd

backup database;

没有限制backup piece大小,200多G的库最后只备份成了1个备份结果文件:

所有的备数据文件都备份到了一个大文件中,该文件大小为90多G。

诊断为:超大的备份结果文件和目的主机超低的配置导致了内存出现瓶颈,导致了RMAN无法继续工作,异常退出。

解决方法:

1.重新进行备份,限制backup piece大小为2G。

2.目的主机为虚拟机,调高配置。

继续阅读