search
HomeDatabaseMysql TutorialRMAN DUMMY启动报ORA-04031问题解决一例

昨天朋友问我一个这样的问题,他现在想做一次RAC到单实例恢复数据库的操作,参考我曾经写过的文档: 《Oracle 11g R2 RAC数据库备份通过RMAN恢复到单实例数据库实现》。但他告诉我说现在单机上只安装了 Oracle软件,却没有创建任何实例。现在无法启动到nomou

昨天朋友问我一个这样的问题,他现在想做一次RAC到单实例恢复数据库的操作,参考我曾经写过的文档:

《Oracle 11g R2 RAC数据库备份通过RMAN恢复到单实例数据库实现》。但他告诉我说现在单机上只安装了

Oracle软件,却没有创建任何实例。现在无法启动到nomount模式。

我告诉他,通过RMAN就可以,RMAN连接上去之后没有任何对应的参数文件也能够启动到nomount模式,官方

称这种为“dummy”。

那我们简单看下这个特性。

(这是我12c RAC环境)
当前没有任何数据库实例启动
[oracle@12crac1 ~]$ srvctl status database -d luocs12c
Instance luocs12c1 is not running on node 12crac1
Instance luocs12c2 is not running on node 12crac2
ORACLE_SID指定不存在的实例
[oracle@12crac1 ~]$ export ORACLE_SID=luocs
rman连接,并且尝试启动到nomount模式:
[oracle@12crac1 ~]$ rman target /
Recovery Manager: Release 12.1.0.1.0 - Production on Tue Jul 2 15:22:52 2013
Copyright (c) 1982, 2013, 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 '/u01/app/oracle/product/12.1.0/dbhome_1/dbs/initluocs.ora'
starting Oracle instance without parameter file for retrieval of spfile
Oracle instance started
Total System Global Area    1068937216 bytes
Fixed Size                     2296576 bytes
Variable Size                293602560 bytes
Database Buffers             767557632 bytes
Redo Buffers                   5480448 bytes
RMAN> 
-- 可见这里能够正常启动。

然后我们通过sqlplus连接,并查看db_name,能够看到是dummy。

[oracle@12crac1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.1.0 Production on Tue Jul 2 15:23:37 2013
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Advanced Analytics
and Real Application Testing options
idle> show parameter db_name
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_name                              string      DUMMY

这个特性在恢复数据库的时候能够使用,也就是通过dummy启动到NOMOUNT,然后restore spfile等等。

朋友按照我说的去操作,但却遇到了问题,我远程看,启动的时候遇到了ORA-4031。
当时我猜测这和参数配置有关。但因为快下班了而且晚上有约,跟朋友说急的话先手动建个初始化参数文件

并启动到nomount,这个问题明天帮他看看。

今天早上上班之后,在自己的测试机上操作了下,同样遇到了问题,如下:
(11.2.0.1版本数据库)

[oracle@localhost ~]$ export ORACLE_SID=xxx
[oracle@localhost ~]$ rman target / nocatalog
Recovery Manager: Release 11.2.0.1.0 - Production on Tue Jul 2 08:50:58 2013
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 '/u01/app/oracle/product/11.2.0.1/dbhome_1/dbs/initxxx.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/02/2013 08:51:29
RMAN-04014: startup failed: ORA-04031: unable to allocate 524304 bytes of shared memory ("shared pool","unknown object","sga heap(1,0)","row cache")

这在10201版本数据库上同样报错:

[oracle@localhost ~]$ /u01/app/oracle/product/10.2.0.1/dbhome_1/bin/rman target /
Recovery Manager: Release 10.2.0.1.0 - Production on Tue Jul 2 09:03:03 2013
Copyright (c) 1982, 2005, Oracle.  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 '/u01/app/oracle/product/10.2.0.1/dbhome_1/dbs/initxxx.ora'
starting Oracle instance without parameter file for retrival of spfile
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of startup command at 07/02/2013 09:03:11
RMAN-04014: startup failed: ORA-12853: insufficient memory for PX buffers: current 0K, max needed 1008K
ORA-04031: unable to allocate 21492 bytes of shared memory ("large pool","unknown object","large pool","PX msg pool")

我就查了一下,从MOS上找到了ORA-4031 During Startup Nomount using RMAN without parameter file

(PFILE) [ID 1176443.1]
原文如下:

Applies to: 
Oracle Database - Enterprise Edition - Version 11.2.0.1 and later
Information in this document applies to any platform.
***Checked for relevance on 08-May-2013*** 
Symptoms
RMAN startup nomount failed with ORA-4031 
Customer was testing RMAN backup/restore in Exadata. 
Customer firstly backup the database to tape and then remove all the datafiles, spfile, controlfiles for testing. 
Then during the recover, customer connected RMAN with nocatalog and try to "startup nomount", then ORA-4031 occured.
==================== 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")
Cause
RMAN has failed to start a dummy instance without pfile.
Default values used for the dummy instance are not enough to start the instance up.
This is reported in Bug 9680987 - RMAN CANNOT START DATABASE WITHOUT PARAMETER FILE
Solution
There are two possible solutions:
1- Create temporary init.ora file (/oracle/product/11.2.0/db_1/dbs/initTEST.ora) with the following parameters:
??? db_name=
??? large_pool_size=100m
??? shared_pool_size=250m
??? db_cache_size=10m
2- Set environment variable? ORA_RMAN_SGA_TARGET before executing rman. For example:
??? $ export ORA_RMAN_SGA_TARGET=350

这原来和BUG相关,但它说影响11201以上版本,这应该有问题,我看Bug 9680987也是11107版本:

PROBLEM:
--------
Starting an instance via RMAN and referencing to a none-existent SPFILE fails 
with ORA-4031
rman target ********/********;
Recovery Manager: Release 11.1.0.7.0 - Production on Fri Feb 5 10:29:59 2010
Copyright (c) 1982, 2007, Oracle.? All rights reserved.
connected to target database (not started)
RMAN> set DBID=575862064;
executing command: SET DBID
RMAN> startup force nomount;
startup failed: ORA-1078: failure in processing system parameters
ORA-1565: error in identifying file 
'/u02/oradata/INFR/RSTD/RSTD/spfileRSTD.ora'
ORA-27037: unable to obtain file status
SVR4 Error: 2: No such file or directory
Additional information: 3
starting Oracle instance without parameter file for retrieval of spfile
RMAN-571: ===========================================================
RMAN-569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-571: ===========================================================
RMAN-3002: failure of startup command at 02/05/2010 10:06:16
RMAN-4014: startup failed: ORA-4031: unable to allocate 84672 bytes of 
shared memory ("shared pool","unknown object","sga heap(1,0)","ksuloi: long 
op statistics array")

先不管了,MOS的文章里提供了解决方法,第一就是创建初始化文件、第二就是配置ORA_RMAN_SGA_TARGET环

境变量。

经过测试,问题得以解决:

[oracle@localhost ~]$ export ORACLE_SID=xxx
[oracle@localhost ~]$ export ORA_RMAN_SGA_TARGET=350
[oracle@localhost ~]$ rman target /
Recovery Manager: Release 11.2.0.1.0 - Production on Tue Jul 2 09:07:50 2013
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 '/u01/app/oracle/product/11.2.0.1/dbhome_1/dbs/initxxx.ora'
starting Oracle instance without parameter file for retrieval of spfile
Oracle instance started
Total System Global Area     368263168 bytes
Fixed Size                     1336596 bytes
Variable Size                117443308 bytes
Database Buffers             239075328 bytes
Redo Buffers                  10407936 bytes

OK,到这里。

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
如何解决应用程序启动错误0xc000012d问题如何解决应用程序启动错误0xc000012d问题Jan 02, 2024 pm 12:53 PM

当小伙伴的电脑缺失一定的文件之后就会出现应用程序无法正常启动0xc000012d的情况,其实只要重新下载文件并安装就可以很好的解决了哟。应用程序无法正常启动0xc000012d:1、首先用户需要下载“.netframework”。2、然后找到下载地址并将其下载到自己的计算机上。3、然后在桌面双击开始运行。4、安装完成之后返回之前错误的程序位置,再次打开程序即可。

Ubuntu启动黑屏问题的有效解决方案与技巧Ubuntu启动黑屏问题的有效解决方案与技巧Dec 29, 2023 am 10:30 AM

解决Ubuntu启动黑屏的实用技巧与方法引言:Ubuntu是一款广受欢迎的Linux操作系统,但有时候在启动过程中可能会遇到黑屏问题。这种问题可能由于多种原因引起,如显卡驱动问题、软件冲突或系统错误等。本文将介绍一些实用的技巧和方法,帮助解决Ubuntu启动黑屏问题,以保证系统的稳定运行。一、更新并重新安装显卡驱动进入恢复模式:在启动时按下Shift键,进入

0xc0000218 BSoD错误:如何在Windows 10和11上修复它0xc0000218 BSoD错误:如何在Windows 10和11上修复它Jul 11, 2023 pm 10:50 PM

一些Windows10和11用户最近抱怨0xc0000218BSoD错误,这阻碍了他们的系统正常启动。错误代码0xc0000218明确表示注册表文件故障,这通常是由于系统设置配置错误而出现的。如果您看到这篇文章或遇到类似问题,请检查一些潜在的修复程序以无缝解决问题。什么原因导致0xc0000218BSoD错误?0xc0000218BSoD错误背后可能有几个原因。以下是一些潜在因素:注册表编辑不正确–如果使用注册表编辑工具或手动修改值进行不正确的更改,则可能导致注册表损坏。此类错误配置可能会在系统

解决电脑提示"reboot and select proper boot device"的方法解决电脑提示"reboot and select proper boot device"的方法Jan 15, 2024 pm 02:00 PM

重装系统也未必是个万全之策,可是重装后发现电脑开机会显示黑底白字,然后给出提示:rebootandselectproperbootdevice,这是怎么回事?出现这样的提示一般是引导出错所致。为了帮助到了大家,为此,小编就给大家带来了解决的方法了。电脑使用是越来越普及了而遇到电脑的故障也越来越来多,这不,最近有用户在电脑开机时遇到显示黑屏,并提示RebootandSelectproperBootdevice,无法正常启动电脑系统。这是怎么回事呢?又该怎么去解决呢?让用户一头雾水,下面,小编就来跟

重新启动苹果手机的步骤重新启动苹果手机的步骤Aug 29, 2023 am 10:53 AM

虽然这似乎是一项基本任务,但相当多的人经常发现自己想知道如何重新启动他们的iPhone。本文将为您提供全面的指南,提供了解有效重启iPhone过程所需的一切。可能有无数原因促使您想要重新启动iPhone。通常,您可能会在设备上处理意外问题,在这种情况下,简单的重新启动可能是解决问题的灵丹妙药。技术故障、性能低下和应用程序无响应,这些只是重新启动可以纠正的问题的几个示例。当面临有关iPhone的挑战时,我采用的初始故障排除步骤之一是执行设备的快速重启。这个看似简单的动作可以解决各种小问题,快速轻松

如何重新启动您的 iPhone(所有型号)如何重新启动您的 iPhone(所有型号)Jul 18, 2023 pm 04:57 PM

如何使用面容ID重新启动iPhone请按照以下步骤了解如何重启具有面容ID的iPhone。此方法适用于重新启动iPhone14,iPhone13,iPhone12,iPhone11,iPhoneXS和iPhoneX。1.按住电源按钮和任一音量按钮,直到出现“滑动关闭电源”选项。2.向右拖动滑块,您的iPhone将关闭。3.现在,等待30秒,然后按住电源按钮,直到屏幕上出现Apple徽标。如何使用TouchID重新启动iPhone在iPhoneX发布之前,重新启动iPhone比当前型号更容易,因为

为何无法拍摄 ProRes? 什么是“释放资源”?为何无法拍摄 ProRes? 什么是“释放资源”?Sep 14, 2023 pm 01:29 PM

相信有使用iPhonePro系列的用户,都知道新机有ProRes功能,是一个为后期制作视频而设的格式,但由于该格式占用空间非常巨大,因此只有256GB设备或以上的容量,才能完全使用,但使用时出现的「释放资源」到底是什么呢?现在就为各位讲解。容量不足时自动启动「释放资源」是iPhoneiOS系统内的一个自动功能,可以帮助你在设备容量不足时,自动删除一些没有用的数据,或将相册内的档案保留优化档案,腾出空间应付ProRes的巨大需求,一般只会在装置容量不足应付5分钟摄影才会启动。不过笔者在使用时,空间

在 Windows 10/11 上如何离开 S 模式在 Windows 10/11 上如何离开 S 模式Aug 03, 2023 pm 08:17 PM

S模式下的窗口旨在通过仅允许从Microsoft应用商店安装应用来提供增强的安全性和性能。虽然此功能有助于防止恶意软件和确保安全的计算环境,但它可能会限制想要从MicrosoftStore以外的源安装应用程序的用户。如果您发现自己处于这种情况并不断问自己如何在Windows10/11中切换出S模式,那么您来对地方了,因为我们将引导您完成如何使用两种不同的方法在Windows10/11中切换出S模式的步骤,确保您可以享受从您选择的任何地方安装应用程序的自由。了解如何在Windows中切换出S模式将

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Tools

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.