Sunday 29 October 2023

How to apply OJVM patch without down time of database in RAC


In RAC environment, we can do any patch without down time if we follow rolling method(node by node).

We dont required to bring down database for running datapatch, so no down time here as well.

But for OJVM patch, its required to run in upgrade mode, hence DB restart required which is a bad news for RAC environments.


But we have a workaround to run datapatch without putting database in upgrade mode, i.e using   -skip_upgrade_check


./datapatch -verbose -skip_upgrade_check

DBAs will face challenge to apply OJVM patch as it required to put database in upgrade mode to run datapatch.

This way DBA can apply all patches with Zero down time in RAC environments.


Finding OEM urls including weblogic console url.

 OEM urls will be stored in setupinfo.txt file under OMS_HOME/install.


cat /u01/app/oracle/middleware/install/setupinfo.txt

The following is output shows the contents of the file.

Use the following URL to access:


        1. Enterprise Manager Cloud Control URL: https://abcdhost1:7803/em

        2. Admin Server URL: https://abcdhost1:7102/console

        3. BI Publisher URL: https://abcdhost1:9803/xmlpserver/servlet/home


The following details need to be provided while installing an additional OMS:


        1. Admin Server Host Name: abcdhost1

        2. Admin Server Port: 7102


You can find the details on ports used by this deployment at : /u01/app/oracle/middleware/install/portlist.ini


How to find weblogic password in OEM

 Finding Existing weblogic password in OEM



    - To get the existing weblogic's password, please do the below:

1. Weblogic's password is stored in encrypted form in 'password' field in the file -

  /u01/app/oracle/gc_inst/user_projects/domains/GCDomain/servers/EMGC_ADMINSERVER/security/boot.properties. Get the encrypted password from it.

cat boot.properties

# Generated by Configuration Wizard on Sun Mar 29 13:21:08 CEST 2020

username={AES}i3XAY7iKtI9kZ2sd6jqu9nKnUoiBAXXYnua7qQaQYWMUxQ=

password={AES}A1W4HlGanBCEFqLyNpdzgRR16V/ls6EIdptRjg5Kn2/YU0=


2. Run the below commands to get the plain password from encrypted format :

cd /opt/oracle/gc_inst/user_projects/domains/GCDomain/bin

. ./setDomainEnv.sh


3.  Now you will be under /u01/app/oracle/gc_inst/user_projects/domains/GCDomain 

Create a java file to convert the password to text format.

vi recoverpassword.java

public class recoverpassword {

 public static void main(String[] args)

 {

  System.out.println(

  new weblogic.security.internal.encryption.ClearOrEncryptedService(

  weblogic.security.internal.SerializedSystemIni.getEncryptionService(args[0]

   )).decrypt(args[1]));

  }

}

4. compile the Java script.

javac recoverpassword.java


5. Replace the encrypted password find in step 1 in below command and run, it displays the password in text format.


java -cp $CLASSPATH:. recoverpassword /orasoft/oracle/gc_inst/user_projects/domains/GCDomain {AES}A1W4HlGanBCEFqLyNpdzgRR16V/ls6EIdptRjg5Kn2/YU0=


Opoldrgx123


Above is the password in text format.


same method you can follow if you want to know the username.