Saturday, August 25, 2007

X server

Configure an X server for Framework applications

To take advantage of the dynamic image generation support Framework applications require access to graphical capabilities on the middle tier. In practical terms this means you need to configure your Webserver to use an X server for dynamic gif generation.

X display servers can be broadly categorized into three groups

1. X display server from the OS Vendor
2. "Headless" X display server without video hardware (Xvfb and VNC )
3. Desktop X display server


Oracle software requires specific X display server settings. Oracle Toolkit, an internal component of Tools 6i, and the Installer orainst , require the following critical parameters to be set for all X display server software:

Option 2: Headless X display server - Xvfb or VNC

"Headless" X display servers provide the same services as the software in Options 1 & 3, however, these servers do not require video adapter hardware nor a monitor. These servers require the same settings for the default visual class, dpi and depth parameters as described in the introduction.

How to install and run Xvfb (X Virtual FrameBuffer)
Get the Xvfb binary. Some URLs are given below; alternatively, Xvfb can also compiled from the Xvfb source code available at http://www.x.org. As of April 2002, Xvfb binaries can be downloaded from these locations:
Solaris - Include with Solaris 9 and later. See Oracle TechNet for Solaris 2.6, 7 and 8
Linux - Included with most Linux distributions. Xvfb is also available as an RPM for RedHat and SUSE or from Xfree86.org
HPUX - HP patch PHSS_25277
AIX - Included with the operating system.
Tru64 - Included with the operating system; usually in /usr/bin/X11
Win32 - Not applicable.

On Solaris, verify that the all dynamically linked libraries can be resolved using the ldd command. On other platforms Xvfb is included with the OS and should already be properly configured:
% ldd Xvfb
This should display a list of resolved libraries as follows:
libsocket.so.1 => /usr/lib/libsocket.so.1
libnsl.so.1 => /usr/lib/libnsl.so.1
libc.so.1 => /usr/lib/libc.so.1
libdl.so.1 => /usr/lib/libdl.so.1
libmp.so.2 => /usr/lib/libmp.so.2
/usr/platform/SUNW,Ultra-60/lib/libc_psr.so.1

Get a security policy file
A sample security policy file is included at the end of this document. The file is named SecurityPolicy.
If you have an existing file then add this line to the end of the policy file:
property WM_CHANGE_STATE WM_NAME ar

To run Xvfb use a command with the following format

Xvfb :x -screen 0 6x6x8 -pn -fp /lib/X11/fonts/misc -sp /tmp/SecurityPolicy
where
x is the desired display number. For instance 1 or 2.
fp points to the directory of the fixed font
sp points to the directory and filename of the security policy file
6x6x8 screen size works well for Reports and Graphics and minimizes the memory required by Xvfb

Set the DISPLAY environment variable to the value :x.0 or your_hostname:x.0 where x is the display number chosen when starting Xvfb. For example in Bourne shell:

DISPLAY=Xvfb_hostname:x.0; export DISPLAY

Start a window manager on the Xvfb display to automatically position windows.
twm &

Thursday, April 19, 2007

Opatch (utility to apply RDBMS patches)

Opatch Application Steps :

1) Read the patch readme thoroughly and make sure everything is fine. Remember database patches are applied using opatch.

2) Check the invalids and take the object name and count of invalids.
col owner format a15
col object_name format a40
col object_type format a15
select owner,object_type,object_name from dba_objects where status = 'INVALID' order by owner,object_type;

3) Make sure you have the right opatch utility version.
Recent db patches require opatch version is 1.0.0.0.55 or higher

opatch version

Also make sure opatch executable used to apply the patch is in the PATH

export PATH=$PATH:$ORACLE_HOME/OPatch

4) Make sure opatch lsinventory is working for the opatch. If lsinventory is not working then you should not go ahead with opatch. This is the most important step, as most of Opatch issues are related to bad inventory etc.

opatch lsinventory

The possible causes could be inventory is not pointing correctly.(especially in dev and test servers, where you have more than one db sharing the same inventory) then make make sure inventory is pointing to the right path. Inventory location is mentioned in oraInst.loc under db home.
eg /opt/oracle/product/appl/9.2.0/oraInst.loc

ex Oracle Installer Location File

Location#inventory_loc=/opt/oracle/product/9iAS/oraInventory#inventory_loc=/opt/oracle/product/appl/oraInventoryinventory_loc=/opt/oracle/product/appl/oraInventoryinst_group=dba

