Thursday, 10 October 2013

Remote Diagnostic Agent(RDA) Analysis for WebLogic Admin/Managed Server

Remote Diagnostic Agent(RDA) Analysis for WebLogic Admin/Managed Server

RDA is a powerful tool to gather various important information about the setup in place. In this post I am discussing RDA for WebLogic Server.

1. Set Environmental Variables related to the domain to be profiled, by running: 
cd $DOMAIN_HOME/bin
. ./setDomainEnv.sh

2. Configure RDA to profile WebLogic Server related files:
cd $MW_HOME/oracle_common/rda
./rda.sh -S -p WebLogicServer

This will configure the RDA to include the relevant data for WLS. It will open a text wizard, will ask you some general questions, and set the environment for running a collection with WLS data.

3. Run RDA (with no parameters) to trigger the actual collection
cd $MW_HOME/oracle_common/rda
./rda.sh 

4. You can check then the output, on a browser. In the OUTPUT folder, look for "<YOUR_PREFIX>_start.htm".

This is very useful info for Oracle also to work on Service Request.

JVM Heap Tuning for OID Managed Server/WebLogic Server

JVM Heap Tuning for OID Managed Server/WebLogic Server

This is applicable for any weblogic Admin and Managed Server.
In $DOMAIN_HOME/servers/wls_ods1/logs/wls_ods1.log you would notice an error like this and OID managed server would go to UNKNOW status.

####<Jul 26, 2013 5:57:00 AM BST> <Error> <Kernel> <mkktestserver1.unixdomain.local> <wls_ods1> <[STUCK] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <39cb4812cad10e7e:-5dbeb3ba:14006f69c2f:-8000-0000000000005522> <1374814620626> <BEA-000802> <ExecuteRequest failed
java.lang.OutOfMemoryError: Java heap space.
java.lang.OutOfMemoryError: Java heap space
>

Solution

From nodemanager.properties I can observe that we are using start up scripts to bring up OID servers. From start up script I can see we are using a maximum of 1024M of heap which might not be sufficient.

JVM Heap is configured in the following file:
$DOMAIN_HOME/bin/setDomainEnv.sh

Go to the following line:
EXTRA_JAVA_PROPERTIES="${EXTRA_JAVA_PROPERTIES} -Didm.oracle.home=${IDM_ORACLE_HOME} -Xms512m -Xmx1024m -Xss512K -Djava.protocol.handler.pkgs=oracle.mds.net.protocol -Dweblogic.management.discover=false"
export EXTRA_JAVA_PROPERTIES

Since we are using a 64 bit JDK, it is well worth to try update memory settings to:
EXTRA_JAVA_PROPERTIES="${EXTRA_JAVA_PROPERTIES} -Didm.oracle.home=${IDM_ORACLE_HOME} -Xms2048m -Xmx2048m -Xss512K -Djava.protocol.handler.pkgs=oracle.mds.net.protocol -Dweblogic.management.discover=false"
export EXTRA_JAVA_PROPERTIES

Keep monitoring wls_ods1.log for Java Heap Space Issue.

applive IDMLIVE /opt/oracle/IDMLIVE_MW_HOME/WebLogic/user_projects/domains/IDMDomain/bin $ diff setDomainEnv.sh.43 setDomainEnv.sh
372c372
< EXTRA_JAVA_PROPERTIES="${EXTRA_JAVA_PROPERTIES} -Didm.oracle.home=${IDM_ORACLE_HOME} -Xms512m -Xmx1024m -Xss512K -Djava.protocol.handler.pkgs=oracle.mds.net.protocol -Dweblogic.management.discover=false"
---
> EXTRA_JAVA_PROPERTIES="${EXTRA_JAVA_PROPERTIES} -Didm.oracle.home=${IDM_ORACLE_HOME} -Xms2048m -Xmx2048m -Xss512K -Djava.protocol.handler.pkgs=oracle.mds.net.protocol -Dweblogic.management.discover=false"
applive IDMLIVE /opt/oracle/IDMLIVE_MW_HOME/WebLogic/user_projects/domains/IDMDomain/bin $

Upgrade OAM 11.1.2.0 to OAM 11.1.2.1

Upgrade OAM 11.1.2.0 to OAM 11.1.2.1

Recently I have upgraded OAM from 11.1.2.0 to 11.1.2.1.. Sharing the steps.. hope would be helpful.....

1. Stop OAM Admin and Managed Server

2. Download OAM R2PS1 from edelivery: https://edelivery.oracle.com/EPD/Download/get_form?egroup_aru_number=15364663. Just get the files V37472-01.zip (Parts 1 and 2 both)

3. Execute runInstaller >>> specify the existing 11.1.2.0 MW_HOME so it goes into upgrade mode. Follow the instruction in GUI.

4. Upgrade OAM Schema and any other products in the domain using PSA.

. $HOME/oamenv.sh
cd $ORACLE_HOME/bin
./psa
Follow the instruction in the GUI.

5. Start OAM Admin Server Only

. $HOME/oamenv.sh
echo $DOMAIN_HOME
nohup $DOMAIN_HOME/bin/startWebLogic.sh -Dweblogic.management.username=weblogic -Dweblogic.management.password=MalayFalsePass > $HOME/oamweblogic.log 2>&1 &

6. Update System Mbean Configuration

. $HOME/oamenv.sh
cd $ORACLE_HOME/common/bin
./wlst.sh

