How to find out user id, responsibility id and application id in oracle apps

Here we will know how to get user id, responsibility id and application id in EBS.


To know about User Id use below Query:-

$SQL> select user_id from fnd_user where user_name='SETUPADMIN'; 



To know about Responsibility id use below Query:-

$SQL> select responsibility_id,RESPONSIBILITY_NAME from fnd_responsibility_vl where responsibility_name like '%India%Local%Payables%';



To Know about Application id use below Query:-

$SQL>select APPLICATION_ID from fnd_responsibility_vl where responsibility_id=50366;


To Know about Org id from po:-

$SQL>select org_id from po_headers_all where segment1='&PO';


To know about Requisition Org id from requisition number:-

$SQL>select hr.name, prh.segment1, prh.org_id from po_requisition_headers_all prh, hr_all_organization_units hr where prh.org_id = hr.organization_id and prh.segment1 = '&Enter_Req_Number';

Configuring HugePages on Linux

The operating system keeps each 4 KB of memory as a page. When it allocates pages to the database System Global Area (SGA), the operating system kernel must continually update its page table with the page life cycle (dirty, free, mapped to a process, and so on) for each 4 KB page allocated to the SGA.


The operating system page table (virtual memory to physical memory mapping) is smaller, because each page table entry is pointing to pages from 2 MB to 256 MB.


Also, the kernel has fewer pages whose lifecycle must be monitored. For example, if you use HugePages with 64-bit hardware, and you want to map 256 MB of memory, you may need one page table entry (PTE). If you do not use HugePages, and you want to map 256 MB of memory, then you must have 256 MB * 1024 KB/4 KB = 65536 PTEs.


HugePages provides the following advantages:

👉Increased performance through increased TLB hits.

👉Pages are locked in memory and never swapped out, which provides RAM for shared memory structures such as SGA.

👉Contiguous pages are preallocated and cannot be used for anything else but for System V shared memory (for example, SGA).

👉Less bookkeeping work for the kernel for that part of virtual memory because of larger page sizes.


Configuring HugePages on Linux:-

Follow the below steps to configure the Hugepages in linux operating system.


Check if kernal support hugepages.

$ grep Huge /proc/meminfo

AnonHugePages:         0 kB

HugePages_Total:       0

HugePages_Free:        0

HugePages_Rsvd:        0

HugePages_Surp:        0

Hugepagesize:       2048 kB


The default HugePage size is 2MB on Oracle Linux 5.x and as you can see from the output below, by default no HugePages are defined.

Create a file called "hugepages_setting.sh" with the following contents.


#!/bin/bash

# hugepages_setting.sh

# Linux bash script to compute values for the

# recommended HugePages/HugeTLB configuration

# Note: This script does calculation for all shared memory

# segments available when the script is run, no matter it

# is an Oracle RDBMS shared memory segment or not.

# Check for the kernel version

KERN=`uname -r | awk -F. '{ printf("%d.%d\n",$1,$2); }'`

# Find out the HugePage size

HPG_SZ=`grep Hugepagesize /proc/meminfo | awk {'print $2'}`

# Start from 1 pages to be on the safe side and guarantee 1 free HugePage

NUM_PG=1

# Cumulative number of pages required to handle the running shared memory segments

for SEG_BYTES in `ipcs -m | awk {'print $5'} | grep "[0-9][0-9]*"`

do

   MIN_PG=`echo "$SEG_BYTES/($HPG_SZ*1024)" | bc -q`

   if [ $MIN_PG -gt 0 ]; then

      NUM_PG=`echo "$NUM_PG+$MIN_PG+1" | bc -q`

   fi

done

# Finish with results

case $KERN in

   '2.4') HUGETLB_POOL=`echo "$NUM_PG*$HPG_SZ/1024" | bc -q`;

          echo "Recommended setting: vm.hugetlb_pool = $HUGETLB_POOL" ;;

   '2.6' | '3.8' | '3.10' | '4.1' | '4.14' ) echo "Recommended setting: vm.nr_hugepages = $NUM_PG" ;;

    *) echo "Unrecognized kernel version $KERN. Exiting." ;;

esac

# End


Execute as below to check recommended value for vm.nr_hugepages.

$sh hugepages_setting.sh

Recommended setting: vm.nr_hugepages = XXXXX


Calculate Hugepages manually.

