Monday, June 29, 2020

Minimizing Oracle EBusiness Suite Release 12.2.n Upgrade Downtime

 Minimizing Oracle EBusiness Suite Release 12.2.n Upgrade Downtime 

Follow the link for upgrade.


Removing Unnecessary Workloads / Overheads
  •   Disable any custom triggers and business events 12 Best Practices for Minimizing E-Business Suite R12.2.n Upgrade Downtime 
  •  Disable all DBMS scheduler (DBMS_SCHEDULER), DBMS Job (DBMS_JOB) and Autotask (DBMS_AUTO_TASK_ADMIN) activities during the upgrade
  •  Review and disable custom VPD policies as needed
  •  Disable auditing if enabled. 
  • Review and disable all debug or logging; do this at all levels (site, responsibility, user level etc.). 
  • If possible run in noarchivelog mode. 
  •  Disable flashback DB. 
  •  Remove TDE (Transparent Data Encryption) from high volume tables.
  •  Consider running AutoConfig in parallel on a multi-node system. 
  • Split any RDBMS Upgrade, Platform Upgrade, Conversion to OATM into a separate downtime period. 
  •  Use TUMS (The Upgrade Manual Script) to avoid running tasks that are not relevant to the installation
  •  Minimize Historical Data To Be Upgraded (Upgrade by Request) (Upgrade from 11i Only) 
  • Parallelize pre and post upgrade technical activities  Define separate concurrent manager queue for post upgrade jobs. 
  • If using RAC then “Parallel Concurrent Processing (PCP)” could be used for post-upgrade concurrent jobs.

Friday, June 26, 2020

RMAN-08137: WARNING: archived log not deleted, needed for standby

RMAN-08137: WARNING: archived log not deleted, needed for standby

Recently I met with an Oracle error 
"RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process" while deleting the archived logs through RMAN prompt.
I simulated the same on my test machine.

Note. I had configured standby for my primary database but not the upstream.

Followings are the excerpts from the RMAN output.


RMAN> delete noprompt archivelog all;

allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=3012 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=1011 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=2030 device type=DISK
allocated channel: ORA_DISK_4
channel ORA_DISK_4: SID=2028 device type=DISK
allocated channel: ORA_DISK_5
channel ORA_DISK_5: SID=3011 device type=DISK
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process

I could delete those archivelogs using "force" option as well.
RMAN > delete noprompt force archivelog all;

But I dont want to do the same as those archivelogs have not shipped yet to the standby server.
So I changed the rman configuration to do the same.

RMAN> show all;
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default

RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO SHIPPED TO STANDBY;
new RMAN configuration parameters:
CONFIGURE ARCHIVELOG DELETION POLICY TO SHIPPED TO STANDBY;
new RMAN configuration parameters are successfully stored
RMAN-08591: WARNING: invalid archived log deletion policy

RMAN> show all;
CONFIGURE ARCHIVELOG DELETION POLICY TO SHIPPED TO STANDBY;

Now I was able to delete those archivelogs.

RMAN> delete noprompt archivelog all;

released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=147 device type=DISK

..........
..........

deleted archived log
.........
.........

RMAN> crosscheck archivelog all;

released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=147 device type=DISK
specification does not match any archived log in the repository

Once I deleted those logs, I changed the rman configuration by the default one.

RMAN> CONFIGURE ARCHIVELOG DELETION POLICY CLEAR;

old RMAN configuration parameters:
CONFIGURE ARCHIVELOG DELETION POLICY TO SHIPPED TO STANDBY;
RMAN configuration parameters are successfully reset to default value

Monday, June 15, 2020

Cursor Sharing

Cursor Sharing

Cursor sharing is an important component of Database System. 
It is mainly based on Hard and Soft parse mechanisms.
When the query is first executed, the optimizer generates a new execution plan and a cursor, storing sql information in the Shared Pool memory area (the RDBMS executes a hard-parse). 
When the same query will be executed again the plan is not more generated: the already evaluated plan stored in Shared Pool is used, saving time and resources 
(the RDBMS executes a soft-parse).
 In this second case, the Database System doesn’t need to create a new cursor because, thanks to cursor sharing, the DB re-uses the previous generated one.