connect()
Please enter your username [weblogic] : weblogic
Please enter your password [welcome1] : MalayFalsePass
Please enter your server URL [t3://localhost:7001] : t3://mkktestserver1.unixdomain.local:7004

patchUpgrade('/opt/oracle/OAMDEV_MW_HOME/WebLogic/Oracle_IDM1')
copyMbeanXmlFiles('/opt/oracle/OAMDEV_MW_HOME/WebLogic/user_projects/domains/OAMDomain','/opt/oracle/OAMDEV_MW_HOME/WebLogic/Oracle_IDM1')

7. Stop OAM Admin Server using WebLogic Console

8. Apply BP01 on top of OAM 11.1.2.1 or the latest available bundle patch.

OAM Bundle Patch Release History (Doc ID 736372.1)

9. Apply OAM Thread/CPU Utilisation Patch 16971881 and other recommended patches.

10. Start OAM Admin and Managed Server

Start the Oracle WebLogic Administration Server for OAM:
. $HOME/oamenv.sh
echo $DOMAIN_HOME
nohup $DOMAIN_HOME/bin/startWebLogic.sh -Dweblogic.management.username=weblogic -Dweblogic.management.password=MalayFalsePass > $HOME/oamweblogic.log 2>&1 &

Start WebLogic Managed Server for OAM:
. $HOME/oamenv.sh
echo $DOMAIN_HOME
nohup $DOMAIN_HOME/bin/startManagedWebLogic.sh oam_server1 http://mkktestserver1.unixdomain.local:7004 \
-Dweblogic.management.username=weblogic -Dweblogic.management.password=MalayFalsePass \
-Dsun.security.krb5.debug=true -Dsun.security.spnego.debug=true -Dweblogic.system.StoreBootIdentity=true > $HOME/oammanaged.log 2>&1 &


How to Determine the Port used for ODSM

How to Determine the Port used for ODSM

Open $MW_HOME/user_projects/domains/IDMDomain/config/config.xml and look for the following content.

    <name>wls_ods1</name>
    <complete-message-timeout>480</complete-message-timeout>
    <idle-connection-timeout>480</idle-connection-timeout>
    <idle-periods-until-timeout>8</idle-periods-until-timeout>
    <dgc-idle-periods-until-timeout>9</dgc-idle-periods-until-timeout>
    <machine>mkktestserver1.unixdomain.local</machine>
    <listen-port>7006</listen-port>

ODSM URL: http://mkktestserver1.unixdomain.local:7706/odsm

Monday, 7 October 2013

Consolidated Recommendations for eBusiness Suite Maintenance/Performance/Betterment

1. Apply Recommended Performance Patches
Oracle E-Business Suite Recommended Performance Patches [ID 244040.1]

2. Gather Schema Statistics Schedule
Make sure Gather Schema Stats is running on periodical basis, we recommend to scheduled to run every 15 Days.
Identify tables which are excessively updated/deleted, gather stats and do rebuild indexes on those tables on 3/4 days interval.

3. Verify Optimizer Statistics Over a Period of 15 Days
Over a period of 25 Days monitor the Optimizer Statistics using bde_last_analyzed.sql.

This generates the output in HTML format which contains the following files:
>> bde_last_analyzed_ind_partitions.html
>> bde_last_analyzed_indexes.html
>> bde_last_analyzed_summary.html
>> bde_last_analyzed_tab_partitions.html
>> bde_last_analyzed_tables.html

Make sure in the database there is NO Stale Statistics, if so, identify the objects from the reports above and arrange a table/index(object level) statistics for the affected objects.

File bde_last_analyzed.sql can be downloaded from Metalink Note: bde_last_analyzed.sql - Verifies CBO Statistics [ID 163208.1]

4. Database Initialization Parameter as per Oracle Recommendations
Execute bde_chk_cbo.sql as APPS user and analyze the output.
File bde_chk_cbo.sql can be download from Oracle Support Metalink Note: bde_chk_cbo.sql - EBS initialization parameters - Healthcheck [ID 174605.1]
This will confirm that all obsolete parameters are commented out from Database and EBS Database is using the latest parameter set recommended by Oracle.

5. Tuning the Requirement of UNDO Tablespace
Parameters related to system undo, the database releases certified for use with Oracle E-Business Suite Release 12 only support the use of system managed undo (SMU).
SMU is more efficient than traditional rollback segments and reduces the possibility of snapshot too old (ORA-1555) errors.

>> Undo tablespace become crucial for elapse times of the concurrent jobs, and corresponding commit windows.
>> Setting this parameter to a value higher than 900 (the default) is recommended if you experience "ORA-1555: Snapshot too old" errors.
>> Automatic undo is not supported for LOBS

Error Message in Log File:
Adding new assignments ...
SHRD0018: Oracle database error trapped at function: GLBMBO - label: glbmbo4_err
  ORA-01555: snapshot too old: rollback segment number 448 with name "_S

Current value of UNDO_RETENTION was 900, changed to 14400 sec(4 Hour)
SQL> ALTER SYSTEM SET UNDO_RETENTION = 14400 SCOPE=BOTH; [ Make changes in initfile/ifile, so that it preserves ]

As this is changed from default value of 900 to 14400 add some extra space to undo tablespace also:
SQL> ALTER TABLESPACE APPS_UNDOTS1 ADD DATAFILE '+SUP01' AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED;


5. Setting up TEMP Tablespace

It is recommended that the temporary tablespace for Oracle E-Business Suite users be created using locally managed temp files with uniform extent sizes of 128K. The 128K extent size is recommended because numerous modules, such as Pricing and Planning, make extensive use of global temporary tables which also reside in the temporary tablespace. Since each user instantiates a temporary segment for these tables, large extent sizes may result in space allocation failures.

The following is an example of creating a locally managed temporary tablespace with temp files:

SQL> drop tablespace temp;
SQL> create temporary tablespace temp tempfile '<Temp DBF Name with Location>' size 4096M reuse extent management local uniform size 128K;
Add 3 similar tempfiles.

6. Database Initialization Parameter Sizing

Following is required for 500+ active users in LIVE system. We have done it in many production systems and run very well:
*.sga_target = 14G
*.shared_pool_size = 3G
*.shared_pool_reserved_size = 300M
*.streams_pool_size = 150M
*.java_pool_size = 1G
*.pga_aggregate_target = 20G
*.result_cache_max_size = 150M
*.db_cache_size = 2G
*.large_pool_size=300M
*.db_keep_cache_size = 500M
*.db_writer_processes = 3
*.processes = 2500
*.sessions = 5000
*.open_cursors = 1500

7. Performance Improvement By Disabling "Canceling Long-Running Queries" Features

>> On occasion, a user may start a long-running query, grow tired of waiting, and close the browser. This section considers the implications of such an action, and describes a new feature that can help in this situation.
>> The middle-tier Forms Server process is basically single-threaded, and queries are normally executed in Blocking mode. If the client is killed, the Forms Server process still waits for the query to complete. This means that the Forms Server process will only time out when control has been returned from the database, at which point it will terminate when it can no longer communicate with the PC client. Cleanup will also take place for the database session.
>> The same principle applies in the case of a long-running transaction that calls a stored procedure from client-side PL/SQL. The key point is that in all such cases the query must run to completion before the middle tier process terminates and cleanup takes place.
>> If the query takes longer than about 5 seconds, a dialog box will appear that allows the user to cancel the query by clicking a Cancel button. This Cancel Query feature (sometimes called Non-blocking mode, as it is based on SQL*Net non-blocking functionality) is the only way to terminate a query without killing the Forms session.

>> Set the profile option FND:ENABLE_CANCEL_QUERY to Yes in order to enable this feature.
>> This can be set at site, application, responsibility or user level. Setting this profile to Yes also adds a call to set_form_property in the standard APPCORE when-new-form-instance event, which sets the INTERACTION_MODE property to NON_BLOCKING.
>> Some customers may wish to enable cancel query for power users only due to the additional overheads. In this case the profile should be set at User level for these users only.

8. Faster Processing of Workflow Events

The "Workflow Background Process" program needs to be submitted in various permutation and combination. This would help in minimizing the load by avoiding picking up error or stuck workflow. Also, user wait time would be reduced. This has other many advantages like visibility of roles etc.

Type-1: which Runs Every 3 Mins for Parameters:
Process Deferred: Yes
Process Timeout:  No
Process Stuck:  No

Type-2: which Runs Every 30 Mins for Parameters:
Process Deferred:  No
Process Timeout:  Yes
Process Stuck:  No

Type-3: which Runs Every 1 Hours for Parameters:
Process Deferred:  No
"Process Timeout:  No
Process Stuck:  Yes"

Type-4: which Runs Every 3 Hours for Parameters:
Process Deferred:  Yes
"Process Timeout:  Yes
Process Stuck:  Yes"

9. FNDOPP and FNDSM Tuning

Increase Parallel Threads of Standard Manager and Output Post Processor

Following measures are taken so that business users feels their requests are processing faster:
>> Sleep Seconds for Standard Manager is reduced to 20 Seconds
>> Number of Parallel threads for FNDSM is increased to 20
>> Number of Parallel threads for FNDOPP is increased to 6
>> Sleep Seconds for Output Post Processor is reduced to 20 Seconds

Increase Java Heap Size for OPP:

Determine what the heap size per OPP process is currently:
select DEVELOPER_PARAMETERS from FND_CP_SERVICES where SERVICE_ID = (select MANAGER_TYPE from FND_CONCURRENT_QUEUES
where CONCURRENT_QUEUE_NAME = 'FNDCPOPP');

The default should be: J:oracle.apps.fnd.cp.gsf.GSMServiceController:-mx512m

Increase the Heap Space per Process to 1024:
update FND_CP_SERVICES set DEVELOPER_PARAMETERS = 'J:oracle.apps.fnd.cp.gsf.GSMServiceController:-mx1024m'
where SERVICE_ID = (select MANAGER_TYPE from FND_CONCURRENT_QUEUES where CONCURRENT_QUEUE_NAME = 'FNDCPOPP');

Stop the managers, run CMCLEAN, start the managers back to have the changes reflected.

Recommendation: Reports built with large images will require additional space.  So please insure there is adequate temp space and your code is optimized when running large reports/templates.

Implement Greater Heap Size for Large Template Reports:

Navigation: Responsibility: System Administrator >>> Concurrent >>> Program >>> Define >>> Query for the concurrent program

Set the value for the Executable Options : -Xmx2048m

Advantages: After discussing with all the developers, higher heap size is assigned to some large template reports. This would minimize the risk on OPP running with out of memory and better performance.

Use XML Scalable Features for Better performance on .xls template reports:

Navigation: Responsibility: XML Publisher Administrator >>> Administration (Tab) >>> Configuration

Under Temporary Directory pick a temporary file location on your concurrent processing node. This should be at least 5GB or 20x larger than largest XML data file you generate

Under FO Processing, set:
>> Use XML Publisher's XSLT processor set to True 
>> Enable scalable feature of XSLT processor set to False
>> Enable XSLT runtime optimization set to True


9. Schedule Obsolete Session Removal Conc Program

Concurrent Program Name: Remove obsolete sessions from fnd_sessions
Parameters: NONE

It is common fact in Oracle Apps that some sessions eixsts in FND_SESSIONS, but actually from gv$session the process has vanished. Sometime process is defunct in Application level.
By cleaning this we would have better performance.

10. Index on All Custom Tables Created in Custom Schema

During the Implementation cycle, we have followed that all Custom Tables should have proper indexes, so that we have better performance on all custom table fetching application. All the custom columns that are in use should be indexed.

Following query is used to determine the Indexes on the Custom Table:
SQL> Select INDEX_NAME, TABLE_NAME, TABLE_TYPE from DBA_INDEXES where OWNER='XXDOT' and TABLE_NAME like 'XX%';

11. JVM/OC4J - Application Performance Optimization

JVM: Guidelines to setup the Java Virtual Machine in Apps Ebusiness Suite 11i and R12 (Doc ID 362851.1)

Start with 4 JVMS for each, with 1024MB space, for example:
      -Xmx1024M -Xms512M -XX:MaxPermSize=256M
      -XX:NewRatio=2 -XX:+PrintGCTimeStamps

12. Interpret Database AWR/Statspack Report

Tune all the relavant SQLs, specially most buffer gets and most elapsed time ones.
Take DBAs steps like, creating composite indexes, gather stats and similar steps.

DBAs should try to eliminate all the bottlenecks mentioned in AWR/ADDM.

13. Schedule Purge Obsolete Workflow Runtime Data

The program "Purge Obsolete Workflow Runtime Data" calls database package WF_Purge.Total.  This program deletes old Workflow runtime data for completed Workflows. It is recommended that this program or package is run regularly as required.

From Workflow Administrator's Guide PDF Document:
The Oracle Applications Manager console helps you easily maintain the Oracle Workflow and Oracle XML Gateway database tables. Oracle Workflow and Oracle XML Gateway access several tables that can grow quite large with obsolete workflow information that is stored for all completed workflow processes, as well as obsolete information for XML transactions. The size of these tables and indexes can adversely affect performance. These tables should be purged on a regular basis, using the Purge Obsolete Workflow Runtime Data concurrent program.

Parameter Explanation:
Item Type: The item type to purge. Leaving this field blank defaults to purging the runtime data for all item types.
Item Key: The item key to purge. Leaving is field blank defaults to purging the runtime data for all item keys.
Age: Minimum age of data to purge, in days.
Persistence Type: The persistence type to be purged, either for Temporary or for Permanent. The default is temp.
Core Workflow Only: Enter 'Y' to purge only obsolete runtime data associated with work items, or 'N' to purge all obsolete runtime data as well obsolete design data. The default is 'N'.
Commit Frequency: Enter the number of records to purge before the program commits data. To reduce rollback size and improve performance, set this parameter to commit data after a smaller number of records. The default is 500 records.
Signed Notifications: Enter 'N' to preserve signature evidence, including notifications that required electronic signatures and their associated signature information. Enter 'Y' to purge signature-related information. The default is 'N'.

Note: After performing a commit, the program resumes purging work items with the next subsequent begin date. In some cases, if additional items have the same begin date as the last item that was purged before a commit, the program may not purge all eligible items. To purge these remaining work items, simply rerun the program.


14. OS Watcher to Verify Hardware Performance

OSWatcher Black Box Analyzer User Guide (Doc ID 461053.1)

15. Requirement of Flushing Shared Pool

On systems which use a lot of literal SQL the shared pool is likely to fragment over time such that the degree of concurrency which can be achieved diminishes. Flushing the shared pool will often restore performance for a while as it can cause many small chunks of memory to be coalesced. After the flush there is likely to be an interim spike in performance as the act of flushing may remove sharable SQL from the shared pool but does nothing to improve shared pool fragmentation. The command to flush the shared pool is:

SQL> ALTER SYSTEM FLUSH SHARED_POOL;

Contrary to reports elsewhere items kept in the shared pool using DBMS_SHARED_POOL.KEEP will NOT be flushed by this command. Any items (objects or SQL) actually pinned by sessions at the time of the flush will also be left in place.

NB: Flushing the shared pool will flush any cached sequences potentially leaving gaps in the sequence range. DBMS_SHARED_POOL.KEEP('sequence_name','Q') can be used to KEEP sequences preventing such gaps. 

16. Forms Dead Client Detection

>> Enable Forms Dead Client Detection using FORMS_TIMEOUT=10 (Value specified in minutes). Default 30 Minutes is two high and can cause performance issue.
>> Terminates fwebmx processes for dead clients.
>> Enable Forms Abnormal Termination Handle
>> Do not set FORMS_CATCHTERM
>> The above two variables ( FORMS_TIMEOUT and FORMS_CATCHTERM ) can be changed from CONTEXT_FLE XML.
>> In CONTEXT_FLE these parameters can be found as s_f60catchterm and s_f60time parameters for 11i users, s_forms_catchterm and s_forms_time for R12 users.

>> Developers have reviewed the Note Few Basic Techniques to Improve Performance of Forms. [ID 221529.1] for all Custom forms developed to maximize performance

Reference Metalink Notes: Oracle Forms in Applications FAQ [ID 177610.1]

17. Maintenance on Concurrent Request Related Tables/Data

Follow all the recommendations mentioned in following notes:
http://mkkoracleapps.blogspot.co.uk/2013/08/performance-tuning-on-ebs-concurrent.html

Ensure "Purge Concurrent Request and/or Manager Data, FNDCPPUR,"  is run at regular intervals with "Entity" parameter as "ALL".  A high number of records in FND_CONCURRENT tables can degrade the performance.
Functions of FNDCPPUR: It purges data on FND_CONCURRENT tables and log/output files.

Name: Purge Concurrent Request and/or Manager Data
Short Name: FNDCPPUR
Description: Purges Concurrent requests and/or Concurrent Manager data and log/output files

1. Entity: ALL
2. Mode: Age
3. Mode Value : 10
4. Oracle ID: NULL
5. User Name: NULL
6. Responsibility Application: NULL
7. Responsibility: NULL
8. Program Application: NULL
9. Program: NULL
10. Manager Application: NULL
11. Manager: NULL
12. Report: Y

13. Purge Other: Y

Thursday, 3 October 2013

Various URLs accessible for eBusiness

Various URLs accessible for eBusiness

Various URLs that you can test for eBusiness to verify that login/forms related components are working fine. This you can use to troubleshoot login/forms related issues with tracing on.

http://<server>.<domain>:<PORT>/OA_HTML/ServletPing 
http://<server>.<domain>:<PORT>/OA_HTML/OA.jsp?OAFunc=OAHOMEPAGE 
http://<server>.<domain>:<PORT> 
http://<server>.<domain>:<PORT>/OA_HTML/jsp/fnd/aoljtest.jsp 
http://<server>.<domain>:<PORT>/OA_MEDIA/FNDLOGOL.gif 
http://<server>.<domain>:<PORT>/forms/frmservlet 

Wednesday, 25 September 2013

How to determine if OACore JVM Sizing is Appropriate or Not

How to determine if OACore JVM Sizing is Appropriate or Not

cd $LOG_HOME/ora/10.1.3/opmn/
ls -ltr default_group~oacore*

grep 'Full GC' default_group~oacore* | wc -l
grep 'Unloading class' default_group~oacore* | grep 'Full GC' | wc -l

If you see there are multiple cases when Full GC is happening then, it is understood that JVM sizing in not proper.

Take following actions for this:
1. Increase the Number of OACore JVMs
2. Increase the JVM Heap Size
3. Make sure you are not using many parallel thread for GC.

Read the following for Sizing recommendations:
http://mkkoracleapps.blogspot.co.uk/2013/07/modoc4j-failed-to-find-failover-oc4j.html

Monday, 16 September 2013

Flush Shared Pool and Buffer Cache

SQL> ALTER PACKAGE FND_SSO_REGISTRATION COMPILE SPECIFICATION;
Package altered.

SQL> ALTER PACKAGE FND_SSO_REGISTRATION COMPILE BODY;
Package body altered.

SQL> ALTER PACKAGE FND_LDAP_WRAPPER COMPILE SPECIFICATION;
Package altered.

SQL> ALTER PACKAGE FND_LDAP_WRAPPER COMPILE BODY;
Package body altered.

SQL> show user;
USER is "SYS"

SQL> alter system flush buffer_cache;
System altered.

SQL> alter system flush shared_pool;
System altered.

Friday, 16 August 2013

Performance tuning on OID - Consolidated Details

Performance tuning on OID - Consolidated Details

OID_Perf_Reco_1: Set DSA config to skip referrals

This is applicable when there are no referrals setup in OID.

By default this capability IS ENABLED and severely impacts performance when large groups (>200K) or large number of nested groups are involved.

Definition: A referral is a special type of entry that when obtained in a search, it contains the location of the actual entry, which could be in another part of the directory tree or even in another ldap server altogether. Unless you have specifically set-up referrals you most likely do not have any.

Confirm, there is no "Referrals" in place in OID:
ldapsearch -h mkkoidserver1 -p XXXX -D "cn=orcladmin" -w "xxxxxxxxxxxxx" -s sub -b "" objectclass=referral

If this doesn't return any rows then, there are no referrals in place.

Set the value of orclskiprefinsql in DSA config, to 1. This would make DSA config to skip referrals.

ldapmodify -h mkkoidserver1 -p XXXX -D cn=orcladmin -w xxxxxxxxxxxxx << eof
dn: cn=dsaconfig,cn=configsets,cn=oracle internet directory
changetype: modify 
replace: orclskiprefinsql 
orclskiprefinsql: 1 
eof



OID_Perf_Reco_2: orclinmemfiltprocess is very expensive on Oracle Database

This attribute can help significantly with the performance of certain types of search operations. It has been identified to be particularly useful with OAM, as some of the searches OAM performs can be especially expensive in the database without the use of "orclinmemfiltprocess".

ldapmodify -h mkkoidserver1 -p XXXX -D "cn=orcladmin" -w "xxxxxxxxxxxxx" -v <EOF 
dn: cn=dsaconfig,cn=configsets,cn=oracle internet directory 
changetype: modify 
replace: orclinmemfiltprocess 
orclinmemfiltprocess:(|(!(obuseraccountcontrol=*))(obuseraccountcontrol=activated)) 
orclinmemfiltprocess:(|(obuseraccountcontrol=activated)(!(obuseraccountcontrol=*))) 
orclinmemfiltprocess:(obapp=groupservcenter)(!(obdynamicparticipantsset=*)) 
orclinmemfiltprocess:(objectclass=oblixworkflowinstance) 
orclinmemfiltprocess:(objectclass=inetorgperson) 
orclinmemfiltprocess:(objectclass=oblixorgperson) 
orclinmemfiltprocess:(objectclass=oblixworkflowstepinstance) 
EOF

For OID 11g it should come as default, cross check and apply, it it applicable for you.

OID_Perf_Reco_3: Run oidstats.sql Regularly as part of daily housekeeping/maintenance

Run oidstats.sql any-time large updates are made to the OID. For large Active Directories, where changes are very frequent, and AD to OID to synchronisation is enabled, this is a very good option to perform on regular basis.

. $HOME/oidenv.sh
cd $MW_HOME/Oracle_IDM1/ldap/admin
sqlplus ods/xxxxxxxxxxxxx@OIDDB
START oidstats.sql;

Remove Dangling DNs: http://mkkoracleapps.blogspot.co.uk/2013/10/remove-dangling-dns-from-oid.html

Sunday, 11 August 2013

Removing Configured WebLogic Server Domain

How to remove a domain from a WebLogic Server Installation... As it is just a domain deployment, no tool is required, just remove the appropriate content as given below.....

Make sure you are keeping a proper backup before performing the steps mentioned below:

1. Remove the domain directory $MW_HOME/user_projects/domains/<Domain_Name>
Here in this example I am removing: eag_domain, so issue the following command,

rm -rf $MW_HOME/user_projects/domains/eag_domain

2. Remove the line for eag_domain from domain-registry.xml file

$ cat domain-registry.xml
<?xml version="1.0" encoding="UTF-8"?>
<domain-registry xmlns="http://xmlns.oracle.com/weblogic/domain-registry">
  <domain location="/opt/oracle/OAMLIVE_MW_HOME/WebLogic/user_projects/domains/OAMDomain"/>
  <domain location="/opt/oracle/OAMLIVE_MW_HOME/WebLogic/user_projects/domains/eag_domain"/>


3. Remove the line for eag_domain from nodemanager.domains

cd $MW_HOME/wlserver_10.3/common/nodemanager

$ cat nodemanager.domains
#Domains and directories created by Configuration Wizard
#Fri Jul 12 11:44:27 BST 2013
eag_domain=/opt/oracle/OAMLIVE_MW_HOME/WebLogic/user_projects/domains/eag_domain
OAMDomain=/opt/oracle/OAMLIVE_MW_HOME/WebLogic/user_projects/domains/OAMDomain

Saturday, 10 August 2013

TABLESPACE Monitoring

Useful SQLs to monitor tablespace

Find the Tablespace which having less than 5% space left

This query will give the output for APPS_TS_TX_DATA & APPS_TS_TX_IDX tablespaces:
select trunc(sysdate), c.name, b.tablespace_name, tbs_size, tbs_size - a.free_space, a.free_space, round(a.free_space / tbs_size * 100, 0) per_free
from  (select tablespace_name, round(sum(bytes)/1024/1024/1024 ,2) as free_space from dba_free_space group by tablespace_name) a,
(select tablespace_name, sum(bytes)/1024/1024/1024 as tbs_size from dba_data_files group by tablespace_name) b, (select name from v$database) c
where a.TABLESPACE_NAME(+)=B.TABLESPACE_NAME and a.TABLESPACE_NAME like 'APPS_TS_TX%' and round(a.free_space / tbs_size * 100, 0) <= 5 order by 6;

This query will give the output for all tablespaces:
select trunc(sysdate), c.name, b.tablespace_name, tbs_size, tbs_size - a.free_space, a.free_space, round(a.free_space / tbs_size * 100, 0) per_free
from  (select tablespace_name, round(sum(bytes)/1024/1024/1024 ,2) as free_space from dba_free_space group by tablespace_name) a,
(select tablespace_name, sum(bytes)/1024/1024/1024 as tbs_size from dba_data_files group by tablespace_name) b, (select name from v$database) c
where a.TABLESPACE_NAME(+)=B.TABLESPACE_NAME and round(a.free_space / tbs_size * 100, 0) <= 5 order by 6;

Tablespace Percentage(%) Used

It will give How much Percentage(%) is already used for a Particular Tablespace

SET LINESIZE 200
SELECT A.TABLESPACE_NAME, ROUND(A.BYTES/1024/1024) "TOTAL", ROUND(B.BYTES/1024/1024) "USED", ROUND(C.BYTES/1024/1024) "FREE",
ROUND((B.BYTES*100)/A.BYTES) "% USED", ROUND((C.BYTES*100)/A.BYTES) "% FREE"
FROM SYS.SM$TS_AVAIL A, SYS.SM$TS_USED B, SYS.SM$TS_FREE C
WHERE A.TABLESPACE_NAME=B.TABLESPACE_NAME AND A.TABLESPACE_NAME=C.TABLESPACE_NAME AND A.TABLESPACE_NAME='&PLEASE_PROVIDE_TABLESPACE_NAME';

Add Datafile to Tablespace

SELECT * FROM dba_tablespace_usage_metrics ORDER BY used_percent;

SELECT max(bytes) FROM dba_free_space WHERE tablespace_name = 'APPS_TS_TX_DATA'; 
SELECT FILE_NAME FROM DBA_DATA_FILES WHERE TABLESPACE_NAME='<TS_NAME>' ORDER BY FILE_NAME;

ALTER TABLESPACE <TABLE_SPACE_NAME> ADD DATAFILE '<DBF_NAME_WITH_LOCATION>' SIZE 4096M;
ALTER TABLESPACE <TABLE_SPACE_NAME> ADD DATAFILE '<DBF_NAME_WITH_LOCATION>' SIZE 4096M autoextend on;
Alter database datafile '/xxxxx/xxxx/zpbdxx.dbf' autoextend on;

select ts.name||'|'||df.name||'|'||bytes/1024/1024||'|'||CREATE_BYTES/1024/1024 from v$tablespace ts, v$datafile df where ts.ts#=df.ts# and ts.name ='&TABLESPACE_NAME';

ALTER TABLESPACE <TS_NAME> ADD DATAFILE '<DBF_NAME_WITH_PATH>' SIZE 100M AUTOEXTEND ON NEXT 10M MAXSIZE 4096M;
ALTER TABLESPACE APPS_TS_TX_IDX ADD DATAFILE '/u01/UAT4/oracle/db/apps_st/data/APPS_TS_TX_IDX_002.dbf' SIZE 100M AUTOEXTEND ON NEXT 10M MAXSIZE 4096M;

Add Datafile to Tablespace Using Autoextent ON

ALTER TABLESPACE <TS_NAME> ADD DATAFILE '<DBF_NAME_WITH_PATH>' SIZE 100M AUTOEXTEND ON NEXT 10M MAXSIZE 4096M;
ALTER TABLESPACE APPS_TS_TX_IDX ADD DATAFILE '/u01/UAT4/oracle/db/apps_st/data/APPS_TS_TX_IDX_002.dbf' SIZE 100M AUTOEXTEND ON NEXT 10M MAXSIZE 4096M;

Resize Datafile

SQL> alter database datafile '/prod/oradata/custom01/prod/ts_custom_data13.dbf' resize 4096m;
SQL> alter database datafile '/prod/oradata/custom01/prod/ts_custom_data13.dbf' modify autoextend by 50m;



Thursday, 8 August 2013

Using staticports.ini for Oracle HTTP Server during OAM/EBS Integration

Using staticports.ini for Oracle HTTP Server during OAM/EBS Integration

Instead of 7777 of HTTP Server port, we had a requirement for 7778... 

HTTP WebTier Version 11.1.1.6

Create a file staticports.ini before starting the installation, and choose manual port configuration:

[OPMN]
OPMN Local Port = 6706
OPMN Remote Port = 6707

[OHS]
OHS Port = 7778
OHS Proxy Port = 9998
OHS SSL Port = 4444

[WEBCACHE]
Web Cache Listen Port = 7790
Web Cache Admin Port = 7791
Web Cache Statistics Port = 7792
Web Cache Invalidation Port = 7793
Web Cache SSL Port = 7794

appdev WEBTIERDEV /export/home/appdev $ opmnctl status -l

Processes in Instance: instance1
---------------------------------+--------------------+---------+----------+------------+----------+-----------+------
ias-component                    | process-type       |     pid | status   |        uid |  memused |    uptime | ports
---------------------------------+--------------------+---------+----------+------------+----------+-----------+------
webcache1                        | WebCache-admin     |   11620 | Alive    | 1319634190 |    12896 |  90:03:21 | http_admin:7791
webcache1                        | WebCache           |   11619 | Alive    | 1319634189 |    35176 |  90:03:21 | http_stat:7792,http_invalidation:7793,https_listen:7794,http_listen:7790
ohs1                             | OHS                |   11618 | Alive    | 1319634188 |     4680 |  90:03:21 | https:9998,https:4444,http:7778

appdev WEBTIERDEV /export/home/appdev $






Wednesday, 7 August 2013

Data Source/JDBC Connection Pool tuning for eBusiness AccessGate

Data Source/JDBC Connection Pool tuning for eBusiness AccessGate

I noticed, suddenly, eBusiness Access through Oracle Access Manager stopped working. When I looked into AccessGate Managed server log, I found the following informations.

Jul 30, 2013 10:16:52 AM oracle.apps.fnd.ext.sso.AppsHttpServletRequestWrapper <init>
SEVERE: Cannot retrieve LDAP information for guid='NOT_FOUND'
Jul 30, 2013 10:17:35 AM oracle.apps.fnd.ext.sso.EbsServer$2 load
SEVERE: Failed to get server connection server=113
weblogic.jdbc.extensions.PoolLimitSQLException: weblogic.common.resourcepool.ResourceLimitException: No resources currently available in pool EBSLIVE to allocate to applications, please increase the size of the pool and retry..
at weblogic.jdbc.common.internal.JDBCUtil.wrapAndThrowResourceException(JDBCUtil.java:252)
at weblogic.jdbc.common.internal.RmiDataSource.getPoolConnection(RmiDataSource.java:456)

Solution

This is purely data source related issue. When you deploy AccessGate for eBusiness Suite, the ANT deployment create the data source also.

Login to WebLogic Console >>> Services >>> Data Source >>> Click on the Data Source EBSLIVE >>> Connection Pool Tab >>> Advanced

Set Initial Capacity = Max capacity of JDBC connection pool
Set Inactive Connection Timeout to 5 Minutes
Increase Maximum Capacity Value from Default Value of 15 to 30.

Restart AccessGate Managed and Admin Server....

How to Start Complete OAM Fusion Middleware Stack

How to Start Complete OAM Fusion Middleware Stack

Start OID Components:

Start the Oracle WebLogic Administration Server for OID:
. $HOME/oidenv.sh
echo $DOMAIN_HOME
nohup $DOMAIN_HOME/bin/startWebLogic.sh -Dweblogic.management.username=weblogic -Dweblogic.management.password={{{WebLogicPass}}} > $HOME/oidweblogic.log 2>&1 &

Start OID OPMN Component:
. $HOME/oidenv.sh
opmnctl startall
opmnctl status
opmnctl status -l

Start WebLogic Managed Server for OID:
. $HOME/oidenv.sh
nohup $DOMAIN_HOME/bin/startManagedWebLogic.sh wls_ods1 http://mkkoamoidserver1:7001 -Dweblogic.management.username=weblogic -Dweblogic.management.password={{{WebLogicPass}}} -Dweblogic.system.StoreBootIdentity=true > $HOME/oidmanaged.log 2>&1 &

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

Start OAM Components:

Start the Oracle WebLogic Administration Server for OAM:
. $HOME/oamenv.sh
echo $DOMAIN_HOME
nohup $DOMAIN_HOME/bin/startWebLogic.sh -Dweblogic.management.username=weblogic -Dweblogic.management.password={{{WebLogicPass}}} > $HOME/oamweblogic.log 2>&1 &

Start WebLogic Managed Server for OAM:
. $HOME/oamenv.sh
echo $DOMAIN_HOME
nohup $DOMAIN_HOME/bin/startManagedWebLogic.sh oam_server1 http://mkkoamoidserver1:7002 \
-Dweblogic.management.username=weblogic -Dweblogic.management.password={{{WebLogicPass}}} \
-Dsun.security.krb5.debug=true -Dsun.security.spnego.debug=true -Dweblogic.system.StoreBootIdentity=true > $HOME/oammanaged.log 2>&1 &

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


Start HTTP WebTier:

. $HOME/webtierenv.sh
opmnctl startall
opmnctl status
opmnctl status -l

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


Start EBS Access Gate:

Start WebLogic AdminServer:
. $HOME/eagenv.sh
echo $DOMAIN_HOME

nohup $DOMAIN_HOME/bin/startWebLogic.sh -Dweblogic.http.isWLProxyHeadersAccessible=true \
-Dweblogic.management.username=weblogic -Dweblogic.management.password={{{WebLogicPass}}} > $HOME/eagweblogic.log 2>&1 &

Start WebLogic Managed Server:
. $HOME/eagenv.sh
echo $DOMAIN_HOME

nohup $DOMAIN_HOME/bin/startManagedWebLogic.sh eag_server1 http://mkkoamoidserver1:7041 \
-Dweblogic.http.isWLProxyHeadersAccessible=true \
-Dweblogic.management.username=weblogic -Dweblogic.management.password={{{WebLogicPass}}} \
-Dweblogic.system.StoreBootIdentity=true > $HOME/eagmanaged.log 2>&1 &

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

Sunday, 4 August 2013

You have encountered an unexpected PLSQL Error, Please contact System Administrator

You have encountered an unexpected PLSQL Error, Please contact System Administrator

Justification: Cloning has de-registered the EBS instance from OID, and that is the reason, Autolink of user from EBStoOID is not happening.

If you manually update the user with the GUID information, single sign-on is working fine.

When enabled FND Debug, in fnd_log_messages I noticed the following:

106500486|fnd.plsql.oid.fnd_ldap_util.get_oid_session: |ORA-31202: DBMS_LDAP: LDAP client/server error: Invalid credentials|
106500487|fnd.plsql.oid.fnd_ldap_util.c_get_oid_session: |ORA-31202: DBMS_LDAP: LDAP client/server error: Invalid credentials|
106500488|fnd.plsql.oid.fnd_oid_plug.get_realm_dn: |END ->ORA-31202: DBMS_LDAP: LDAP client/server error: Invalid credentials|
106500489|fnd.plsql.oid.fnd_ldap_wrapper.create_user: |ORA-31202: DBMS_LDAP: LDAP client/server error: Invalid credentials|

**** This happened during one of my GOLIVE and during the cutover we window we had the cloning of production is also involved...

**** Solution is straight forward... OID component has been deregistered during the cloning process...

Register using following command:
$FND_TOP/bin/txkrun.pl -script=SetSSOReg -registeroid=yes -provisiontype=4

How to Turn Archiving OFF/ON

How to Turn Archiving OFF/ON

1. Shut down the database instance
SQL> shutdown immediate

2. Start up a new instance and mount, but do not open the database
SQL> startup mount

3. Put the database into archivelog mode/noarchivelog mode
SQL> alter database noarchivelog;
SQL> alter database archivelog;                                  >>>>>>>>>>> IF YOU NEED TO TURN ON ARCHIVING

4. Open the database
SQL> alter database open; 

5. Verify your database is now in noarchivelog/archivelog mode.
SQL> ARCHIVE LOG LIST
Database log mode                   Archive Mode
Automatic archival                    Disabled
Archive destination                   USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence         22
Next log sequence to archive      24
Current log sequence                 24

SQL> alter system switch logfile;

RMAN Archive Log Delete - Ready Reference

RMAN Archive Log Delete - Ready Reference

Archive Log Location: 


select name from SYS.V_$ARCHIVED_LOG;

I use the following archive log delete command, and that solve my purpose:

RMAN> delete noprompt archivelog all completed before 'SYSDATE-3' backed up 01 times to device type disk;
RMAN> DELETE FORCE NOPROMPT OBSOLETE RECOVERY WINDOW OF 2 DAYS DEVICE TYPE DISK;
RMAN> DELETE FORCE NOPROMPT OBSOLETE REDUNDANCY = 2 DEVICE TYPE DISK;
RMAN> DELETE NOPROMPT FORCE ARCHIVELOG UNTIL TIME 'SYSDATE-1' DEVICE TYPE DISK;
RMAN> DELETE NOPROMPT FORCE ARCHIVELOG UNTIL TIME 'SYSDATE-1/2' DEVICE TYPE DISK;
RMAN> DELETE NOPROMPT FORCE ARCHIVELOG UNTIL SEQUENCE 260 DEVICE TYPE DISK;


Archive Log List:

RMAN> list archivelog all;
RMAN> list copy of archivelog until time ‘SYSDATE-10′;
RMAN> list copy of archivelog from time ‘SYSDATE-10′
RMAN> list copy of archivelog from time ‘SYSDATE-10′ until time ‘SYSDATE-2′;
RMAN> list copy of archivelog from sequence 1000;
RMAN> list copy of archivelog until sequence 1500;
RMAN> list copy of archivelog from sequence 1000 until sequence 1500;

Archive Log Delete:

RMAN> delete archivelog all;
RMAN> delete archivelog until time ‘SYSDATE-10′;
RMAN> delete archivelog from time ‘SYSDATE-10′
RMAN> delete archivelog from time ‘SYSDATE-10′ until time ‘SYSDATE-2′;
RMAN> delete archivelog from sequence 1000;
RMAN> delete archivelog until sequence 1500;
RMAN> delete archivelog from sequence 1000 until sequence 1500;

Friday, 2 August 2013

Oracle Access Manager 11gR2 for eBusiness R12.1.3

Oracle Access Manager 11gR2 for eBusiness R12 12.1.3

Two weeks back, I completed another Access Manager Implementation to provide zero sign to eBusiness Suite 12.1.3.



I have used following versions for this implementation:


Oracle Access Manager: 11.1.2.0
Oracle Identity Management: 11.1.1.6
Oracle Access Manager WebGate: 11.1.2.0
Oracle E-Business Suite AccessGate: 1.2
Oracle Fusion Middleware WebTier 11.1.1.7
Oracle Database for RCU: 11.2.0.3
Oracle E-Business Suite Release 12: 12.1.3


  • For Windows Native Authentication we had Windows Server 2003 AD.
  • Most of the client Machines are Windows 7, also tested from Mac OS.

Another level of complexity was to integrate Oracle Access Manager with Microsoft UAG. For external users UAG is delegating the Kerberos Authentication with WNA CredCollector on behalf of user.


  • AD to OID Synchronisation with, of more than 70K records.
  • External Authentication Plugin Set-up AD ldapbind and AD ldapcompare) in case, WNA is not operational.

  • In front of OAM, F5 Load balancer and similarly for access gate another F5 Load balancer  SSL termination is happening at F5 Level. As UAG is in picture, Proxy Header SSL is also implemented.

Also, in one of the Development Server 2 Instances of Test OAM Installation is really a good experience. Still I am struggling to find the reason, let me call it as Installation#1(first installation) and Installation#2.

If I start Installation#2 after server reboot, then I am unable to start Installation#1. Reverse is not true.

Another good experience is Playing with KVNO. If you set password for a user, used for keytab file, multiple time, KVNO goes into three digit and kerberos would not work, until and unless you mention -kvno in the command line argument.


Though in terms of Identity and Access Management it was 5th Implementation Project, but for various complexities it was pleasant experience to explore.