Monday, 8 January 2018

Step-by-Step Applying PSU Patch in Oracle 12c For Single-Instance in Window Enviroment


Apply Patch 24591642 on 12c single instance database 12.1.0.2



Patch apply

  

Step 1. shutdown and apply latest patch

Go to unziped directory cd 24591642

3.1.1 Environment Checks

1.     Make sure %ORACLE_HOME%\perl\bin appears in your PATH setting. if not please follow the below step
    set PATH=%ORACLE_HOME%\perl\bin;%PATH%

 

Shut down all instances and listeners associated with the Oracle home that you are updating

 

 





F:\app\oracle\product\12.1.0.2\OPatch>opatch version

OPatch Version: 12.1.0.1.3

 

OPatch succeeded.

 

Before patching ,make sure all services are closed which is running from oracle home

  

Set the ORACLE_HOME environment variable pointing to your Database Home, go to the directory where the patch is located and then run the OPatch utility by entering the following commands:

 

F:\app\oracle\product\12.1.0.2\OPatch>


cd E:\software_dump\oracle_12c_software\p24591642_121020_MSWIN-x86-64\24591642

 %ORACLE_HOME%\OPatch\opatch version

 

%ORACLE_HOME%\OPatch\opatch lsinventory

%ORACLE_HOME%\OPatch\opatch apply


%ORACLE_HOME%Opatch opatch apply

 

 

 












3.3 Patch Post-Installation Instructions

After installing the patch, perform the following actions:

1.     Load modified SQL files into the database, as explained in Section 3.3.1

2.     Upgrade Oracle Recovery Manager catalog, as explained in Section 3.3.2

  

3.3.1 Loading Modified SQL Files into the Database

The following steps load modified SQL files into the database. For a RAC environment, perform these steps on only one node.

1.     Start the OracleService<SID> and Oracle Listener Services if already not started. Ensure that all database instances running out of the ORACLE_HOME that you just patched are started.

 

startup the database and listener

 

 









 

2.     For each database instance running on the Oracle home being patched, run the datapatch utility as described in Table 2.

cd %ORACLE_HOME%/Opatch

datapatch -verbose

 

 













3.3.2 Upgrade Oracle Recovery Manager Catalog

If you are using the Oracle Recovery Manager, the catalog needs to be upgraded. Enter the following command to upgrade it:

         rman catalog username/password@alias

         RMAN> UPGRADE CATALOG;

eg

set ORACLE_SID=DBCENTQL

rman target / catalog rman11204/rma2303821@rman

 

    RMAN> UPGRADE CATALOG;

 

SQL Patching tool complete on Tue Apr 11 15:06:34 2017

F:\app\oracle\product\12.1.0.2\OPatch>rman target / catalog rman11204/rma2303821

@rman

 

Recovery Manager: Release 12.1.0.2.0 - Production on Tue Apr 11 15:11:12 2017

Copyright (c) 1982, 2016, Oracle and/or its affiliates. All rights reserved.

connected to target database: DBCENTQL (DBID=4030070186)

connected to recovery catalog database


RMAN> UPGRADE CATALOG;

 

recovery catalog owner is RMAN11204

enter UPGRADE CATALOG command again to confirm catalog upgrade

 

RMAN> UPGRADE CATALOG;

 

recovery catalog upgraded to version 12.01.00.02

DBMS_RCVMAN package upgraded to version 12.01.00.02

DBMS_RCVCAT package upgraded to version 12.01.00.02.

 

RMAN>


Enable database in archive mode


startup mount

alter database archivelog;
alter database open;

 

Connected to:

Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

 

SQL> select name,open_mode from v$database;

 

NAME OPEN_MODE

--------- --------------------

DBCENTQ8 READ WRITE

 

SQL> archive log list

Database log mode Archive Mode

Automatic archival Enabled

Archive destination D:\app\oracle\oradata\DBCENTQ8\ARCH

Oldest online log sequence 16743

Next log sequence to archive 16745

Current log sequence 16745

 

For more details refer to MOS Note 1609718.1.

 

 

 

Open the task scheduler and enable the backup

 

 

 

 

 

3 comments:

  1. Will this patch work in container database PDB CDB?

    ReplyDelete
  2. I simply wanted to write down a quick word to say thanks to you for those wonderful tips and hints you are showing on this site. As a result of checking through the net and meeting techniques that were not productive, Same as your blog I found another one Oracle Fusion HCM .Actually I was looking for the same information on internet for Oracle HCM Cloud and came across your blog. I am impressed by the information that you have on this blog. Thanks once more for all the details.

    ReplyDelete