Thursday, 4 December 2014

How to Enable\Disable large number of EBS users

To Disable/Enable bulk number of users in Oracle Applications, we can use the below API

apps.fnd_user_pkg.EnableUser =>To Enable Users
apps.fnd_user_pkg.DisableUser =>To Disable Users\End Date Users


Syntax:

The below synatx can be used for performing this activity.
We can modify the select statement in Cursor to customize according to need.

declare cursor cur1 is
select user_name from apps.fnd_user where LOWER(user_name) Not IN ('username','username', .......);
begin
for all_user in cur1 loop
apps.fnd_user_pkg.EnableUser(all_user.user_name);
commit;
end loop;
End



DECLARE
   CURSOR cur1
   IS
      SELECT user_name
        FROM fnd_user
       WHERE person_party_id IS NOT NULL;
BEGIN
   FOR all_user IN cur1
   LOOP
      apps.fnd_user_pkg.DisableUser (all_user.user_name);
      COMMIT;
   END LOOP;
END;

Script for Changing Oracle Application Users Password

We can use the below API for changing the EBS(fnd_user) user password.

 apps.fnd_user_pkg.changepassword 

Sample Script:

DECLARE
   v_user_name      VARCHAR2 (100) := 'HSINGH';

   v_new_password   VARCHAR2 (100) := :NEWPASSWORD;
   v_status         BOOLEAN := NULL;
BEGIN
   v_status := fnd_user_pkg.changepassword (v_user_name, v_new_password);


   COMMIT;
   DBMS_OUTPUT.put_line (
      'Password is changed successfully for the user=> ' || v_user_name);
EXCEPTION
   WHEN OTHERS
   THEN
      DBMS_OUTPUT.put_line (
            'Error encountered while restting password for user and the Error Detail is '
         || SQLERRM);
END;


The script can also be modified to reset bulk ebs user passworda. The below is a sample script, You need to modify as per you need.

Refer below syntax

DECLARE
   v_status   BOOLEAN;
   CURSOR c_user
   IS
      SELECT user_name
        FROM fnd_user
       WHERE     NVL (end_date, SYSDATE + 1) > SYSDATE
             AND user_name NOT IN ('SYSADMIN',
                                   'GUEST',
                                   'XML_USER',
                                   'APPSMGR',
                                   'PORTAL30',
                                   'PORTAL30_SSO');
BEGIN
   FOR user_name_list IN c_user
   LOOP
      BEGIN
         v_status :=
            fnd_user_pkg.ChangePassword (
               username      => user_name_list.user_name,
               newpassword   => 'welcome123');
      --  dbms_output.put_line('password sucessfully changed for' || user_name_list.user_name);

      EXCEPTION
         WHEN OTHERS
         THEN
            DBMS_OUTPUT.put_line (
                  'Error encountered while restting password for users and the Error Detail is '
               || SQLERRM);
      END;
   END LOOP;
END;

Clearing Middle Tier cache in Oracle Apps R12

For clearing cache in Apps R12 we can follow the below navigation steps.


  • Go to Functional Administrator Responsibility.
  • Click\Select Core Services Tab.
  • Click\Select Caching Framework Tab.
  • On Caching framework page click on Global configuration on left side pane.
  • In Cache policy click on "Clear ALL Cache" Button.
  • Click on Apply.

Not able to view Responsibilities assigned to Users in Oracle Application

If the responsibilities assigned to user in Oracle Application is not appearing then we need new need to follow below steps.

1 .Login as System Administrator 

2. Submit Concurrent Program ""Workflow Directory Services User/Role Validation' 

Parameters to be passed
Batch Size - 10000(default value)
Username for the user having issue- Pdash
Check_Dangling - Yes (Default value No)
Add missing user/role assignments - Yes (Default Value No)
Update WHO columns in WF tables - No (Default Value No)


This request would check all users and assigned responsibilities and will sync up users with attached responsibilities .
Users should be able to view assigned responsibilty once the program is completed succesfully.

How to apply ad merge Patch

Admrgpch utility is provided to merge mutliple application patches into single patch. This can help in saving time and effort for executing many patches again and again.
 
There are some restrictions with AD Merge, it can't be used to merge patches of different releases, platforms or parallel modes.
 
Syntax Walkthorugh
 
  
admrgpch  <source_directory> <destination_directory>

       admrgpch  <-s <source_directory>|-preinstall> -d <destination_directory>
                           [-master <master upgrade driver. Valid only
                                     with -preinstall or -driveronly options>]
                           [-verbose <level>] [-merge_name <pattern>]
                           [-manifest <filename>] [-logfile <filename>]
                           [-driveronly] [-admode]

