Two solutions to problems during Oracle 11g Data Guard Construction

Source: Internet
Author: User

The Oracle installation and configuration process is closely related to the operating system, storage, and network. Especially in Linux and AIX environments, the configuration process is relatively complex. A link error may cause a series of faults in the future.
 
In addition, the steps and methods for executing the same installation project vary greatly with the Oracle version. For example, Data Guard has three installation methods that have evolved to 11 GB. The configuration of each method varies. Many of our friends often don't care about version differences during the installation process. They simply search for some articles on the Internet and try to use them. Network Resources indeed enrich our ideas and breadth for solving the problem. However, some comments and practices on the Internet may also cause us trouble.
 
This article records the two solutions to small problems that I encountered during the installation of Data Guard, and records them to stay in need of friends.

References:

Important configuration parameters of Oracle Data Guard

Configure Oracle 11g Data Guard based on the same host

Explore Oracle 11g elastic uard

Oracle Data Guard (RAC + DG) archive deletion policies and scripts

Role conversion for Oracle Data Guard

FAL gap in Oracle Data Guard logs

Oracle 11g Data Guard Error 16143 Heartbeat failed to connect to standby
 

1. Environment background
 
 

Use Oracle 11.2.0.4 for an experiment. The project is to build Active Data Guard. Due to the limited environmental conditions, the author implements Primary and Standby on a physical machine.
 
 

SQL> select * from v $ version;
 
BANNER
 
--------------------------------------------
 
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0-Production
 
PL/SQL Release 11.2.0.4.0-Production
 
CORE 11.2.0.4.0 Production
 
TNS for Linux: Version 11.2.0.4.0-Production
 
NLSRTL Version 11.2.0.4.0-Production
 
 

2. A fault occurs when/dev/shm is too small.
 
 

The other configuration procedures are the same as the method recommended for installing Active tracing uard. After parameter configuration, password file creation, Oracle Net file configuration, and Standby parameter file creation, run RMAN to perform the duplicate process. The script is as follows:
 
 

Run {
 
Duplicat target database for standby from active database
 
Spfile

Parameter_value_convert 'ora11g', 'ora11gsy'
 
Set db_unique_name = 'ora11gsy'
 
Set log_archive_max_processes = '5'
 
Set fal_client = 'ora11gsy'
 
Set fal_server = 'ora11g'
 
Set standby_file_management = 'auto'
 
Set log_archive_config = 'dg _ config = (ora11g, ora11gsy )'
 
Set log_archive_dest_2 = 'service = ora11g async valid_for = (ONLINE_LOGFILE, PRIMARY_ROLE) db_unique_name = ora11g ';
 
}
 
 

At this time, both the primary and standby instances are in the starting status, run the RMAN connection and execute the script.
 
 

[Oracle @ SimpleLinux dbs] $ rman nocatalog
 
 

Recovery Manager: Release 11.2.0.4.0-Production on Thu Apr 10 11:21:49 2014
 
Copyright (c) 1982,201 1, Oracle and/or its affiliates. All rights reserved.
 
 

RMAN> connect target sys/oracle @ ora11g
 
 

Connected to target database: ORA11G (DBID = 4239941846)
 
Using target database control file instead of recovery catalog
 
 

RMAN> connect auxiliary sys/oracle @ ora11gsy
 
Connected to auxiliary database: ORA11GSY (not mounted)
 
 

Run the script:
 
 

RMAN> @ cr_phy_standby
 
 

