Steps and precautions for 11GR2 Dataguard to hit the PSU patch

Source: Internet
Author: User
Tags sqlplus

Reference Document 278641.1

0. Backup
SPFile of the Master and Standby library
Backing up data from the main library

1. Pause the log transfer to the standby library on the main library
Alter system set Log_archive_dest_state_x=defer scope=both sid= ' * '

2. Turn off the standby and the standby to monitor the PSU; do not need to execute catpatch/catbundle/catcpu these scripts; after patching, boot the repository to mount State and start the standby monitor
(1) Shut down the database and monitor
Shutdown immediate;
Lsnrctl stop

The Environment Shutdown command for the cluster is as follows:
Srvctl Stop database-d dbname
Srvctl Stop Listener-n nodehost1-l lsnr_name
Srvctl Stop Listener-n nodehost2-l lsnr_name

(2) hit the PSU patch
Opatch apply (note to see the Opatch version requirements required on the PSU documentation, if not, you need to download the latest version of 6880880 Opatch)
Note that if you do not exit Sqlplus completely, you will get an error when you apply:
Prerequisite Check "Checkactivefilesandexecutables" failed.
The details are:
Following executables is active:
/u01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1

The workaround is to:
fuser/u01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1
Re-kill-9 the first value displayed

(3) Start the database to Mount state, start monitoring
Startup Mount
Lsncrctl start


3. Turn off the main library and the main library to listen, hit the PSU, execute catpatch/catbundle/catcpu these scripts;
(1) Shutting down the database and listening
Shutdown immediate
Lsnrctl stop

The Environment Shutdown command for the cluster is as follows:
Srvctl Stop database-d dbname
Srvctl Stop Listener-n nodehost1-l lsnr_name
Srvctl Stop Listener-n nodehost2-l lsnr_name

(2) Opatch apply

(3) Execute script
CD $ORACLE _home/rdbms/admin
Sqlplus/as SYSDBA
Startup restrict
@catbundle. SQL PSU Apply
@utlrp. sql

Note One thing:
If it is normal, do not:
Sql> @catupgrade

If it is a security patch, execute:
Sql> @catcpu

4. Start the main library monitoring to initiate the transfer of logs to the standby repository
Lsnrctl start
The cluster starts with the following command for each node
Srvctl Start database-d dbname
Srvctl Start service-d dbname
Srvctl Start Listener-n nodehost1-l lsnr_name

Open the main library so that other processes can also access
Alter system disable restricted session;

Alter system set log_archive_dest_state_x=enable scope=both sid= ' * '

This time you can see something like this on the alert log in the repository:
RFS[1]: Archived Log: '/0u1/archivelogdir/pmis_std/archivelog/2015_11_06/o1_mf_1_990_6ampq53c1_.arc '
RFS[1]: Archived Log: '/0u1/archivelogdir/pmis_std/archivelog/2015_11_06/o1_mf_1_991_6ampn54l3_.arc '
RFS[1]: Archived Log: '/0u1/archivelogdir/pmis_std/archivelog/2015_11_06/o1_mf_1_992_6apmp561o_.arc '
RFS[1]: Archived Log: '/0u1/archivelogdir/pmis_std/archivelog/2015_11_06/o1_mf_1_993_6ampp572b_.arc '
Thu Nov 6 11:55:20 2016
RFS[1]: Archived Log: '/0u1/archivelogdir/pmis_std/archivelog/2015_11_06/o1_mf_1_994_6ampz58i1_.arc '
RFS[1]: Archived Log: '/0u1/archivelogdir/pmis_std/archivelog/2015_11_06/o1_mf_1_995_6ampa59z8_.arc '
RFS[1]: Archived Log: '/0u1/archivelogdir/pmis_std/archivelog/2015_11_06/o1_mf_1_996_6apma68p0_.arc '
RFS[1]: Archived Log: '/0u1/archivelogdir/pmis_std/archivelog/2015_11_06/o1_mf_1_997_6amps572b_.arc '
Thu Nov 6 11:59:26 2016
RFS[1]: Archived Log: '/0u1/archivelogdir/pmis_std/archivelog/2015_11_06/o1_mf_1_998_6amps60c1_.arc '
RFS[1]: Archived Log: '/0u1/archivelogdir/pmis_std/archivelog/2015_11_06/o1_mf_1_999_6ampz61l3_.arc '
RFS[1]: Archived Log: '/0u1/archivelogdir/pmis_std/archivelog/2015_11_06/o1_mf_1_1000_6apmp621o_.arc '
RFS[1]: Archived Log: '/0u1/archivelogdir/pmis_std/archivelog/2015_11_06/o1_mf_1_1001_6amp652b_.arc '
Media Recovery waiting for thread 1 sequence 1002


5. Open the apply/managed recovery of the standby library
Until you see media Recovery waiting for thread 1 sequence 1002 This information indicates that the log has been restored to completion, this time you can switch to active Dataguard mode


ALTER DATABASE recover managed standby database cancel;

If the above command is not executed, the direct ALTER DATABASE open will have an error as follows:

Ora-10456:cannot open Standby database; Media recovery session May is in progress

So the correct steps are:

ALTER DATABASE recover managed standby database cancel;
ALTER DATABASE open;
ALTER DATABASE recover managed standby database using current logfile disconnect;

Re-query Status:
Sql> select Name,open_mode from V$database;
NAME Open_mode
--------- --------------------
NOIDA Mounted

6. Check the patches and check them in the Master repository.
Opatch lsinventory

Steps and precautions for 11GR2 Dataguard to hit the PSU patch

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.