Note :The OraInventory dir would be in one dir below db home

dir /opt/oracle/product/appl/oraInventory (]$ ls -rlttotal 10drwxr-xr-x 2 oramgr dba 96 Nov 16 2005 ContentsXMLdrwxr-xr-x 2 oramgr dba 1024 Nov 16 2005 Contentsdrwxr-xr-x 2 oramgr dba 3072 Dec 09 20:10 logs-rwxr-xr-x 1 oramgr dba 38 Dec 09 20:10 install.platform/opt/oracle/product/appl/oraInventory (]$<> and make sure the entries in files under ContentsXML has correct db entry.Also note these day's inventory are also known as XML inventory. )

5) Ensure that the $PATH has the following executables:
make, ar, ld, and nm and make sure they are working with the below commands and also
Check whether the java and jar executables are present in your Oracle home.
which make
which ar
which ld
which nm
6) Before applying the opatch, database and db (9i) listener should be down. This is a must.
7) For applying opatch go the database patch directory where the patch is downloaded and unzipped and now give the following command :
opatch apply

8) After opatch is done, confirm the inventory is updated with the current patch.This is a confirmation step.
opatch lsinventory
9) Make sure there are no errors and also verify the log file.log file is located in
eg : /opt/oracle/product/appl/9.2.0/.patch_storage//

10) start the database and db listener and do the post steps like executing catcpu and other steps as mentioned in the patch readme, take the invalids again and compile them.
Note:
syntax for applying opatch on RAC instances is little different.
On each node you might have to apply with the following syntax
opatch apply -local
============================================================
OraInventory in Oracle
======================
What to do if Inventory is corrupted , What is global / Local Inventory

oraInventory :
=============

oraInventory is repository (directory) which store/records oracle software products & their oracle_homes location on a machine. This Inventory now a days in XML format and called as XML Inventory where as in past it used to be in binary format &
called as binary Inventory.
There are basically two kind of Inventory Global Inventory (also called as Central Inventory) and Local Inventory also called as Oracle Home Inventory.

Global Inventory :
=============
Global Inventory holds information about Oracle Products on a Machine. These products can be various oracle components like database, oracle application server, collaboration suite, soa suite, forms & reports or discoverer server . This global Inventory location will be determined by file oraInst.loc in /etc (on Linux/AIX) or /var/opt/oracle (solaris). If you want to see list of oracle products on machine check for file inventory.xml under ContentsXML in oraInventory
(Please note if you have multiple global Inventory on machine check all oraInventory directories)

Local Inventory:
============
Inventory inside each Oracle Home is called as local Inventory or oracle_home Inventory. This Inventory holds information to that oracle_home only.

Can We have multiple Global Inventory on a machine :
=======================================
Can we have multiple global Inventory and the answer is YES you can have multiple global Inventory but if your upgrading or applying patch then make sure you change Inventory Pointer oraInst.loc to respective location. If you are following single global Inventory and if you wish to uninstall any software then remove it from Global Inventory as well.

If Global Inventory is corrupted
=======================
If global Inventory is corrupted, we can recreate global Inventory on machine using Universal Installer and attach already Installed oracle home by option-attachHome

." DIV < cluster_nodes="{}" oracle_home_name="Oracle_Home_Name">
Optach failures are generally due to Inventory problem, above i have provided some info. about the Oracle Inventory (Global/Local).This will help us in understanding & resolving the issues in future.

]$<> and make sure the entries in files under ContentsXML has correct db entry.Also note these day's inventory are also known as XML inventory. )
5) Ensure that the $PATH has the following executables:
make, ar, ld, and nm and make sure they are working with the below commands and also
Check whether the java and jar executables are present in your Oracle home.
which make
which ar
which ld
which nm
6) Before applying the opatch, database and db (9i) listener should be down. This is a must.
7) For applying opatch go the database patch directory where the patch is downloaded and unzipped and now give the following command :
opatch apply

8) After opatch is done, confirm the inventory is updated with the current patch.This is a confirmation step.
opatch lsinventory
9) Make sure there are no errors and also verify the log file.log file is located in
eg : /opt/oracle/product/appl/9.2.0/.patch_storage//

10) start the database and db listener and do the post steps like executing catcpu and other steps as mentioned in the patch readme, take the invalids again and compile them.
Note:
syntax for applying opatch on RAC instances is little different.
On each node you might have to apply with the following syntax
opatch apply -local
============================================================
OraInventory in Oracle
======================
What to do if Inventory is corrupted , What is global / Local Inventory

