java.lang.OutOfMemoryError: Java heap space while doing sh bsu.sh -install

In this post we will resolve the 'java.lang.OutOfMemoryError: Java heap space' issue while apply the Oracle WebLogic Server Patch Set Update  10.3.6.0.191015 


$sh bsu.sh -install -patch_download_dir=$FMW_HOME/utils/bsu/cache_dir -patchlist=3L3H -prod_dir=/data02/EBS_r12.2.5/fs1/FMW_Home/wlserver_10.3

Error:-

Exception in thread "Thread-0" Exception in thread "main" Exception in thread "Timer-0" java.lang.NoClassDefFoundError: Could not initialize class com.bea.plateng.patch.PatchSystem

        at com.bea.plateng.patch.PatchClientHelper.getAllPatchDetails(PatchClientHelper.java:74)

        at com.bea.plateng.patch.PatchInstallationHelper.cleanupPatchSets(PatchInstallationHelper.java:130)

        at com.bea.plateng.patch.PatchTarget.<init>(PatchTarget.java:272)

        at com.bea.plateng.patch.PatchTargetFactory.create(PatchTargetFactory.java:30)

        at com.bea.plateng.patch.ProductAliasTarget.constructPatchTargetList(ProductAliasTarget.java:88)

        at com.bea.plateng.patch.ProductAliasTarget.<init>(ProductAliasTarget.java:46)

        at com.bea.plateng.patch.ProductAliasTargetHelper.getProdAliasTargetList(ProductAliasTargetHelper.java:55)

        at com.bea.plateng.patch.ProductAliasTargetHelper.getAllHomeToProdAliasesTargetMap(ProductAliasTargetHelper.java:32)

        at com.bea.plateng.patch.ProductAliasTargetHelper.checkProfilesInProductAliases(ProductAliasTargetHelper.java:133)

        at com.bea.plateng.patch.Patch$1.run(Patch.java:376)

        at java.lang.Thread.run(Thread.java:745)

java.lang.OutOfMemoryError: Java heap space

        at java.lang.StringCoding.encode(StringCoding.java:338)

        at java.lang.String.getBytes(String.java:916)

        at java.io.UnixFileSystem.canonicalize0(Native Method)

        at java.io.UnixFileSystem.canonicalize(UnixFileSystem.java:172)

        at java.io.File.getCanonicalPath(File.java:618)

        at java.util.prefs.FileSystemPreferences.lockFile(FileSystemPreferences.java:902)

        at java.util.prefs.FileSystemPreferences.sync(FileSystemPreferences.java:729)

        at java.util.prefs.FileSystemPreferences.flush(FileSystemPreferences.java:824)

        at java.util.prefs.FileSystemPreferences.syncWorld(FileSystemPreferences.java:464)

        at java.util.prefs.FileSystemPreferences.access$1200(FileSystemPreferences.java:50)

        at java.util.prefs.FileSystemPreferences$3.run(FileSystemPreferences.java:432)

        at java.util.TimerThread.mainLoop(Timer.java:555)

        at java.util.TimerThread.run(Timer.java:505)

java.lang.OutOfMemoryError: Java heap space

        at java.util.HashMap.createEntry(HashMap.java:897)

        at java.util.HashMap.addEntry(HashMap.java:884)

        at java.util.HashMap.put(HashMap.java:505)

        at com.bea.cie.common.dao.xbean.XBeanDataHandler.loadPropertyMap(XBeanDataHandler.java:778)

        at com.bea.cie.common.dao.xbean.XBeanDataHandler.<init>(XBeanDataHandler.java:99)

        at com.bea.cie.common.dao.xbean.XBeanDataHandler.createDataHandler(XBeanDataHandler.java:559)

        at com.bea.cie.common.dao.xbean.XBeanDataHandler.getComplexValue(XBeanDataHandler.java:455)

        at com.bea.plateng.patch.dao.cat.PatchCatalogHelper.getPatchDependencies(PatchCatalogHelper.java:442)

        at com.bea.plateng.patch.dao.cat.PatchCatalogHelper.getPatchDependencies(PatchCatalogHelper.java:464)

        at com.bea.plateng.patch.dao.cat.PatchCatalog.getPatchDependencies(PatchCatalog.java:56)

        at com.bea.plateng.patch.dao.cat.PatchCatalogHelper.getInvalidatedPatchMap(PatchCatalogHelper.java:1621)

        at com.bea.plateng.patch.PatchSystem.updatePatchCatalog(PatchSystem.java:436)

        at com.bea.plateng.patch.PatchSystem.refresh(PatchSystem.java:130)

        at com.bea.plateng.patch.PatchSystem.<init>(PatchSystem.java:114)

        at com.bea.plateng.patch.PatchSystem.<clinit>(PatchSystem.java:41)

        at com.bea.plateng.patch.Patch.main(Patch.java:279)



