How to Install Database Component of a Patch onto ORMB Database

Since de-installation of the patch is not supported, DBA should develop a backup/recovery strategy before applying ORMB patches in case rollback is required.

Be aware of the below warning when applying database component of a patch onto ORMB database.

Warning: De-installation of the patch is not supported. Make sure that you have a backup of the database schema you are installing into. It is recommended that you first install and test patches on a non-production environment.

DBA should develop a backup/recovery strategy before applying ORMB patches in case rollback is required if patching fails. The suggested backup strategy could be either of the below:

The following is a practical example of applying patch 25187694 onot ORMB 2.5.0.3.0 from a different server other than an application server.

1)Create Database Patching Utility

Ask ORMB application server administrator to run “createDBStandlone.sh” to create a jar file called “db_patch_standalone.jar”.

2) Copy and Cecompress Database Patching Utility

D:\dbpatch_tools
 config
         log4j.properties
 bin
         ouafDatabasePatch.sh
         ouafDatabasePatch.cmd
 lib
         commons-cli-1.1.jar
         commons-codec-1.6
         commons-collections-3.2.1
         commons-io-1.3.2
         log4j-1.2.17
         ojdbc7-12.1.0.2
         spl-dbpatch-4.3.0.1.0
         spl-shared-4.3.0.1.0

3) Set Windows Environment Variables

set TNS_ADMIN=D:\oracle
set JAVA_HOME=D:\java
set TOOLSBIN=D:\dbpatch_tools\bin

4)  Apply Database Component of  the Patch

D:\PATCHES\p25187694_25030_PDEV\MultiPlatform\V2.5.0.3.0-25187694_MultiPlatform\database\ORACLE\CDXPatch>ouafDatabasePatch.cmd
"CMDLINE::: d:\java\bin\java.exe -cp d:\dbpatch_tools\lib\*;d:\dbpatch_tools\config com.oracle.ouaf.database.patch.OUAFPatch "

Enter the target database type (O/M/D) [O]: O
Enter the username that owns the schema: cisadm
Enter the password for the cisadm user:
Enter the name of the Oracle Database Connection String: //RACTEST-SCAN.ractest.local:1521/ORMB

Target Schema is a Production Schema
Ready to process patches, Do you want to continue? (Y/N): Y

Working Directory: ORMB001
***********************************
Setting up language file: ORMB001\CDXPatch.lang
exit value: 0

Applying 25187694 ...
Writing to log file: ORMB001\log25187694.log
-----------------------------------------------------------
--Applying patch 25187694 at 12-08-2016 15:31:50using $LastChangedRevision: 42479 $
---------------------------------------------------------------
--Copying language information
-----------------------------------------------------------
--Patch 25187694 applied successfully at 12-08-2016 15:31:52
---------------------------------------------------------------
Patch applied successfully..
Enter a comma-separated list of Oracle users in which synonyms need to be created (e.g. CISUSER,CISREAD): CISUSER,CISREAD
Enter a database role which has a read-write privilege (e.g. CIS_USER): CIS_USER
Enter a database role which has a read only privilege (e.g. CIS_READ): CIS_READ
Generating Security ...
-----------------------------------------------------------
--Security is successfully applied at 12-08-2016 15:37:54
---------------------------------------------------------------
D:\PATCHES\p25187694_25030_PDEV\MultiPlatform\V2.5.0.3.0-25187694_MultiPlatform\database\ORACLE\CDXPatch>

5)  Review Patch Log File Including Security Generation Log

capture

—  log25187694

--Applying patch 25187694 at 12-08-2016 15:31:50using $LastChangedRevision: 42479 $
---------------------------------------------------------------
--Copying language information 
insert into ci_ut_instl(instl_log_id,target_ver_id,upg_count,prev_ver_id,start_dttm,run_status_flg,sr_no,owner_flg) values ( 51, 'V2.5.0.3.0', 1, 'V2.5.0.3.0', sysdate, '00', '25187694', 'C1' )
;
--Executed Successfully ...
COMMIT
;

--Executed Successfully ...
INSERT INTO CI_UT_INSTL_DTL(INSTL_LOG_ID,SEQ_NUM,SCRIPT_FILE_NAME,START_DTTM,RUN_STATUS_FLG,OWNER_FLG) VALUES ( 51, 1, '25187694_RS1.SQL', sysdate, '00', 'C1' )
;
--Executed Successfully ...
COMMIT
;

-- RUNNING SCRIPTS HERE
....
...
..
.

--Executed Successfully ...
COMMIT
;

--Executed Successfully ...
UPDATE CI_UT_INSTL_DTL SET END_DTTM=sysdate, RUN_STATUS_FLG='02' WHERE INSTL_LOG_ID=51 AND SEQ_NUM = 1
;
--Executed Successfully ...
COMMIT
;

--Executed Successfully ...
UPDATE CI_UT_INSTL SET END_DTTM=sysdate, RUN_STATUS_FLG='02' WHERE INSTL_LOG_ID=51
;
--Executed Successfully ...
COMMIT
;

--Executed Successfully ...
-----------------------------------------------------------
--Patch 25187694 applied successfully at 12-08-2016 15:31:52
---------------------------------------------------------------

6) Check the Patch has been Applied Successfully

Check the patch status as per How to Check the Successful Installation of a Database Patch Onto ORMB Database

SQL> select sr_no,run_status_flg,END_DTTM 
       from cisadm.ci_ut_instl 
      where sr_no in ( '25187694') 
        and run_status_flg = '02' 
        and END_DTTM IS Not NULL;

SR_NO     RU   END_DTTM
--------- --  -------------------
25187694  02   20161208-15:31:52
Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: