在没有参数文件(PFILE)的情况下,使用RMAN(恢复管理器) 启动数据库至nomount状态的过程中出现ORA-4031错误
适用于:
Oracle Server - Enterprise Edition - Version: 11.2.0.1 and later [Release: 11.2 and later ]
本文档的信息适用于任何平台
症状
RMAN startup nomount failed with ORA-4031
客户在Exadata数据库机中测试RMAN备份和恢复,客户首先把数据库备份到磁带,删除所有的数据文件,静态参数文件和控制文件,然后在恢复期间,用户采用非日志模式连接RMAN,之后尝试启动数据库至nomount状态,这样就会出现ORA-4031错误。
==================== Log ========================
oracle@hkfop011db01:/home/oracle
$ export ORACLE_SID=TEST
oracle@test011db01:/home/oracle
$ rman target / nocatalog
Recovery Manager: Release 11.2.0.1.0 - Production on Thu Jul 8 20:45:10 2010
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database (not started)
RMAN> startup nomount
startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/oracle/product/11.2.0/db_1/dbs/initTEST.ora'
starting Oracle instance without parameter file for retrieval of spfile
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of startup command at 07/08/2010 20:45:19
RMAN-04014: startup failed: ORA-04031: unable to allocate 111264 bytes of shared memory ("shared pool","unknown object","sga heap(1,0)","KEWS sesstat values")
原因
没有参数文件pfile的情况下,RMAN无法启动一个dummy实例,dummy实例的默认值不足以启动实例。
解决方案
有两种可能的解决方案
1- 创建一个临时的init.ora文件(/oracle/product/11.2.0/db_1/dbs/initTEST.ora),写入如下参数
b_name=
large_pool_size=100m
shared_pool_size=250m
db_cache_size=10m
2- 在执行rman之间设置环境变量ORA_RMAN_SGA_TARGET。例如,$ export ORA_RMAN_SGA_TARGET=350
错误
ORA-4031; ORA-1078; LRM-109; RMAN-3002; RMAN-4014; RMAN-569; RMAN-571