Where 

 -help                                 Print help message.

 -verbose <level>              Can be one of: { 0(SILENT),
                                          1(QUIET), 2(VERBOSE) or 3(LOUD) }
                                          Default - 1(QUIET).


 -merge_name <pattern>  The name of the merged patch (up to 24 chars).
                                          Default - "merged".


 -s <source_directory>       Path of source directory where all patches to be
                                            merged have been unzipped.


 -d <destination_directory>  Path of destination directory where the merged
                                              patch will be created.


 -preinstall                        <APPL_TOP>/admin/<TWO_TASK>/preinstall is the
                                          source directory, like -s option


 -driveronly                         Merge only patch driver files. But files will not
                                            be copied.


 -master <upgrade driver>    Master upgrade driver to be merged with preinstall
                                              upgrade fix drivers


 -admode                              Only AD patches will be merged.
                                             By default non-AD mode


 -manifest <filename>        Full pathname of a file containing the list of
                                            patch zip files to be merged.
 -logfile <filename>           Admrgpch log file name.
                                           Default:"<CWD>/admrgpch.log".


Steps for patch merging.

1. Download all the patched which need to be merged.
2. Make a source directory .
    mkdir source_test
3. Unzip all the patches and copy them in source directory.
    source_test
   -bash-3.2$ ls
    16759426  17385991


4. Make a target directory
    mkdir target_test


5. Now run the below command to merge the patches.

 admrgpch -s source_test -d target_test -merge_name test_patch

Log:
Executing the merge of the patch drivers
 -- Processing patch: source_test/16759426
 -- Processing file: source_test/16759426/u16759426.drv
 -- Done processing file: source_test/16759426/u16759426.drv
 -- Done processing patch: source_test/16759426

 -- Processing patch: source_test/17385991
 -- Processing file: source_test/17385991/u17385991.drv
 -- Done processing file: source_test/17385991/u17385991.drv
 -- Done processing patch: source_test/17385991


Copying files...

Character-set converting files...
  2 unified drivers merged.
Patch merge completed successfully
Please check the log file at ./admrgpch.log.
6. Now do to target directory 
    cd target_test
    we can see that the merge patch is created with merged driver file.
$ cd target_test
$ ls
16759426_README.html  17385991_README.html  ad             b17385991.ldt  f17385991.ldt  j16759426_fnd.zip  metadata_files
16759426_README.txt   17385991_README.txt   b16759426.ldt  f16759426.ldt  fnd            j17385991_fnd.zip  u_test_patch.drv


Now use normal adpatch from target_test directory for  application of patches and pass u_test_patch.drv when prompted for driver file.

Patch

Finding Patch related to a Product in Oracle Apps

If we need to find patches applied related to a product then we can use the below script to find them.

SELECT *
  FROM apps.ad_bugs
 WHERE trackable_entity_abbr = '&product_name'


Example:

SELECT *
  FROM apps.ad_bugs
 WHERE trackable_entity_abbr = 'fnd'

 

Output Post Processor (OPP) in Oracle Applications R12 and 11i

Output Post Processor (OPP) in Oracle Applications R12 and 11i


What is Output Post Processor?

Concurrent Processing now uses the Output Post Processor (OPP) to enforce post-processing actions for concurrent requests.Post-processing actions are actions taken on

concurrent request output. An example of a post-processing action is that used in Concurrent Processing support of XML Publisher.

If a request is submitted with an XML Publisher template specified as a layout for the concurrent request output, then after the concurrent manager finishes running

the concurrent program, it will contact the OPP to apply the XML Publisher template and create the final output.

OPP runs as a service that can be managed through Oracle Applications Manager (OAM) from the System Activity page (Navigation: Applications Dashboard > Applications

Service (from the dropdown list) > Go).

How to Increase the number of Output Post Processors?
1.Log on to Applications with “System Administrator” responsibility.
2.Navigate to Concurrent -> Manager -> Define.
3.Query for the “Output Post Processor” service.
4.Click on “Work Shifts” and increase the number of processes

How to get OPP manager log file location?

$APPLCSF/log/<SID>/FNDOPP####.txt       OR
1,System Administrator > Concurrent > Manager > Administer
2,Search for ‘Output Post Processor’
3,Click the ‘Processes’ button .
4,Click the Manager Log button. This will open the ‘OPP’
Upload the OPP log file.

In some cases, Output Post Processor is not start up and it shows Actual and Target are showing different values when we query for Output Post Processor.
The log files shows that no error message.In this case apply the following possible solution for starting the OPP.


1. Shutdown the internal manager by using adcmctl.sh stop apps/apps
2. Make sure there is no FNDLIBR processe running:
$ ps -ef| grep FNDLIBR OR ps -ef|grep applprod|grep FNDLIBR
3. If there is any FNDLIBR processe please kill it $ kill -9 pid
4. Run cmclean.sql script as document from Note 134007.1
5. Restart the internal manager by using adcmctl.sh start apps/apps

or How to kill and start Output Post Processor (OPP) Background:
This article explains how to kill OPP and restart the same

Solution:
1,System Administator > Concurrent > Manager > Administer
2,Query "Output Post Processor" -> Processes button
Get the sytem id of "Output Post Processor"
3,ps -ef|grep [system id]
4,kill -9 [system id] in Unix
5,System Administator > Concurrent > Manager > Administer
6,Query "Output Post Processor" -> Restart button