Solution:-


 - Navigate to the {MW_HOME}/utils/bsu directory.
 
 - Configuring Memory options
 
   For Microsoft Windows systems
   Edit the bsu.cmd script and change memory options as follows:
   set MEM_ARGS=-Xms1024m -Xmx3072m
 
   For UNIX Systems
   Edit the bsu.sh script and change memory options as follows:
   MEM_ARGS="-Xms1024m -Xmx3072m"


Retest the issue.

$sh bsu.sh -install -patch_download_dir=$FMW_HOME/utils/bsu/cache_dir -patchlist=3L3H -prod_dir=/data02/EBS_r12.2.5/fs1/FMW_Home/wlserver_10.3

Checking for conflicts..............
Conflict(s) detected - resolve conflict condition and execute patch installation again
Conflict condition details follow:
Patch 3L3H is mutually exclusive and cannot coexist with patch(es): CW9T,1LRI,FCX7,2GYW,BLTG,VKXF,YHJK,Y5AP



It means now patching is working...

ORA-12547 TNS lost contact

 ORA-12547: TNS:lost contact

$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Thu Mar 25 09:38:40 2021

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

ERROR:

ORA-12547: TNS:lost contact


Above error can occur for many reason. In my case  oracle file system ownership issue. To fix this issue we have to check it as below and provide the appropriate permission.


oratest@test orahome]$ ls -ltr

total 3716

drwxrwxr-x  3 775 dba    4096 Jan  1  2017 usm

drwxrwxr-x  4 775 dba    4096 Jan  1  2017 uix

-rwxrwxr-x  1 775 dba     398 Jan  1  2017 root.sh

drwxrwxr-x  4 775 dba    4096 Jan  1  2017 relnotes

drwxrwxr-x  2 775 dba    4096 Jan  1  2017 utl

drwxrwxr-x  4 775 dba    4096 Jan  1  2017 suptools

drwxrwxr-x  7 775 dba    4096 Jan  1  2017 cfgtoollogs

drwxrwxr-x 26 775 dba    4096 Jan  1  2017 ow


Solution is to make sure file system for database home has setuid/suid set, database binary($ORACLE_HOME/bin/oracle) has correct ownership and permission, and listener owner is able to access database oracle binary (as listener owner, "ls -l $ORACLE_HOME/bin/oracle" will tell)


If ownership and permission not correct make it change as below.


#chown -R oratest:dba /orahome

#chmod -R 775 /orahome


[oratest@test ~]$ cd $ORACLE_HOME

[oratest@test orahome]$ ls -ltr

total 3716

drwxrwxr-x  3 oratest dba    4096 Jan  1  2017 usm

drwxrwxr-x  4 oratest dba    4096 Jan  1  2017 uix

-rwxrwxr-x  1 oratest dba     398 Jan  1  2017 root.sh

drwxrwxr-x  4 oratest dba    4096 Jan  1  2017 relnotes

drwxrwxr-x  2 oratest dba    4096 Jan  1  2017 utl

drwxrwxr-x  4 oratest dba    4096 Jan  1  2017 suptools

drwxrwxr-x  7 oratest dba    4096 Jan  1  2017 cfgtoollogs

drwxrwxr-x 26 oratest dba    4096 Jan  1  2017 owb

drwxrwxr-x  3 oratest dba    4096 Jan  1  2017 wwg

drwxrwxr-x  3 oratest dba    4096 Jan  1  2017 ucp

drwxrwxr-x 13 oratest dba    4096 Jan  1  2017 ldap