The basic soft/hard parse mechanism and cursor sharing is explained in the following Diagram :-


Non รจ stato fornito nessun testo alternativo per questa immagine

Hard Parses can be largely reduced using Bind Variables.

Actually, Oracle differentiates between parent and child cursor stored in the Shared Pool area.

Every parsed SQL statement has a parent cursor and one or more child cursors. The parent cursor stores the text of the SQL statement. If the text of two statements is identical, then the statements share the same parent cursor. If the text is different, however, then the database creates a separate parent cursor.

Every parent cursor has one or more child cursors. A child cursor contains the execution plan, bind variables, metadata about objects referenced in the query, optimizer environment, and other information. In contrast to the parent cursor, the child cursor does not store the text of the SQL statement.

Oracle generates child cursors (linked to an unique parent cursor) for nearly 60 reasons. The optimizer decides whether to generate a cursor or not, for example, using cardinality feedbacks, that are sql execution statistics. In this way, for next sql executions, the Optimizer can make his choice evaluating more than one plan, without executing an actual Hard Parse. 

In this case we could say that the DB is executing an “Harder” Soft Parse:


This is very useful because can reduce cardinality impact on execution costs. The v$sql_shared_cursor view contains the reason why a certain cursor exists (and why it is not shared with existing child cursors). In fact, this view has more than 60 columns and each column identifies a specific reason why the cursor can’t be shared.

Bug 14176247: cursors issues using Adaptive Cursor Sharing with binds

The documented bug causes the creation of too much cursors and affects 12c release. 

As a Symptom - The bug noticed an huge concurrency in the database.This is How the OEM looks like - 



Oracle Cursor Sharing Bug in 12c Database (cursor: pin S wait on X) wait event

Oracle Cursor Sharing Bug


Bug 14176247 - Many child cursors using Adaptive Cursor Sharing with binds (due to BIND_EQUIV_FAILURE)


Symptoms:

Related To:


Description

 
A high number of child cursors may be produced with the same plan when
using Adaptive Cursor Sharing for SQL with binds in some cases.
 
Rediscovery Notes
 This bug may be suspected if all of the following are true:
  A cursor has a high VERSION_COUNT in V$SQLAREA
  The reason for not sharing shows as BIND_EQUIV_FAILURE in V$SQL_SHARED_CURSOR
  The query has multiple predicates with binds that are involved in 
   extended cursor sharing.  
  The are many selectivity ranges (in V$SQL_CS_SELECTIVITY), and they overlap. 

  Setting _optimizer_extended_cursor_sharing_rel = none avoids the problem
 
 In cases if high concurrency the issue may also show as 
  "cursor: pin S wait on X" waits against the problem cursor/s
 
Workaround
 Set _optimizer_extended_cursor_sharing_rel = none

Adaptive cursor sharing bug that is described on DOC ID 14176247.8 of MOS.


 

 

12.2 Cursor Mutex X Due To Sql Not Shared Because Of BIND_EQUIV_FAILURE

Bug 28794230  12.2 Cursor Mutex X Due To Sql Not Shared Because Of BIND_EQUIV_FAILURE



Symptoms:

Related To:

 

Description

Cursor leak with ACS(Adaptive Cursor Sharing) and CFB(Cardinality FeedBack) 
on short-running query and fix for Bug:23596611.
  
Rediscovery Notes
If a subsecond query with binds exhibits increasing child cursor count on
repeated executions on a release where the fix for Bug:23596611 exists and
disabling adaptive cursor sharing or statistics feedback prevents the cursor leak ,t
hen you may have encountered this bug.
 
You can see  BIND_EQUIV_FAILURE=Y in V$SQL_SHARED_CURSOR.
 
Workaround 

Several alternatives:
_optimizer_use_feedback=false
_optimizer_adaptive_cursor_sharing=false
_optimizer_extended_cursor_sharing_rel=none
_fix_control='23596611:OFF'  may also help in some cases