Fixing Output Post-processor actions failed issues in EBS R12

Environment: Oracle EBS 12.1.3, Oracle Database 11gR2, RedHat Linux5
Symptoms:

Users unable to open the out files.

Concurrent requests failed with “Post-processing of request failed error message”

One or more post-processing actions failed. Consult the OPP service log for details.

No further attempts will be made to post-process this request.

Cause:

The concurrent manager process was able to successfully invoke the Output Post-Processor (OPP) but encountered a timeout as the OPP takes longer than the value

assigned to complete the job.

 Solution:

1,Increase the value of profile Concurrent: OPP Response Timeout . Bounce Apache and retest.
2,If the issue still exists, perform the following steps.
3,Increase the number of Output Post Processors as follows:
4,Increase the number of processes for Output Post Processor.
5,Additionally, ensure there is a setting of  oracle.apps.fnd.cp.opp.OPPServiceThread:2:0:max_threads=5 under Parameters.


For more details Please  check metalink I.E oracle.support

Concurrent Requests Fail Due to Output Post Processing (OPP) Timeout [ID 352518.1]
Ouput Post Processing Fails Due To java.lang.ThreadDeath [ID 427233.1]
Why Does OPP Intermittently Completes With Warnings and Error 'java.lang.OutOfMemoryError'? [ID 978495.1]


To know more this post is very nice http://knoworacleappsdba.blogspot.in/2012/07/all-about-output-post-processor-opp-in.html


How to start the Output Post Processing (OPP) in 11i
At least one OPP process active in the system. The concurrent processing uses the Output Post Processor (OPP) to enforce post-processing actions for concurrent requests. For example, post-processing action is that used in publishing concurrent requests with XML Publisher.

Actually when you have submit a request with XML Publisher template specified as a layout for the concurrent request output. Once finishes the concurrent manager concurrent program, it will contact the OPP to apply the XML Publisher template and create the final output

To activate the OPP follow these setps

The Profile Option "Concurrent: GSM Enabled" must be set to Y

Then:
1. Login to Apps with sysadmin responsibility
2. Navigate to: Concurrent -> Managers -> Define
3. Query for
Manager = 'Output Post Processor%'
or Short Name = FNDCPOPP
4. Check the checkbox "Enable" .
5. Click on 'Work Shifts button
6. see Work Shift of the OPP and
Set Processes = 1
and Parameters = oracle.apps.fnd.cp.opp.OPPServiceThread:2:0:max_threads=5
and Sleep Second = 30
7. Save

How to restart Oracle Apps 11i OPP via non unix command

It can be done using adcmctl.sh script only and there is no specific script for OPP. You can restart it from the application via (System Administrator responsibility > Concurrent > Manager > Administer), select "Output Post Processor" and click on the "Restart" button.


OPP Issue while generating the XML Output in apps 11i


Problem Description:
1, Few XML type concurrent programs taking long time and completed with warning OPP log file registered below error
      Caused by: java.lang.ThreadDeath
2, CPU utilization taking 100% constantly while running the concurrent programs.


Cause
The java.lang.ThreadDeath error indicates that the Output Post Processor has reached its processing timeout.

Solution
The following configuration changes are recommended to optimize the environment for these type of reports:
1. Increase the value of the Concurrent: OPP Timeout profile option to 10800 seconds.

2. Enable the scalability feature of XML Publisher:

1. Login as SYSADMIN
2. Responsibility: XML Publisher Administrator
3. Function: Administration
4. Set the following properties:
5. Temporary Directory
6. Use XML Publisher's XSLT processor: True
7. Enable scalable feature of XSLT processor: True   -- By default it’s false
8. Enable XSLT runtime optimization: True

> After changing the value also the problem still exist. As per the SR suggestion, we increased the java heap size from 1024M to 2048M.

a. Bring down the concurrent managers.

b. Use the Update statement below, for example:
update FND_CP_SERVICES
set DEVELOPER_PARAMETERS =
'J:oracle.apps.fnd.cp.gsf.GSMServiceController:-mx2048m'
where SERVICE_ID = (select MANAGER_TYPE from FND_CONCURRENT_QUEUES
where CONCURRENT_QUEUE_NAME = 'FNDCPOPP');

c. Bring concurrent managers up again

Please check below note's from oracle support

427233.1  :Output Post Processing Fails Due To java.lang.ThreadDeath
1268217.1: Output Post Processor (OPP) Log Contains Error “java.lang.OutOfMemoryError: Java heap space"
1266368.1: Output Post Processor (OPP) Log Contains Error   "java.lang.OutOfMemoryError"
978495.1: Why Does OPP Intermittently Completes With Warnings and Error 'java.lang.OutOfMemoryError'?
352518.1 :Concurrent Requests Fail Due to Output Post Processing (OPP) Timeout
364547.1 :Troubleshooting Oracle XML Publisher For The Oracle E-Business Suite