oraInventory :
=============

oraInventory is repository (directory) which store/records oracle software products & their oracle_homes location on a machine. This Inventory now a days in XML format and called as XML Inventory where as in past it used to be in binary format &
called as binary Inventory.
There are basically two kind of Inventory Global Inventory (also called as Central Inventory) and Local Inventory also called as Oracle Home Inventory.

Global Inventory :
=============
Global Inventory holds information about Oracle Products on a Machine. These products can be various oracle components like database, oracle application server, collaboration suite, soa suite, forms & reports or discoverer server . This global Inventory location will be determined by file oraInst.loc in /etc (on Linux/AIX) or /var/opt/oracle (solaris). If you want to see list of oracle products on machine check for file inventory.xml under ContentsXML in oraInventory
(Please note if you have multiple global Inventory on machine check all oraInventory directories)

Local Inventory:
============
Inventory inside each Oracle Home is called as local Inventory or oracle_home Inventory. This Inventory holds information to that oracle_home only.

Can We have multiple Global Inventory on a machine :
=======================================
Can we have multiple global Inventory and the answer is YES you can have multiple global Inventory but if your upgrading or applying patch then make sure you change Inventory Pointer oraInst.loc to respective location. If you are following single global Inventory and if you wish to uninstall any software then remove it from Global Inventory as well.

If Global Inventory is corrupted
=======================
If global Inventory is corrupted, we can recreate global Inventory on machine using Universal Installer and attach already Installed oracle home by option-attachHome

." DIV < cluster_nodes="{}" oracle_home_name="Oracle_Home_Name">

Tuesday, April 17, 2007

RMAN -- Disk channel and tape channel

Disk channel and tape channel – how to associate sbt_tape with rmt0h

If allocate channel for Tape , then synatx will be :

allocate channel t1 device type 'SBT_TAPE' parms="ENV=(NB_ORA_POLICY=ORACLE_napdci28-bac)";or allocate channel t1 type 'SBT_TAPE' parms="ENV=(NB_ORA_POLICY=ORACLE_napdci28-bac)";

If allocate channel for device, then syntax will be :

allocate channel c1 device type disk format '/uo1/orabackup/robprod/robprod_%U';

If allocate channel for maintenace then syntax will be :

allocate channel for maintenace device type sbt;

NOTE: The number of channels that are automatically allocated depends on the default level of parallelism defined.
Configure command:Configuring Channel Default settings :

This configures the default backup/restore device to tape or disk

configure default device type to SBT;
configure default device type to DISK;

Once we have configured a default device type,ORACLE will use the default channel unless we override the default using the backup device type parameter.

Thursday, April 5, 2007

Login issue resolution

If you can't login to oracle application by clicking on login link ,

check if

--- dbc file location
(wrapper.bin.parameters=- DFND_SECURE=/opt/appldba3/apps/fnd/11.5.0/secure)
as per parameter FND_SECURE (in jserv.properties) is correct.

--- dbc file name in the location specified by DFND_SECURE parameter in Jserv.properties file.

--- APPL_SERVER_ID in dbc file matches with server ID in FND_NODES table against respective Server .
eg.APPL_SERVER_ID=2CD2C25DFDCA80EAE0439C14342A80EA17875142042836050097327698082686

--- GUEST/ORACLE ( this a Application User and NOT DB user ) password is correct & user is not end dated .

--- APPS password is correct in wdbsvr.app file
( under $IAS_ORACLE_HOME/Apache/modplsql/cfg).

--- Check http://hostname.domainnamel:port/pls/$SID and see if package fnd_web can ping & you get output in screen from FND_WEB.ping with correct database_id ( and check if there is correct dbc file in FND_SECURE )

There is JSP tool test to find most of issues via http://host.domain:port/OA_HTML/jsp/fnd/aoljtest.jsp

Apart from this note at metalink which you can refer 342332.1 Troubleshooting Login Problems in Oracle Applications 11i (11.5.2 , 11.5.10+)

Hope this will help in our future issues.


Now let us understand , how an apps login actually takes place.
---------------------------------------------------------------
When user makes a request how request flow across different component in E-Business Suite or Oracle applications .There different Services/Component in Oracle apps these are ,
1. Oracle Web Server ( Apache, Jserv, plssql )
2. IAS_ORACLE_HOME 9iAS, Ver. 102222.
3. Forms Server ( 8.0.6 ) ORACLE_HOME & Report Server ( in side 8.0.6 ORACLE_HOME)
4. Concurrent Manager for Batch or Individual Job Processing
5. Admin Server ( These are used for application dba job like patching , cloning & lot more )
6. Database Server

Let's see how a request flow across different component in E-Business Suite or Oracle applications:

A) So when User makes a request from browser by typing URL
like http:// hostname : port
Here the port number they mention is WebServer Port, this request hit's to Oracle WebServer ( these requests are recorded in logs where wait for next post ).


B) Webserver checks that with http request there is no cookie attached (Cookie is message given by WebServer to Web Browser to identify client) so user is new & it passes login page to User .

C) User types his Username Password in login window & clicks submit button.

D) Webserver checks that username and passwords ( it need's to authenticate against database FND_USER table ), so it needs first some user GUEST/ORACLE to check client's username password in database .

E) Once user is authenticated its check against FND_RESPONSBILITY for Authorization about users responsibilities & assigned responsibilities are presented back to user.

F) Now these responsibilities are of two type Self Services(served by Jserv/Servlets) or Core Applications Server by Forms Server .

G) If this is Core responsibility , Apache transfers request to Forms Listener (Listening on Forms port),
From here request is on Sockets ( on forms servelets depending on forms config. ) which is persistense connection. From here onwards Client talks directly with Forms Server in forms session and if Client requested some data, forms server makes database connection.
( using tnsnames.ora in 806 HOME or using dbc Database Connector file in FND_SECURE_TOP or wdbsvr.apps in Apache/modplsql/cfg )

If User selected Self Service Responsibility like iProcurement, iRecruitement.., Apache forwards request to mod_jserv and request is fullfilled by jserv_component.

Note: why webserver donot ask client to login again until session timeout ??
( its because of cookies as User have valid cookies , try deleting cookies from browser & see Oracle Apache asks you to relogin .)

When your webserver tries to connect to database for plsql or any other type of connection it asks mod_pls to fulfill request but this connection information stored in ( dbc file or wdbsvr.app file )

DBC file in Oracle Apps

What is a .dbc and a .cfg file?

The .dbc file is mostly used to define database parameters,stands for database connect descriptor file, used to connectto database, it authenticate users against database in FND_USER table.

Let's see how it work's

The .dbc file is actually the database connector descriptor file used to connect to database and this file is by-default located in $FND_TOP/secure directory, this file is quite important as whenever any program likes to connect to database like forms it uses dbc file where there you find the Guest_user_pwd ,when the guest user connect it does not allow it to directly connect to the database but it first connect goes via this file and cross verify the password of the guest which is kept in this file.

DBC file is quite important as whenever Java or any other program like forms want to connect to database it uses dbc file.

Typical entry in dbc file are:
GUEST_USER_PWDAPPS_JDBC_URLDB_HOST


The dbc file is used to set up the connectivity for a given database. Each vendor requires different values to determine the server name, database name, user and password, plus any native options including special instructions for the vendor's client API or utility loader.When you drag an Output Table/Input Table etc. onto the canvas, the DBC file lets the component know where to direct the activity. The DBC file is also the mechanism through which a given table can be accessed and its column definition pulled automatically into the given component's DML definition.

There will be lot of dbc file under $FND_SECURE, how we determine which dbc file to use from $FND_SECURE ?

This value is determined from profile option "Applications Database ID"
Authenication:-

In order to authenticate your user against database in FND_USER table this request is passed from core Apache Module to mod_pls ( plsql) and it uses few files like wdbsvr.app in Apache/modplsql/conf $CONTEXT_NAME.dbc , tnsnames.ora in 806/network/admin/$CONTEXT_NAME , GUEST user & few other file so focus on these files & directories & see what changed recently.

.dbc file in R12 -->the dbc file in R12 is in the new $INSTANCE_TOP

$INST_TOP/appl/fnd/12.0.0/secure or $INSTANCE_TOP/apps//appl/fnd/12.0.o/secure.

Last but not the least .cfg is a unix-level file that is fed into a Korn Shell script as an auto-parameter feeder for a parameter-driven shell script. Cfg files are unix-defined where dbc files are AbI-defined.

A Database Connection (DBC) file holds information used by application servers to identify and authenticate with an application database. DBC files must be created on all tiers if it is a multi-tier system.

