How to modify workflow administrator role in Oracle EBS?

By default, Workflow System administrator role is set to SYSADMIN User in Oracle EBS 11i/R12. This means only SYSADMIN user can have access to view Oracle workflow notifications of all the EBS users.
We can modify this to any other EBS user who has administrator rights or assign to a reponsibility. For Example, If we change Workflow System administrator to Responsinility name “Workflow Administrator Web Applications”, All users who are assigned with this responsibility can have access to view workflow details owned by other Oracle EBS users.


Let us identify the scenarios which require Workflow System administrator privilege.
– Workflow notification is errored and not processed to next approver
– There is an urgent requirement to delegate the workflow notification to another approver.
– Check the status of workflow notification
– Retry / Rewind the workflow notification
– Check the pending notifications for any Oracle EBS user
– Check Workflow Status Diagram


Steps to modify Workflow system administrator role in Oracle EBS 11i/R12


Workflow System Administrator can be changed in below ways.


1.update wf_resources set text=’&Enter_Admin_Name’ where name=’WF_ADMIN_ROLE’;


e.g
update wf_resources set text=’FND_RESP1:20420′ where name=’WF_ADMIN_ROLE’;




2. Change the value of Context file parameter s_wf_admin_role and run Autoconfig


$ cat $CONTEXT_FILE|grep wf_admin
         <username oa_var=”s_wf_admin_role” customized=”yes”>SYSADMIN</username>




