[Oracle] DataGuardCPU/PSU patch installation tutorial

Source: Internet
Author: User
The following describes how to install the DataGuardCPUPSU patch. For more information, see [Oracle] CPUPSU patch installation tutorial. the Primary uard requires both Primary and Standby to be patched, so the steps are more complex. The main steps are as follows: 1. in P

The following is a detailed analysis of the Data Guard CPU/PSU patch installation method, you can refer to [Oracle] CPU/PSU patch installation tutorial for non-Data Guard patch installation tutorials. Data Guard requires both Primary and Standby patches, the steps are more complex. The main steps are as follows: 1. in P

The following is a detailed analysis of the Data Guard CPU/PSU patch installation method. For more information, see

For non-Data Guard patch installation tutorials, refer to [Oracle] CPU/PSU patch installation detailed tutorial. Data Guard requires both Primary and Standby patches, so the steps are more complex, the main steps are as follows:
1. Stop the log transmission service in Primary;
2. Shut down the Standby database, patch the Standby software (Note: Do not patch the Standby database), start the standby status as mount, and do not enable managed recovery;
3. Disable Primary and install patches on the software and database of Primary;
4. Start the Primary database and restart the log transmission service;
5. Start Redo Apply on Standby, so that the patch script on Primary will be automatically synchronized to Standby;
6. Check whether patches are installed for Primary and Standby.
The following is an example:
1. Stop log transmission in Primary

The Code is as follows:


Sys @ EPAY> select database_role from v $ database;
DATABASE_ROLE
----------------
PRIMARY
Sys @ EPAY> show parameter log_archive_dest_3
NAME TYPE VALUE
-----------------------------------------------------------------------------
Log_archive_dest_3 string SERVICE = sta ASYNC VALID_FOR = (O
NLINE_LOGFILES, PRIMARY_ROLE) D
B _UNIQUE_NAME = epaybk
Log_archive_dest_30 string
Log_archive_dest_31 string
Sys @ EPAY> alter system set log_archive_dest_state_3 = defer scope = both;
System altered.


2. Install patches on Standby's Oracle software
2.1 shut down database instances, listener, and ASM instances
2.2 check the opatch version. If not, download the latest version.
2.3 Install patches on Standby's Oracle software
2.4 start Standby to mount and start listener
(Note: Standby does not need to patch the database itself)

3. patch on Primary
3.1 shut down database instances, listener, and ASM instances
3.2 check the opatch version. If not, download the latest version.
3.3 Install patches on the Oracle software of Primary
3.4 patch the Primary database itself

The Code is as follows:


Cd $ ORACLE_HOME/rdbms/admin
Sqlplus/nolog
SQL> CONNECT/AS SYSDBA
SQL> STARTUP
SQL> @ catbundle. SQL psu apply
SQL> QUIT


4. Start the log transmission service in Primary
4.1 start Primary listener and database instances
4.2 forcibly register services to listener

The Code is as follows:


Sys @ EPAY> alter system register;
System altered.


4.3 restart log Transmission

The Code is as follows:


Sys @ EPAY> alter system set log_archive_dest_state_3 = enable scope = both;
System altered.


Note: When log transmission is started, the following error may occur in alert:

The Code is as follows:


------------------------------------------------------------
Check that the primary and standby are using a password file
And remote_login_passwordfile is set to SHARED or EXCLUSIVE,
And that the SYS password is same in the password files.
Returning error ORA-16191
------------------------------------------------------------


According to the error message, the system password is changed when the master database patches the CPU, and the password file of the slave database is replaced with the password file of the master database to solve the problem.
5. Standby starts Redo Apply
5.1 open Standby Database
5.2 enable Redo Apply

The Code is as follows:


Sys @ EPAY> alter database recover managed standby database disconnect from session;
Database altered.


5.3 verify that Primary and Standby are synchronized
Query the maximum number of archived logs on the primary side:

The Code is as follows:


Sys @ EPAY> select max (sequence #) from v $ archived_log;
MAX (SEQUENCE #)
--------------
159


Query uploaded archive logs on the standby side:

The Code is as follows:


Sys @ EPAY> select sequence #, applied from v $ archived_log;


5.4 The Three log files are synchronized from alert. log (that is, the patch created in primary is synchronized to standby)

The Code is as follows:

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.