Alter system set _optimizer_use_feedback=false scope=spfile;
Alter system set _optimizer_adaptive_cursor_sharing=false scope=spfile;
Alter system set _optimizer_extended_cursor_sharing_rel=none scope=spfile;


Ref- 
(Doc ID 28794230.8)

Exception java.lang.UnsatisfiedLinkError: ../jre/1.4.2/lib/i386/libawt.so: libXp.so.6

"Exception java.lang.UnsatisfiedLinkError: ../jre/1.4.2/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory occurred" on RHEL5/OEL5 for 10.2 x86 or x86_64 install (Doc ID 443617.1)


Getting error while installing (./runInstaller) 

Exception java.lang.UnsatisfiedLinkError: /tmp/OraInstall<time_stamp>/jre/1.4.2/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory occurred..
java.lang.UnsatisfiedLinkError: /tmp/OraInstall<time_stamp>/jre/1.4.2/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at sun.security.action.LoadLibraryAction.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.NativeLibLoader.loadLibraries(Unknown Source)
at sun.awt.DebugHelper.<clinit>(Unknown Source)
at java.awt.Component.<clinit>(Unknown Source)
at oracle.sysman.oii.oiif.oiifm.OiifmGraphicInterfaceManager.<init>(OiifmGraphicInterfaceManager.java:222)
at oracle.sysman.oii.oiic.OiicSessionInterfaceManager.createInterfaceManager(OiicSessionInterfaceManager.java:193)
at oracle.sysman.oii.oiic.OiicSessionInterfaceManager.getInterfaceManager(OiicSessionInterfaceManager.java:202)
at oracle.sysman.oii.oiic.OiicInstaller.getInterfaceManager(OiicInstaller.java:436)
at oracle.sysman.oii.oiic.OiicInstaller.runInstaller(OiicInstaller.java:926)
at oracle.sysman.oii.oiic.OiicInstaller.main(OiicInstaller.java:866)
Exception in thread "main" java.lang.NoClassDefFoundError
at oracle.sysman.oii.oiif.oiifm.OiifmGraphicInterfaceManager.<init>(OiifmGraphicInterfaceManager.java:222)
at oracle.sysman.oii.oiic.OiicSessionInterfaceManager.createInterfaceManager(OiicSessionInterfaceManager.java:193)
at oracle.sysman.oii.oiic.OiicSessionInterfaceManager.getInterfaceManager(OiicSessionInterfaceManager.java:202)
at oracle.sysman.oii.oiif.oiifm.OiifmAlert.<clinit>(OiifmAlert.java:151)
at oracle.sysman.oii.oiic.OiicInstaller.runInstaller(OiicInstaller.java:984)
at oracle.sysman.oii.oiic.OiicInstaller.main(OiicInstaller.java:866)

Cause

The  i386 (32bit) version of the libXp package is missing. The Oracle Universal Installer ( OUI  ) requires the file libXp.so.6 and this file is installed with the package libXp in RHEL 5 and OEL 5.

Issue the following to confirm the missing rpm:

% rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep libXp


SOLUTION

The package libXp was not installed need to install manually.


 Install the package libXp by the command:


rpm -ivh </path/to/>libXp.<version>.i386.rpm


 Confirm the installer now runs and displays:


 ./runInstaller





Friday, June 12, 2020

EBS WEBLOGIC SERVER ADMIN PORT AND URL in EBSR12

WEBLOGIC SERVER ADMIN PORT AND URL 

  • Check for the value 'WLS Admin Server Port'.

                grep -i s_wls_adminport $CONTEXTFILE


  • Check for 'listen-port' value of the 'AdminServer'

                grep -i AdminServer $CONTEXTFILE


  • Command for Console URL


echo "http://"$(cat $CONTEXT_FILE | grep s_webhost | cut -d '>' -f2 | cut -d '<' -f1)"."$(cat $CONTEXT_FILE | grep s_wls_admin_domain | cut -d '>' -f2 | cut -d '<' -f1)":"$(cat $CONTEXT_FILE | grep s_wls_adminport | cut -d '>' -f2 | cut -d '<' -f1)"/console"