RMAN> run {
 
2> duplicate target database for standby from active database
 
3> spfile

4> parameter_value_convert 'ora11g', 'ora11gsy'
 
5> set db_unique_name = 'ora11gsy'
 
(Space reasons, omitted ......)
 
SQL statement: alter system set log_archive_config = ''dg _ config = (ora11g, ora11gsy)'' comment = ''' scope = spfile
 
 

SQL statement: alter system set log_archive_dest_2 = ''service = ora11g async valid_for = (ONLINE_LOGFILE, PRIMARY_ROLE) db_unique_name = ora11g '''comment = ''' scope = spfile
 
 

Oracle instance shut down
 
 

Connected to auxiliary database (not started)
 
RMAN-00571: ========================================================== ==============================
 
RMAN-00569: ==================== error message stack follows ==========================
 
RMAN-00571: ========================================================== ==============================
 
RMAN-03002: failure of Duplicate Db command at 04/10/2014 11:51:19
 
RMAN-05501: aborting duplication of target database
 
RMAN-03015: error occurred in stored script Memory Script
 
RMAN-04014: startup failed: ORA-00845: MEMORY_TARGET not supported on this system
 
 

An error is reported during the duplicate process and execution fails.
 
From the analysis, it should be related to Oracle operation and internal shared memory allocation. In Linux,/dev/shm corresponds to tmpfs, which is the temporary shared memory structure. Current size:
 
 

[Root @ SimpleLinux ~] # Df-lh
 
Filesystem Size Used Avail Use % Mounted on
 
/Dev/sda2 48G 13G 33G 28%/
 
Tmpfs 448 M 160 M 288 M 36%/dev/shm
 
 

The current system includes two instance objects, which consume more than one shared memory. Therefore, you need to adjust and increase the size of this part.
 
 

[Root @ SimpleLinux ~] # Vi/etc/fstab

 

#
 
#/Etc/fstab
 
# Created by anaconda on Wed mar12 08:33:33 2014
 
#
 
# Accessible filesystems, by reference, are maintained under '/dev/disk'
 
# See man pages fstab (5), findfs (8), mount (8) and/or blkid (8) for more info
 
#
 
UUID = 19248f54-250c-46a0-8e5d-ec26a6a08342/ext4 ults 1 1
 
UUID = 5ce24d42-a713-4b6c-8d9b-0d780425e093 swap defaults 0 0
 
Tmpfs/dev/shm tmpfs ults, size = 2G 0 0
 
Devpts/dev/pts devpts gid = 5, mode = 620 0 0
 
Sysfs/sys sysfs defaults 0 0
 
Proc/proc defaults 0 0
 
~
 
 

When the storage space permits, the tmpfs method is to add the size parameter to fstab and directly specify the size.
 
 

[Root @ SimpleLinux ~] # Mount/dev/shm
 
[Root @ SimpleLinux ~] # Df-h
 
Filesystem Size Used Avail Use % Mounted on
 
/Dev/sda2 48G 13G 33G 28%/
 
Tmpfs 2.0G 0 2.0G 0%/dev/shm
 
 

When the script is executed again, an error is still reported, but the error prompt is changed.
 
 

Startup clone nomount;
 
}
 
Executing Memory Script
 
 

SQL statement: alter system set control_files = ''/u01/app/oradata/ORA11G/controlfile/o1_mf_9mn1_pko _. ctl '',''/u01/app/fast_recovery_area/ORA11G/controlfile/o1_mf_9mn1_pw2 _. ctl ''comment = ''set by RMAN ''scope = spfile
 
 

Starting backup at 10-APR-14
 
Using channel ORA_DISK_1
 
Channel ORA_DISK_1: starting datafile copy
 
Copying standby control file
 
RMAN-00571: ========================================================== ==============================
 
RMAN-00569: ==================== error message stack follows ==========================
 
RMAN-00571: ========================================================== =
 
RMAN-03002: failure of Duplicate Db command at 04/10/2014 12:18:19
 
RMAN-05501: aborting duplication of target database
 
RMAN-03015: error occurred in stored script Memory Script
 
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 04/10/2014 12:18:19
 
ORA-17628: Oracle error 19505 returned by remote Oracle server
 
 

RMAN> ** end-of-file **

For more details, please continue to read the highlights on the next page:

  • 1
  • 2
  • Next Page

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.