3. Change it from Workflow Administrator Web Applications responsibility (Login as sysadmin >> Workflow Administrator Web Applications >> Administration




[Note: Ensure that context file parameter “s_wf_admin_role” is updated with modified value to preserve changes during autoconfig Run]

Resolve ORA-28545 When trying to access database link between Oracle database and MSSQL

Heterogenous database link between Oracle database and MSSQL was created using the below command.


SQL> create public database link mssql connect to “integration” identified by “*****” using ‘dg4msql’; 


Database link created. 


Error Message


SQL> select sysdate from dual@mssql 
2 ; 
select sysdate from dual@mssql 

ERROR at line 1: 
ORA-28545: error diagnosed by Net8 when connecting to an agent 
Unable to retrieve text of NETWORK/NCR message 65535 
ORA-02063: preceding 2 lines from MSSQL 




LISTENER_GTWY = 
(DESCRIPTION_LIST = 
(DESCRIPTION = 
(ADDRESS = (PROTOCOL = TCP)(HOST = oraclegtwy.dmn)(PORT = 1526)) 
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1526)) 


(SID_NAME=dg4msql) 
(ORACLE_HOME=/orabin/gateway_mssql/product/12.1.0/tghome_1) 
(ENV=”LD_LIBRARY_PATH=/orabin/gateway_mssql/product/12.1.0/tghome_1/dg4msql/driver/lib:/orabin/gateway_mssql/product/12.1.0/tghome_1/lib”) 
(PROGRAM=dg4msql) 



Resolution 
Listener file on the Oracle Database gateway server should look like below 


LISTENER_GTWY = 
(DESCRIPTION_LIST = 
(DESCRIPTION = 
(ADDRESS = (PROTOCOL = TCP)(HOST =oraclegtwy.dmn)(PORT = 1526)) 
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1526)) 




SID_LIST_LISTENER_GTWY =————————>Missing 
 (SID_LIST= 
 (SID_DESC= 
 (SID_NAME=dg4msql) 
 (ORACLE_HOME=/orabin/gateway_mssql/product/12.1.0/tghome_1) 
 (ENV=”LD_LIBRARY_PATH=/orabin/gateway_mssql/product/12.1.0/tghome_1/dg4msql/driver/lib:/orabin/gateway_mssql/product/12.1.0/tghome_1/lib”) 
 (PROGRAM=dg4msql) 
 ) 
 ) 

How to Compile Forms in Oracle Applications Release 11i and Release 12?



Steps to compile forms  in  Oracle Applications Release 12.1.x and 12.2.x


Login to Application Tier node as applmgr user


Change to $AU_TOP/forms/US


Execute the Below command to generate form files.


frmcmp_batch userid=apps/<password> module=formname.fmb
output_file=$PROD_TOP/forms/US/<name>.fmx module_type=form batch=no compile_all=special


After execution of the above command, verify there are no compilation errors in output displayed and the fmx is created succesfully.



Steps to compile forms  in  Oracle Applications Release 11i


Login to Application Tier node as applmgr user


Change to $AU_TOP/forms/US


Execute the Below command to generate form files.


f60gen module=$AU_TOP/forms/US/<custom_form>.fmb  userid=apps/<passwd> output_file=$PRODUCT_TOP/forms/<customformname>.fmx module_type=form compile_all=yes




Tips:


Use command “f60gen help=y” or “frmcmp_batch.sh help=y” to find the optional parameters.


Using Compile_all= yes changes cached version in the source file in addition to compiling pl/sql in the utput fmx file.



Oracle EBS DBA Utilities :FNDLOAD

What are the objects loaded using FNDLOAD in Oracle Applications?

FNDLOAD (Generic Loader) is a concurrent Program which is used to move metadata between database and text file representations.The loader reads a configuration file to determine what data to access.

FNDLOAD can download data from an application entity into a portable, editable text file. This file can then be uploaded into any other database to copy the data. Conversion between database store and file format is specified by a configuration file that is read by the loader. FNDLOAD downloads data from a database according to a configuration (.lct) file, and converts the data into a data file (.ldt file). FNDLOAD can then upload this data to another database using a configuration file.
The loader operates in one of two modes: download or upload. In the download mode, data is downloaded from the database to a text file; in the upload mode, data is uploaded from a text file to the database.

Syntax to upload/download concurrent Programs using FNDLOAD:

To Download:

FNDLOAD apps/** 0 Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct  PROGNAME.ldt PROGRAM APPLICATION_SHORT_NAME=”APPLICATION_SHORT_NAME CONCURRENT_PROGRAM_NAME=”Program_Name”



To Upload:


FNDLOAD apps/$apps_password 0 Y UPLOAD $FND_TOP/patch/115/import/afcpprog.lct PROGNAME.ldt UPLOAD_MODE=REPLACE CUSTOM_MODE=FORCE

Below are the application entities which can be uploaded/downloaded using FNDLOAD.

FND Messages
Lookups
EBS Front End Users
Responsibilities
Alerts
Concurrent Programs
Profile Options
Request Groups 
Menus

Adpatch Worker Fails with “ORA-01031: insufficient privileges”

While Applying Patch on Customer environment, adpatch failed with error


Worker log has the below error.
=====================
GRANT select on DBA_USERS_WITH_DEFPWD to em_oam_monitor_role


AD Worker error:
The following ORACLE error:


ORA-01031: insufficient privileges




occurred while executing the SQL statement:


GRANT select on DBA_USERS_WITH_DEFPWD to em_oam_monitor_role


Error occurred in file


/test12/applmgr/1200/ad/12.0.0/patch/115/sql/ademusr.sql


with arguments ‘&systempwd &un_fnd &pw_fnd &un_apps &pw_apps’.


==============



Solution
=========


1.Login to oracle database server as oracle user


2. Connect to sqlplus as sysdba and run the failed sql statement
sqlplus / as sysdba


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 – 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


SQL> GRANT select on DBA_USERS_WITH_DEFPWD to em_oam_monitor_role
  2  ;


Grant succeeded.


SQL>




3. Use adctrl to skip the failed worker (Option 8) and continue with Patching

How to Recover lost APPS Password in Oracle Applications R12?





Have you ever forgot or lost apps password in R12. In Oracle Applications 11i, It is easy to recover apps password as it is stored in application files appsweb.cfg and wdbsvr.app.
Apps password is not available in the application files in R12. We can still recover the lost password by creating a decrypt function.


Steps to retreive apps password in R12:


1.Create function Using below syntax


SQL> create or replace FUNCTION apps.decrypt_pin_func(in_chr_key IN VARCHAR2,in_chr_encrypted_pin IN VARCHAR2) RETURN VARCHAR2
AS
LANGUAGE JAVA NAME ‘oracle.apps.fnd.security.WebSessionManagerProc.decrypt(java.lang.String,java.lang.String) return java.lang.String’;
4
5 /


Function created.




2. Find the encrypted password using below query


SQL> select ENCRYPTED_FOUNDATION_PASSWORD from apps.fnd_user where USER_NAME=’GUEST’;


ENCRYPTED_FOUNDATION_PASSWORD
——————————————————————————–
JH89E045BEA551FD01A8D71029ACA879F209U8BD898F451EBDB987C818E7608CE0CC0167BDCAF9D1D04D9C9CEE418CFE615A




3.Run the below query to decrypt the password




SQL> SELECT apps.decrypt_pin_func(‘GUEST/ORACLE’,’JH89E045BEA551FD01A8D71029ACA879F209U8BD898F451EBDB987C818E7608CE0CC0167BDCAF9D1D04D9C9CEE418CFE615A’) from dual;


APPS.DECRYPT_PIN_FUNC(‘GUEST/ORACLE’,’ZG761B2FB6A2C49BC802F57E55AC26637388B4EA99
——————————————————————————–
PASSWORD




4. Verify Database Connection using the password retreived




SQL> conn apps/PASSWORD
Connected.

How to enable Trace for Application User in Oracle Applications 11i/R12?



Enabling Tracing for a Application User makes diagnostics easier to analyze.Since only the sql operations performed by a specific User are Traced.





Steps to Enable Trace for Application User:


1.Login to Oracle Applications and select the System Administrator responsibility. 
Navigate to  Profile –>  System 


2.Search for Profile Option ‘Initialization SQL Statement – Custom’ .Also Specify the username whom you wish to enable tracing during Search.


3.
Under username column Update the below line


BEGIN FND_CTL.FND_SESS_CTL(”,”, ”, ‘TRUE’,”,’ALTER SESSION SET TRACEFILE_IDENTIFIER=’||””||’USER_TRACE_IDENTIFER’ ||””||’ EVENTS =’||””||’ 10046 TRACE NAME CONTEXT FOREVER, LEVEL 12 ‘||””); END;


Note : Level cane be 4,8,12 depends on your requirement 




Save the Changes done in Profile Option


4. Be careful while updating the Profile Option, Any incorrect Syntax may Prevent user from Logging in


5. Inform User to Re-login and Perform the Activity which needs to be traced.


6. Trace Files can be found in the directory specified by “user_dump_directory” parameter on the database server.
Use the identifier given in Profile Option to search the trace file in udump directory.


7. After the issue is reproduced and required trace files are collected for analysis, disable Tracing from Front End.
Its recommended to disable the trace immediately after the diagnostics are collected, as it will generate huge logfiles.


8. Navigate to system=> Profile form under System Administrator Responsibility.


Query for the username  and Profile Option name “Initialization SQL Statement – Custom”


Remove the values and make it blank.


Save the changes.



Autopatch error: The worker should not have status ‘Running’ or ‘Restarted’ at this point

If you are restarting a failed patch session in oracle applications, sometimes you may encounter the error


AutoPatch error:
The worker should not have status ‘Running’ or ‘Restarted’ at this point.


Telling workers to quit…


All workers have quit.


Connecting to APPS……Connected successfully.


AutoPatch error:


Error running SQL and EXEC commands in parallel


Cause:


1. adpatch or adop process was killed from OS level while patch is being applied


2. Database shutdown or terminated






Solution:


Using adctrl utility, use option 4 to change the worker status to Failed




Review the messages above, then press [Return] to continue.


                    AD Controller Menu
     —————————————————


     1.    Show worker status


     2.    Tell worker to restart a failed job


     3.    Tell worker to quit


     4.    Tell manager that a worker failed its job


     5.    Tell manager that a worker acknowledges quit


     6.    Restart a worker on the current machine


     7.    Exit




Enter your choice [1] : 4


Enter the worker number(s)/range(s) or ‘all’ for all workers,
or press [Return] to go back to the menu : all


Status changed to ‘Failed’ for worker 1.
Status changed to ‘Failed’ for worker 2.
Status changed to ‘Failed’ for worker 3.
Status changed to ‘Failed’ for worker 4.
Review the messages above, then press [Return] to continue.






select option “1. Show Worker Status” , The worker status will be “Failed” 


Now select option 2. “2. Tell worker to restart a failed job” 




Enter the worker number(s)/range(s) or ‘all’ for all workers,
or press [Return] to go back to the menu : all


Status changed to ‘Fixed, restart’ for worker 1.
Status changed to ‘Fixed, restart’ for worker 2.
Status changed to ‘Fixed, restart’ for worker 3.
Status changed to ‘Fixed, restart’ for worker 4.




Restart adpatch 


In 11i, R12.1.X version of oracle applications


when applying patch using adpatch , Select option Yes When it prompts for


‘Do you wish to Continue with Previous adpatch Session’


In R12.2.x, Use restart and abandon parameters




adop phase=apply patches=123456 restart=yes abandon=no 


To restart the patch session from where it failed.