drwxrwxr-x  4 oratest dba    4096 Jan  1  2017 deinstall

drwxrwxr-x  3 oratest dba    4096 Jan  1  2017 slax

drwxrwxr-x  8 oratest dba    4096 Jan  1  2017 xdk

drwxrwxr-x 13 oratest dba    4096 Jan  1  2017 sqldeveloper

drwxrwxr-x  5 oratest dba    4096 Jan  1  2017 olap

drwxrwxr-x  8 oratest dba    4096 Jan  1  2017 precomp

drwxrwxr-x  3 oratest dba    4096 Jan  1  2017 has

drwxrwxr-x  4 oratest dba    4096 Jan  1  2017 clone

drwxrwxr-x 10 oratest dba    4096 Jan  1  2017 ord

drwxrwxr-x  4 oratest dba    4096 Jan  1  2017 sqlj

drwxrwxr-x  2 oratest dba    4096 Jan  1  2017 mesg

drwxrwxr-x  6 oratest dba    4096 Jan  1  2017 css

drwxrwxr-x  2 oratest dba    4096 Jan  1  2017 timingframework

drwxrwxr-x  8 oratest dba    4096 Jan  1  2017 apex

drwxrwxr-x 15 oratest dba    4096 Jan  1  2017 sysman

drwxrwxr-x  8 oratest dba    4096 Jan  1  2017 oui

drwxrwxr-x  3 oratest dba    4096 Jan  1  2017 demo

drwxrwxr-x  8 oratest dba    4096 Jan  1  2017 sqlplus

drwxrwxr-x  3 oratest dba    4096 Jan  1  2017 jpub

drwxrwxr-x  4 oratest dba    4096 Jan  1  2017 jdev

drwxrwxr-x  2 oratest dba    4096 Jan  1  2017 instantclient

drwxrwxr-x 13 oratest dba    4096 Jan  1  2017 rdbms

drwxrwxr-x  8 oratest dba    4096 Jan  1  2017 OPatch_11.2.0.3.4

drwxrwxr-x 10 oratest dba    4096 Jan  1  2017 rda

drwxrwxr-x  9 oratest dba    4096 Jan  1  2017 srvm

drwxrwxr-x  4 oratest dba    4096 Jan  1  2017 owm

drwxrwxr-x 14 oratest dba    4096 Jan  1  2017 inventory

drwxrwxr-x  8 oratest dba    4096 Jan  1  2017 nls

drwxrwxr-x  3 oratest dba    4096 Jan  1  2017 patch



If ownership and permission of $ORACLE_HOME/bin/oracle is not correct.


Change permissions as below:

cd $ORACLE_HOME/bin/


ls -ltr oracle

-rwsr-s--x    1 oratest dba 136803483 Mar 16 20:32 oracle

chmod 6751 oracle



ORA-39065: unexpected master process exception in DISPATCH

In this article we will resolve error ORA-39065 . While exporting table in oracle using datapump, facing error ora-39065.


$expdp apps/apps tables=EMP_POLICY_MASTER directory=apps_dir dumpfile=EMP_POLICY_MASTER.dmp file=expdpEMP_POLICY_MASTER.log


Export: Release 11.2.0.4.0 - Production on Sat Feb 20 14:11:34 2021

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


Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

ORA-39006: internal error

ORA-39065: unexpected master process exception in DISPATCH

ORA-01403: no data found


To Validate the Problem I ran


SQL> select count(*) from metanametrans$;

  COUNT(*)

----------

         0


It should have more values than that!


Solution


@$ORACLE_HOME/rdbms/admin/catmet2.sql

@$ORACLE_HOME/rdbms/admin/utlrp.sql


Now we will check the issue....


$expdp apps/apps tables=EMP_POLICY_MASTER directory=apps_dir dumpfile=EMP_POLICY_MASTER.dmp lfile=expdpEMP_POLICY_MASTER.log


Export: Release 11.2.0.4.0 - Production on Sat Feb 20 14:36:58 2021


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


Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

Legacy Mode Active due to the following parameters:

Legacy Mode Parameter: "file=expdpEMP_POLICY_MASTER1.log" Location: Command Line, Replaced with: "dumpfile=expdpEMP_POL    ICY_MASTER1.log"

