[Oracle] detailed Data Guard CPU/PSU patch installation tutorial

Source: Internet
Author: User

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
Copy codeThe 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
Copy codeThe 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
Copy codeThe Code is as follows:
Sys @ EPAY> alter system register;
System altered.

4.3 restart log Transmission
Copy codeThe 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:
Copy codeThe 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
Copy codeThe 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:
Copy codeThe Code is as follows:
Sys @ EPAY> select max (sequence #) from v $ archived_log;
MAX (SEQUENCE #)
--------------
159

Query uploaded archive logs on the standby side:
Copy codeThe 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)
Copy codeThe Code is as follows:
Alter database recover managed standby database disconnect from session
Attempt to start background Managed Standby Recovery process (epay)
Wed Jul 10 06:03:48 2013
MRP0 started with pid = 29, OS id = 15030
MRP0: Background Managed Standby Recovery process started (epay)
Started logmerger process
Wed Jul 10 06:03:53 2013
Managed Standby Recovery not using Real Time Apply
Wed Jul 10 06:04:01 2013
Parallel Media Recovery started with 32 slaves
Waiting for all non-current ORLs to be archived...
All non-current ORLs have been archived.
Wed Jul 10 06:04:01 2013
Completed: alter database recover managed standby database disconnect from session
Media Recovery Log/data/oradata/epay/archivelog/415157_814716635.dbf
Media Recovery Log/data/oradata/epay/archivelog/415158_814716635.dbf
Media Recovery Log/data/oradata/epay/archivelog/415159_814716635.dbf
Media Recovery Waiting for thread 1 sequence 160 (in transit)

6. Check whether the patch is successfully installed.
6.1 In primary, standby points to opatch lsinventory
6.2 check whether the patch is successfully installed in the database

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.