Solutions to RMAN connection to secondary database ORA-04031

Source: Internet
Author: User

Solutions to RMAN connection to secondary database ORA-04031

An error occurred while connecting to the secondary instance when Oracle 10 Gb built dg to use rman to copy the database. The error message is as follows:
[Oracle @ oracle11g admin] $ rman target sys/zzh_2046 @ test auxiliary sys/system @ aux_test catrman rman/rman @ jy

Recovery Manager: Release 10.2.0.5.0-Production on Tue Mar 17 10:50:22 2015

Copyright (c) 1982,200 7, Oracle. All rights reserved.

Connected to target database: TEST (DBID = 2168949517)
Connected to recovery catalog database
RMAN-00571: ========================================================== ==============================
RMAN-00569: ==================== error message stack follows ==========================
RMAN-00571: ========================================================== ==============================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04006: error from auxiliary database: ORA-00600: internal error code, arguments: [15435], [SYS], [X $ STANDARD], [], [], [], [], []
ORA-04031: unable to allocate 1040 bytes of shared memory ("shared pool", "X $ STANDARD", "PL/SQL DIANA", "PAR. C: parapt: Page ")
RMAN-04015: error setting target database character set to ZHS16GBK


From the error message above, we can see that the ORA-04031 is not able to allocate 1040 bytes of memory to the shared memory. If you use rman to connect to the secondary instance directly, the error message is as follows:
[Oracle @ jingyong1 ~] $ Rman target sys/system @ aux_test

Recovery Manager: Release 10.2.0.5.0-Production on Tue Mar 17 10:51:28 2015

Copyright (c) 1982,200 7, Oracle. All rights reserved.

RMAN-00571: ========================================================== ==============================
RMAN-00569: ==================== error message stack follows ==========================
RMAN-00571: ========================================================== ==============================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04005: error from target database:
ORA-00600: internal error code, arguments: [15435], [SYS], [X $ STANDARD], [], [], [], [], [], [], []
ORA-04031: unable to allocate 1040 bytes of shared memory ("shared pool", "X $ STANDARD", "PL/SQL DIANA", "PAR. C: parapt: Page ")
RMAN-04015: error setting target database character set to ZHS16GBK


The ORA-4031 During Startup Nomount using RMAN without parameter file [ID 1176443.1] was found on MOS as follows:
Applies:
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,200 9, Oracle and/or its affiliates. All rights reserved.
Connected to target database (not started)

RMAN> startup nomount

Startup failure: ORA-01078: failure in processing system parameters
LRM-00109: cocould 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 ()", "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 = 100 m
Shared_pool_size = 250 m
Db_cache_size = 10 m

2-Set environment variable ORA_RMAN_SGA_TARGET before executing rman. For example:

$ Export ORA_RMAN_SGA_TARGET = 350

 

This article provides two solutions: adding memory parameters and setting environment variables. The applicable version is 11.2.0.1 and later. Here is oracle 10.2.0.5, because the second method is simple, try to use the method of setting environment variables:
[Oracle @ jingyong1 ~] $ Export ORA_RMAN_SGA_TARGET = 350
[Oracle @ jingyong1 ~] $ Rman target sys/system @ aux_test

Recovery Manager: Release 10.2.0.5.0-Production on Tue Mar 17 10:51:46 2015

Copyright (c) 1982,200 7, Oracle. All rights reserved.

RMAN-00571: ========================================================== ==============================
RMAN-00569: ==================== error message stack follows ==========================
RMAN-00571: ========================================================== ==============================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-06003: ORACLE error from target database:
ORA-00604: error occurred at recursive SQL level 2
ORA-04031: unable to allocate 16 bytes of shared memory ("shared pool", "select ks. inst_id, ksuxsins, k... "," SQL area "," ub1 []: qkexrXformVal ")


My version here is 10.2.0.5, and the second method does not work. You can only use the first method to add memory parameters.
[Oracle @ jingyong1 dbs] $ vi inittest. ora

Db_name = test
Db_unique_name = _ test
Control_files =/u01/app/oracle/auxiliary/control01.ctl
Db_file_name_convert = ('/u01/app/oracle/oradata/test/', '/u01/app/oracle/auxiliary ')
Log_file_name_convert = ('/u01/app/oracle/oradata/test/', '/u01/app/oracle/auxiliary ')
Remote_login_passwordfile = exclusive
Compatible = 10.2.0.5.0
DB _ block_size = 8192
Sga_target = 160 M
Sga_max_size = 160 M
Pga_aggregate_target = 16 M

SQL> shutdown immediate
ORA-01507: database not mounted


ORACLE instance shut down.
SQL> startup nomount
ORACLE instance started.

Total System Global Area 167772160 bytes
Fixed Size 1272624 bytes
Variable Size 58721488 bytes
Database Buffers 104857600 bytes
Redo Buffers 2920448 bytes

[Oracle @ jingyong1 dbs] $ export ORACLE_SID = test
[Oracle @ jingyong1 dbs] $ rman target/

Recovery Manager: Release 10.2.0.5.0-Production on Tue Mar 17 11:00:47 2015

Copyright (c) 1982,200 7, Oracle. All rights reserved.

Connected to target database: test (not mounted)

[Oracle @ oracle11g admin] $ rman target sys/zzh_2046 @ test auxiliary sys/system @ aux_test catrman rman/rman @ jy

Recovery Manager: Release 10.2.0.5.0-Production on Tue Mar 17 11:01:00 2015

Copyright (c) 1982,200 7, Oracle. All rights reserved.

Connected to target database: TEST (DBID = 2168949517)
Connected to recovery catalog database
Connected to auxiliary database: TEST (not mounted)

The fault is solved by adding memory parameters to the parameter file.

-------------------------------------- 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

-------------------------------------- Split line --------------------------------------

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.