Legacy Mode has set reuse_dumpfiles=true parameter.

Starting "APPS"."SYS_EXPORT_TABLE_01":  apps/******** tables=EMP_POLICY_MASTER directory=apps_dir dumpfile=EMP_POLICY_M    ASTER1.dmp dumpfile=expdpEMP_POLICY_MASTER1.log reuse_dumpfiles=true

Estimate in progress using BLOCKS method...

Processing object type TABLE_EXPORT/TABLE/TABLE_DATA

Total estimation using BLOCKS method: 256 KB

>>> DBMS_AW_EXP: Ignoring FPA.FPAPJP

>>> DBMS_AW_EXP: Ignoring APPS.ODPCODE

>>> DBMS_AW_EXP: Ignoring APPS.XWDEVKIT

Processing object type TABLE_EXPORT/TABLE/TABLE

>>> DBMS_AW_EXP: Ignoring FPA.FPAPJP

>>> DBMS_AW_EXP: Ignoring APPS.ODPCODE

>>> DBMS_AW_EXP: Ignoring APPS.XWDEVKIT

Processing object type TABLE_EXPORT/TABLE/POST_INSTANCE/PROCACT_INSTANCE

Processing object type TABLE_EXPORT/TABLE/POST_INSTANCE/PROCDEPOBJ

. . exported "APPS"."EMP_POLICY_MASTER"                  146.5 KB    1310 rows

Master table "APPS"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded

******************************************************************************

Dump file set for APPS.SYS_EXPORT_TABLE_01 is:

  /data05/apps_dir/EMP_POLICY_MASTER1.dmp

Job "APPS"."SYS_EXPORT_TABLE_01" successfully completed at Sat Feb 20 14:37:37 2021 elapsed 0 00:00:38



Issue resolved.....................................



ORA-39213: Metadata processing is not available

In this article we will learn how to resolve the ORA-39213 Metadata processing is not available error while trying to export the table in oracle using dataPump utility.



Exporting table using DataPump.

$expdp apps/apps tables=EMP_POLICY_MASTER directory=apps_dir dumpfile=EMP_POLICY_MASTER.dmp logfile=expdpEMP_POLICY_MASTER.log


Export: Release 11.2.0.4.0 - Production on Sat Feb 20 14:08:58 2021


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


Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

ORA-39006: internal error

ORA-39213: Metadata processing is not available



This error can be detected while executing the DataPump in any platform. You may get this error during expdp or impdp.


For solution, execute sys.dbms_metadata_util.load_stylesheets to fix this problem as below.


SQL> execute sys.dbms_metadata_util.load_stylesheets;



You can see here we have resolved the issue..


Retest the issue.

$expdp apps/apps tables=EMP_POLICY_MASTER directory=apps_dir dumpfile=EMP_POLICY_MASTER.dmp lfile=expdpEMP_POLICY_MASTER.log


Export: Release 11.2.0.4.0 - Production on Sat Feb 20 14:36:58 2021


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


Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

Legacy Mode Active due to the following parameters:

Legacy Mode Parameter: "file=expdpEMP_POLICY_MASTER1.log" Location: Command Line, Replaced with: "dumpfile=expdpEMP_POL    ICY_MASTER1.log"

Legacy Mode has set reuse_dumpfiles=true parameter.

Starting "APPS"."SYS_EXPORT_TABLE_01":  apps/******** tables=EMP_POLICY_MASTER directory=apps_dir dumpfile=EMP_POLICY_M    ASTER1.dmp dumpfile=expdpEMP_POLICY_MASTER1.log reuse_dumpfiles=true

Estimate in progress using BLOCKS method...

Processing object type TABLE_EXPORT/TABLE/TABLE_DATA

Total estimation using BLOCKS method: 256 KB

>>> DBMS_AW_EXP: Ignoring FPA.FPAPJP

>>> DBMS_AW_EXP: Ignoring APPS.ODPCODE

>>> DBMS_AW_EXP: Ignoring APPS.XWDEVKIT

Processing object type TABLE_EXPORT/TABLE/TABLE

>>> DBMS_AW_EXP: Ignoring FPA.FPAPJP

>>> DBMS_AW_EXP: Ignoring APPS.ODPCODE

>>> DBMS_AW_EXP: Ignoring APPS.XWDEVKIT

Processing object type TABLE_EXPORT/TABLE/POST_INSTANCE/PROCACT_INSTANCE

Processing object type TABLE_EXPORT/TABLE/POST_INSTANCE/PROCDEPOBJ

. . exported "APPS"."EMP_POLICY_MASTER"                  146.5 KB    1310 rows

Master table "APPS"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded

******************************************************************************

Dump file set for APPS.SYS_EXPORT_TABLE_01 is:

  /data05/apps_dir/EMP_POLICY_MASTER1.dmp

Job "APPS"."SYS_EXPORT_TABLE_01" successfully completed at Sat Feb 20 14:37:37 2021 elapsed 0 00:00:38



Successfully completed the job......



RMAN abort with ORA-19502: write error on file and ORA-27072: File I/O error

Below error coming while trying to restore the oracle database using RMAN backup.

 

channel ORA_DISK_1: starting datafile backup set restore

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

channel ORA_DISK_1: restoring datafile 00090 to /data01/PROD/datafiles/a_txn_ind23.dbf

channel ORA_DISK_1: reading from backup piece /backup/rmanPROD/Wednesday_03_03_2021_00:25:01/DB_1_20210303_53253.rbkp

channel ORA_DISK_1: ORA-19870: error while restoring backup piece /rmanbkp/rmanPROD/Wednesday/DB_1_20210303_53253.rbkp

ORA-19502: write error on file "/data01/PROD/datafiles/a_txn_ind23.dbf", block number 3718144 (block size=8192)

ORA-27072: File I/O error

Additional information: 4

Additional information: 3718144

Additional information: 921600


Error from RMAN session:- 

ORA-19502: write error on file "/data01/PROD/datafiles/a_txn_ind23.dbf", block number 3718144 (block size=8192)

ORA-27072: File I/O error


Solution:-

This usually means there is not sufficient enough disk space for the backup. The most likely cause of this error is that no enough disk space for the RMAN datafiles restoration.


To resolve this error , you need to remove unwanted/unnecessary file from from file system or add disk space or change the another datafile location to restore the complete database or datafiles.

How to Ugrade JDK with Oracle 11.2.0.4.0

Before we go to upgrade the JDK . First of all need to check the existing jdk version. 


Check jdk version.


$ORACLE_HOME/jdk/bin/java -version


Currently we have 1.5.0_51 jdk installed in our database..

Now we will upgrade it to jdk 1.7.

By default, the following Java JDK major versions were shipped with Each Oracle database version:-


Oracle 11.2.0.4:                 Java 5 (updated to Java 7 with patch 25803774)

Oracle 12.1.0.2:                 Java 6 (updated to Java 7 with patch 27301652)

Oracle 12.2.0.1:                 Java 8

Oracle 18c:                        Java 8

Oracle 19c:                        Java 8


As per oracle support, we will have to apply patch 25803774 in our oracle home....


We have already downloaded the patch and moved it on db server....

Now we will check the README.html of patch 25803774  to apply this patch...

Checking pre-requisite to apply this patch..


$opatch prereq CheckConflictAgainstOHWithDetail -ph ./


After executed the prereq of this patch we are facing below error...


Unable to create Patch Object.

                             Exception occured : 

/acedata05/EBS_Patches/JAVA_PATCH/25803774/etc/c

onfig/actions.xml with Version field of the component "delete" in actions file cannot be <null> or empty. Please check patch metadata.


Above error coming because of OPatch version...

Our current opatch version is 11.2.0.3.15.

As per doc 2320940.1  we need to update opatch verson .

For 11.2 Database, select Release as Oracle 11.2.0.0.0


OPatch can be downloaded here:


👇

https://updates.oracle.com/download/6880880.html


We have already downloaded the patch 6880880.

unzip the opatch patch and copy it at $ORACLE_HOME


OPatch version    : 11.2.0.3.15


$opatch version

OPatch Version: 11.2.0.3.28

OPatch succeeded.


Now we have OPatch Version: 11.2.0.3.28


OPatch Error "Exception occured : Your Oracle Home has a constituent installed without having its prereqalso installed." occurs despite referenced directory existing in oneoffs (Doc ID 2320940.1)


$opatch prereq CheckConflictAgainstOHWithDetail -ph ./


Oracle Interim Patch Installer version 11.2.0.3.28

Copyright (c) 2021, Oracle Corporation.  All rights reserved.


PREREQ session


Oracle Home        : /acedata03/UAT_8026/orahome

Central Inventory : /etc/oraInventory

from                    : /acedata03/UAT_8026/orahome/oraInst.loc

OPatch version     : 11.2.0.3.28

OUI version          : 11.2.0.4.0

Log file location     : /data03/UAT_8026/orahome/cfgtoollogs/opatch/opatch2021-02-27_11-45-48AM_1.log


Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.


See the Pre-requisite has been succeeded.


$opatch apply.


opatch apply

Oracle Interim Patch Installer version 11.2.0.3.28

Copyright (c) 2021, Oracle Corporation.  All rights reserved.

Oracle Home       : /acedata03/UAT_8026/orahome

Central Inventory : /etc/oraInventory

from                   : /acedata03/UAT_8026/orahome/oraInst.loc

OPatch version    : 11.2.0.3.28

OUI version        : 11.2.0.4.0

Log file location  : 

/data03/UAT_8026/orahome/cfgtoollogs/opatch/opatch2021-02-27_11-46-32AM_1.log


Verifying environment and performing prerequisite checks...

OPatch continues with these patches:   25803774


Do you want to proceed? [y|n]

y

User Responded with: Y

All checks passed.


Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.

(Oracle Home = '/data03/UAT_8026/orahome')

Is the local system ready for patching? [y|n]

y

User Responded with: Y

Backing up files...

Applying interim patch '25803774' to OH '/data03/UAT_8026/orahome'

Patching component oracle.jdk, 1.5.0.51.10...

Patch 25803774 successfully applied.

Log file location: 

/data03/UAT_8026/orahome/cfgtoollogs/opatch/opatch2021-02-27_11-46-32AM_1.log


OPatch succeeded.


$ORACLE_HOME/jdk/bin/java -version

java version "1.7.0_141"

Java(TM) SE Runtime Environment (build 1.7.0_141-b11)

Java HotSpot(TM) 64-Bit Server VM (build 24.141-b11, mixed mode)



Thank You.................


terminating the instance due to error 16038

I have encountered the error while  trying to open the database.To successfully startup the database we need to clear the unarchived logifle.

Error:-

SQL> alter database open;

alter database open

*

ERROR at line 1:

ORA-03113: end-of-file on communication channel

Process ID: 31074

Session ID: 1 Serial number: 7


Alert log :-

ARCH: All Archive destinations made inactive due to error 333

ARCH: Closing local archive destination LOG_ARCHIVE_DEST_1: '/data01/DB_ARCH/1_12332_793277810.dbf' (error 333) (PROD)

Committing creation of archivelog '/data01/DB_ARCH/1_12332_793277810.dbf' (error 333)

ARC1: Becoming the heartbeat ARCH

Errors in file /data01/diag/rdbms/coremain/PROD/trace/PROD_ora_31644.trc:

ORA-16038: log 2 sequence# 12332 cannot be archived

ORA-00333: redo log read error block  count

ORA-00312: online log 2 thread 1: '/data01/oradata/PROD/redo02.log'

USER (ospid: 31644): terminating the instance due to error 16038

Mon Mar 01 11:24:47 2021

System state dump requested by (instance=1, osid=31644), summary=[abnormal instance termination].

System State dumped to trace file /data01/diag/rdbms/PROD/trace/PROD_diag_31335.trc

Dumping diagnostic data in directory=[cdmp_20210301112447], requested by (instance=1, osid=31644), summary=[abnormal instance termination].

Instance terminated by USER, pid = 31644



Solution:-

Check the redo logfile status.

SQL> select group#,member,status from v$logfile;



Once you have identified the correct redo log file after that clear the unarchived log file.


SQL> alter database clear unarchived logfile ‘/data01/oradata/PROD/redo02.log';


If you find all multiplexed redo members are corrupted then you need to run below command to clear the GROUP.

SQL> alter database clear unarchived logfile group 1;