[Oracle] Data Guard CPU/PSU Patch installation Detailed tutorial _oracle

Source: Internet
Author: User
Non-Data guard patch installation tutorials refer to the [Oracle] CPU/PSU patch installation detailed tutorial, where Data Guard requires primary and standby to be patched at the same time, so the steps are more complex and the main steps are as follows:
1. Stop log transfer service in primary;
2. Close the standby database, standby software on the patch (note: Do not need to be patched for the standby database), start standby for Mount state, do not enable managed recovery;
3. Close the primary, in the primary software and the database itself are patched;
4. Start the primary database, restart the Log transport service;
5. In standby start Redo Apply, so that primary on the patch script will automatically sync to standby;
6. Check to see if primary and standby have all installed patches.
Here is a concrete example:
1. Stop log transport service at primary
Copy Code code 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. Patch The Oracle software in standby
2.1 Close Database instance, listener,asm instance, etc.
2.2 View the Opatch version, if not enough, to download the latest version
2.3 Patching on standby Oracle software
2.4 Boot standby to mount state, start listener
(Note: Standby does not need to be patched to the database itself)

3. Patching on the primary
3.1 Close database instance, listener,asm instance, etc.
3.2 View the Opatch version, if not enough, to download the latest version
3.3 Patching on primary Oracle software
3.4 Patching for the primary database itself
Copy Code code as follows:

CD $ORACLE _home/rdbms/admin
Sqlplus/nolog
Sql> Connect/as SYSDBA
Sql> STARTUP
sql> @catbundle. SQL PSU Apply
Sql> QUIT

4. Start Log transport service in primary
4.1 Start primary Listener, database instance, etc.
4.2 Mandatory registration services to listener
Copy Code code as follows:

Sys@epay>alter system Register;
System altered.

4.3 Restart the Log transport service
Copy Code code as follows:

Sys@epay>alter system set log_archive_dest_state_3=enable Scope=both;
System altered.

Note: Starting log transmissions, the following error may appear in alert:
Copy Code code 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's SYS password is same in the password files.
Returning error ORA-16191
------------------------------------------------------------

According to the error message prompts, it should be the main library in the CPU patch when the SYS password modified, with the main library password file replace the library password file can resolve the error.
5. Standby start Redo Apply
5.1 Open Standby Database
5.2 Enable Redo Apply
Copy Code code as follows:

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

5.3 Verify primary and standby are synchronized
Query the current largest archive log sequence number on the primary side:
Copy Code code as follows:

Sys@epay>select Max (sequence#) from V$archived_log;
MAX (sequence#)
--------------
159

In the standby-side query has been sent over the archive log:
Copy Code code as follows:

Sys@epay>select sequence#, applied from V$archived_log;

5.4 From the Alert.log can be seen synchronized 3 log files (that is, the patch in primary synchronized to the standby)
Copy Code code as follows:

ALTER DATABASE recover managed standby database disconnect from session
Attempt to start background Managed Standby Recovery process (Epay)
Wed 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 10 06:03:53 2013
Managed Standby Recovery not using real time Apply
Wed 10 06:04:01 2013
Parallel Media Recovery started with slaves
Waiting for all non-current orls to is archived ...
All non-current orls have been archived.
Wed 10 06:04:01 2013
Completed:alter database recover managed standby database disconnect from session
Media Recovery log/data/oradata/epay/archivelog/1_157_814716635.dbf
Media Recovery log/data/oradata/epay/archivelog/1_158_814716635.dbf
Media Recovery log/data/oradata/epay/archivelog/1_159_814716635.dbf
Media Recovery waiting for thread 1 sequence 160 (in transit)

6. Late check whether the patch was installed successfully
6.1 In primary, standby points respectively to Opatch Lsinventory
6.2 Check the database to see if the patch was installed successfully

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.