SGA_TARGET=50G

SGA / Hugepagesize = Number Hugepages

52428800/2048       =25600


Calculate the Security Limits for Oracle.

Number Hugepages * Hugepagesize = minimum Memlock

/etc/security/limits.conf

25600*2048      = 52428800

$sysctl -p


Modify the file

#vi /etc/security/limits.conf

oracle               soft    memlock 52428800

oracle               hard    memlock 52428800


Run the following command as the "root" user.

#sysctl -p


Check if Memlock correct?

ulimit -l


Disabling Transparent HugePages (RHEL6/OL6 and RHEL7/OL7)


For Oracle Linux 6 the preferred method to disable Transparent HugePages is to add "transparent_hugepage=never" to the kernel boot

The following instruction are for Redhat 6 or lower, Oracle Linux 6 or lower, and SLES 11 or lower:


To check if the Transparent HugePages are enabled in your server execute the following:


Default/Enabled setting is  [always]:


# cat /sys/kernel/mm/transparent_hugepage/enabled

[always] never


To disable Transparent HugePages boot time


echo never > /sys/kernel/mm/transparent_hugepage/enabled

echo never > /sys/kernel/mm/transparent_hugepage/defrag

before reboot.


ulimit -l

64


Reboot the Server.


After reboot, check HugePages correctly configured and in use?

echo 1 > /proc/sys/vm/drop_caches


#grep Huge /proc/meminfo

grep Huge /proc/meminfo

AnonHugePages:         0 kB

HugePages_Total:   25604

HugePages_Free:      682

HugePages_Rsvd:      678

HugePages_Surp:        0

Hugepagesize:       2048 kB


Check the MEMORY_TARGET parameters are not set for the database and SGA_TARGET and PGA_AGGREGATE_TARGET parameters are being used instead.

SQL> show parameter target


NAME                                      TYPE        VALUE

------------------------------------ ----------- ------------------------------

archive_lag_target                    integer     0

db_flashback_retention_target   integer     1440

fast_start_io_target                   integer     0

fast_start_mttr_target               integer     0

memory_max_target                 big integer 0

memory_target                         big integer 0

parallel_servers_target              integer     8

pga_aggregate_target               big integer 10G

sga_target                                big integer 50G


How to Enable Personalization Page link in OAF Pages


To Enable Personalization Page link in OAF Pages. We need to be set the below profile for on site or user level. 


FND: Personalization Region Link Enabled ->Yes

Personalize Self-Service Defn ->Yes

Disable Self-Service Personal ->No



Once you set the above profile, after that we will able to see the Personalization page after fresh login.


How to find PID by SID in oracle

Use Below Query to find out OS PID using SID in oracle.


select s.sid,s.serial#,p.spid os_pid,s.status, s.osuser ,s.username, s.COMMAND,s.MACHINE,s.MODULE, s.SCHEMANAME,s.LOCKWAIT,s.action from v$session s, v$process p WHERE s.paddr = p.addr and s.sid =&SID

Find sid from concurrent request in EBS

In this post we will learn how to find SID of any running Concurrent Request.


Use below Query to find out SID of Concurrent Request:-

SELECT a.request_id, d.sid, d.serial# ,d.osuser,d.process , c.SPID FROM apps.fnd_concurrent_requests a,apps.fnd_concurrent_processes b,v$process c,v$session d WHERE a.controlling_manager = b.concurrent_process_id AND c.pid = b.oracle_process_id AND b.session_id=d.audsid AND a.request_id = &Request_Id AND a.phase_code = 'R'; 


EBS Concurrent Manager (Internal Manager) Does Not Start status shows Actual 1 and Target 0 Processes

In this post we will learn how to  fix "internal manager actual 1 target 0' issue in EBS.

Some time Internal Manager not started properly due to this issue it shows actual 1 and target 0. In this scenario we will learn how to fix this issue.


First of all we need to identify the actual system pid of Internal Manager.




$ps -ef|grep FNDLIBR

applmgr  35531 35526  0 13:02 pts/0    00:00:01 FNDLIBR

or 

click on internal manager and check the process and kill them.

$kill -9 35531 


Start the concurrent manager:-


Source the environment.

$$ADMIN_SCRIPTS_HOME/adcmctl.sh start

$$ADMIN_SCRIPTS_HOME/adcmctl.sh status