To recreate DBC file Login to your system as the APPLMGR, ensure that your environment is set correctly by running /.env.
Run common_top/admin/install/adgendbc.sh (UNIX)
This will create the DBC file for the current environment instance. Verify log file to check environment, which should be pointing to 806.Location of file is in /admin/install/adgendbc.txt.

DBC file Parameters

Verify dbc file exists and is in the right location. $FND_TOP/secure//_.dbc. Verify db_host using %uname -aVerify db_sid from v$instance or echo $ORACLE_SID.

Parameters:
APPL_SERVER_ID APPS_JDBC_DRIVER_TYPE=THIN DB_PORT <> DB_HOST GWYUID FNDNAM <> TWO_TASK GUEST_USER_PWD. this is application account and should exists in applications with out any responsibility.
Note:Make sure environment value specified for DB_HOST is db host not application host.
Optional parameters:

FND_MAX_JDBC_CONNECTIONS
Maximum number of open connections in the JDBC connection cache. This number is dependent on the amount of memory available, the number of processes specified in the init.ora file of the database.

FND_IN_USE_CONNECTION_TIMEOUT
Maximum number of seconds a connection can be in use. In order to avoid connections being locked up for too long, the connection cache uses this parameter to forcibly close connections that have been locked for over this time. If this parameter is unspecified,connections in use will not be cleaned up. This should be set to a number larger than the time taken to complete the largest transaction.It is difficult to estimate and recommendation is not to use this.

FND_UNUSED_CONNECTION_TIMEOUT
Maximum number of seconds an unused connection can remain in the cache. The connection cache will close and remove from the cache any connection that has been idle for longer than this specified limit.
Checking DBC file entries: Check Encrypted String for APPL_SERVER_ID parameter in the DBC file with entry in db using following sql stmt.These should be same.
Log in as apps/
Select server_id,server_address from FND_APPLICATION_SERVERS;

The output server_id should match APPL_SERVER_ID and server_address should match IPADDRESS of db host.

%nslookup Address: xxx.xx.xxx.xx Name: Address:
verify hostname above with db_host parameter in dbc file.

Checking db connectivity using DBC file :
------------------------------------------


syntax:

jre -v oracle.apps.fnd.security.AdminAppServer apps/ STATUS dbc=

Output :

Database Server
---------------
DATABASE_ID: *********
AUTHENTICATION: OFF

Application Server
------------------
APPL_SERVER_STATUS: VALID
APPL_SERVER_ID: 2CF3A427AB3AE01EE0439C143428E01E24739190873060609592242102215611


Status return's APPL_SERVER_ID and other db related info. This verifies DBC setup.

Thursday, March 29, 2007

Oracle Application Server - Intricacies

PL/SQL CARTRIDGE: Runs PL/SQL stored procedures in Oracle databases. It uses a Database Access Descriptor to locatethe database to which to connect. The cartridge can also run files that contain PL/SQL source code; itloads the contents of the file into the database and executes the code. The PL/SQL cartridge comeswith the PL/SQL Web Toolkit, which enables you to get information about the request, specify valuesfor HTTP headers such as the content type and cookies, and generate HTML tags.

JWEB CARTRIDGERuns Java applications: The JWeb cartridge contains a Java Virtual Machine that interprets thebytecodes for the Java application. When you configure the cartridge, you specify where the class filesfor the applications are located.

You can also use the JWeb cartridge to connect to and access data from databases in two differentways:
(1) You can use the pl2java utility, which generates Java methods for procedures and functions in thedatabase. You can then invoke the methods from your Java application just like regular Javamethods;

(2) You can use the JDBC interface, which enables you to execute SQL statements.The JWeb cartridge comes with the JWeb Toolkit, which enables you to get information about therequest, connect to the database, specify values for HTTP headers such as the content type andcookies, and generate HTML tags.

PERL CARTRIDGE Runs : Perl scripts. The Perl cartridge also comes with the oraperl module, which enables you to accessOracle Databases.

SESSIONS SERVICE : The Sessions service allows cartridges to be set up so that successive requests from a particular clientare handled by the same cartridge instance. This allows you to code your cartridge to maintain stateacross requests submitted by a specific client (browser). For example, if you are creating a shoppingcart cartridge, you can enable sessions in the cartridge so that it can remember the items that the clienthas in his shopping cart. Each client would have its own cartridge instance, and cartridge instance datawould not be shared across clients. You can enable and manage sessions in two ways:

1. You can enable sessions for your cartridge using the Oracle Application Server Manager. This iscalled configurable sessions”.

2. You can use the session API to manage sessions. This is called “programmatic sessions”.Programmatic sessions give you more control than configurable sessions.Sessions work with all listeners supported by Oracle Application Server.

CLIENTS : There are three kinds of clients that can use Oracle Application Server:Web browsers-these clients use HTTP to communicate with Oracle Application Server.Java applets-these clients run within web browsers equipped with client ORBs that communicate withthe Oracle Application Server ORB using IIOP.Java applications-these clients also use HTTP to communicate with Oracle Application Server. Butthis communication is limited to JCORBA instantiation and destruction only. To use the JCORBAobjects these clients communicate with the Oracle Application Server ORB directly using IIOP.

DISPATCHERS: A dispatcher manages a pool of cartridge server instances running on one or more nodes; eachcartridge server instance runs one or more cartridge instances. There is one dispatcher associated witheach listener on each node of a web site. When a listener receives an HTTP request that does notidentify a static HTML page or CGI program, it passes the request to its dispatcher, which assigns arequest to a cartridge instance of the appropriate type. This process is described in more detail inRequest Handling below.

REQUEST HANDLING:

Oracle Application Server can handle both HTTP requests from web browser clients, and CORBA/IIOP requests from Java applet and application clients by way of a client ORB.Life Cycle of an HTTP RequestThis diagram shows the sequence of events when a web browser client issues an HTTP request to aserver-side application

HTTP request life cycle.The dispatcher maintains a cache of available cartridge instances for each cartridge. When a requestarrives for a particular cartridge, the dispatcher routes the request to one of its cached cartridgeinstances of the appropriate type.
If the dispatcher has no such cartridge instance available, it requests that the Oracle Application Serverruntime creates a new cartridge server and creates the appropriate cartridge instance within thatcartridge server. The dispatcher then adds this cartridge instance to its cache and assigns the pendingrequest to it. When the request is complete, the new cartridge instance is available to handle a newrequest.

Thursday, February 15, 2007

Deadlock : The deadly Lock , is it really

Let's understand whats a deadlock

deadlock occurs when two or more users are waiting for data locked by each other. When this happens, these users are stuck (deadly embrased) and cannot continue processing.

Oracle automatically detects deadlocks and resolves them by rolling back one of the statements involved in the deadlock, thus releasing one set of data locked by that statement. The session that is rolled back will observe Oracle error: ORA-00060: deadlock detected while waiting for resource. Oracle will also write out a trace file with detailed information to the database's UDUMP directory.

Deadlocks are mostly caused by explicit locking because Oracle does not do lock escalation; nor use read locks. Multi-table deadlocks can be avoided by locking the tables in same order in all applications, thus preventing a deadlock condition.

Here is an example of how to simulate a deadlock error:

Session 1 lock table EMP:


SQL> UPDATE emp SET sal=sal+100;

14 rows updated.
Session 2 lock table DEPT:


SQL> UPDATE dept SET loc = 'Japan';
4 rows updated.
Session 1 now update DEPT. The session will hang waiting for a lock (not a deadlock yet!):


SQL> UPDATE dept SET loc = 'Japan';
Session 2 now update EMP, causing the deadlock:


SQL> UPDATE emp SET sal=sal+100;
Oracle will detect the deadlock and roll back one of these statements:


SQL> UPDATE emp SET sal=sal+100;
UPDATE emp SET sal=sal+100
*
ERROR at line 1:
ORA-00060: deadlock detected while waiting for resource

Other more obscure deadlock situations one needs to be aware of:

1) If you get ORA-60 errors on UPDATE and DELETE statements, where two processes wait for 'S' mode locks on each other's 'TX' enqueues, you are experiencing ITL shortage deadlocks". This cannot happen with INSERT statements, as Oracle doesn't wait on ITL (Interested Transaction List) slots for inserts, it will simply try to insert the row into the next available block.

To fix this, recreate the segment with higher INITTRANS and/or PCTFREE values. This will allow more space in the data blocks for Oracle to allocate more transaction entries (24 bytes at a time) when required.

Note: "ITL waits" can be monitored per segments by querying the sys.v_$segment_statistics view.

2) High transaction activity on tables with bitmap indexes. Bitmap indexes are only appropriate in read only/ read mostly environments. You can try to use a very high INITTRANS value for the bitmap index, however, it would be best to disable the index before heavy transactional activity, and to rebuild it when done.