RMAN Restore terminated abnormally. Error: Cannot allocate memory
Cannot allocate memory is reported during RMAN restore.
Symptom:
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
The Linux-x86_64 Error: 12: Cannot allocate memory is reported several times in a row
The RMAN Restore script is extremely simple:
Restore command: nohup rman target/recovery file =/home/Oracle/rman log =/home/oracle/rman. log &
[Oracle @ rac1 ~] $ Cat/home/oracle/rman
Restore database;
[Oracle @ rac1 ~] $
Analysis:
1. The configuration of the original RMAN database differs greatly from that of the recovered target database:
Source:
[Oracle @ JOADBTEST01 ~] $ Free-g
Total used free shared buffers cached
Mem: 15 15 0 0 6
-/+ Buffers/cache: 9 6
Swap: 17 1 15
Target:
[Root @ rac1 ~] # Free-g
Total used free shared buffers cached
Mem: 3 3 0 0 2
-/+ Buffers/cache: 0 3
Swap: 5 1 4
2. The customer backup script is very simple:
Cat backup. cmd
Backup database;
There is no limit on the backup piece size. The database with more than 200 GB is backed up as only one backup result file:
All backup data files are backed up to a large file. The file size is more than 90 GB.
The diagnosis is that the ultra-large backup result file and the ultra-low configuration of the target host cause memory bottlenecks, and RMAN cannot continue working and exits unexpectedly.
Solution:
1. Back up again. The size of backup piece is limited to 2 GB.
2. The target host is a virtual machine and the configuration is increased.
Recommended reading:
RMAN: Configure an archive log deletion policy
Basic Oracle tutorial-copying a database through RMAN
Reference for RMAN backup policy formulation
RMAN backup learning notes
Oracle Database Backup encryption RMAN Encryption