Tuesday, February 28, 2017

How to remove Custom DFF


Delete DFF Context
===============
Declare
  Cursor dff_context_cur Is
    Select fdfc.descriptive_flex_context_code
          ,fdfc.descriptive_flexfield_name
          ,fdfc.application_id
    From fnd_descr_flex_contexts fdfc
    Where fdfc.descriptive_flexfield_name = 'Your DFF NAME';
Begin
  For i In dff_context_cur
  Loop
    Fnd_Descr_Flex_Contexts_Pkg.Delete_Row ( i.application_id, i.descriptive_flexfield_name, i.descriptive_flex_context_code);
  End Loop;
END;

Remove Column Usage
=================
Declare
  Cursor dff_col_usage_cur Is
        Select fdfcu.application_column_Name
              ,fdfcu.Descriptive_Flex_Context_Code
              ,fdfcu.Descriptive_Flexfield_Name
              ,fdfcu.Application_id
        From fnd_Descr_Flex_Column_Usages fdfcu
        Where fdfcu.Descriptive_Flexfield_Name = 'Your DFF NAME';
Begin
  For i IN dff_col_usage_cur
  Loop
    Fnd_Descr_Flex_Col_Usage_Pkg.Delete_Row (i.Application_id,i.Descriptive_Flexfield_Name,i.Descriptive_Felx_Context_Code,i.application_column_Name);
End Loop;
End;

Last Remove the registered DFF completely
===============================
Declare
  Cursor dff_flex_cur Is
      Select fdf.Descriptive_Flexfield_Name
              ,fdf.Application_id
      From Fnd_Descriptive_Flexs fdf
      Where fdf.Descriptive_Flexfield_Name = 'Your DFF Name';
Begin
  For i In dff_flex_cur
  Loop
    Fnd_Descriptive_Flexs_Pkg.Delete_Row (i.Application_id,i.Descriptive_Flexfield_Name);
  End Loop;
End;

Monday, July 11, 2016

How to delete Business Event and Subscription




Declare
   Cursor c_event_cur
   Is
     Select we.guid event_guid
           ,wes.guid subscription_guid
     From wf_events we
           ,wf_event_subscriptions wes
     Where we.name = 'sat.oracle.apps.xxpm.generateProposal'  -- your custom event name
     And wes.event_filter_guid = we.guid;  
Begin
   For i in c_event_cur
   Loop
      wf_events_pkg.delete_row(i.event_guid);
      wf_event_subscriptions_pkg.delete_row(i.subscription_guid);
   End Loop;
   commit;
Exception  
   When Others Then
      dbms_output.put_line(sqlerrm);
End;

Saturday, June 11, 2016

After Sucessful Cloning: FRM 92101 issues on cloned instance while starting forms


I setup my clone instance successfully, but when login into forms application getting following error message:

Form starting with error

oracle.forms.net.ConnectionException: Forms session <1> aborted: unable to communicate with runtime process.
  at oracle.forms.net.ConnectionException.createConnectionException(Unknown Source)

I checked the following forms log files:
formsstd.err and formsstd.out

formsstd.out:

16/06/10 09:31:36 Oracle Containers for J2EE 10g (10.1.3.5.0)  initialized
16/06/10 09:35:01 ListenerServlet init()
16/06/10 09:35:02 Forms session <1> aborted: unable to communicate with runtime process.
16/06/10 09:54:12 Shutting down...
16/06/10 09:55:14 FormsServlet init():
    configFileName:     /u02/app/oracle/PROD/inst/apps/CLONE_XXXXX/ora/10.1.2/forms/server/appsweb.cfg
    testMode:           false

Solution:

Compile all menus and application forms using adadmin tool



R12.1.3: adcfgclone.pl failed with afcpctx.sh INSTE8_PRF 136


R12.1.3 application tier cloning script was failed with following error:

 [PROFILE PHASE]
  AutoConfig could not successfully execute the following scripts:
    Directory: /u02/app/oracle/PROD/inst/apps/CLONE_<CONTEXT_NAME>/admin/install
      afcpctx.sh              INSTE8_PRF         136


AutoConfig is exiting with status 1

RC-50014: Fatal: Execution of AutoConfig was failed
Raised by oracle.apps.ad.clone.ApplyApplTop
ERROR: AutoConfig completed with errors. Check logfile at /u02/app/oracle/PROD/inst/apps/CLONE_<CONTEXT_NAME>/admin/log/ApplyAppsTier_06100752.log for details.
ApplyApplTop Completed Successfully.

When I execute afcpctx.sh independently: 

Floating point exception| FNDCPUCF $USERNAME 0 Y /u02/app/oracle/PROD/inst/apps/CLONE_<CONTEXT_NAME>/appl/admin/CLONE_<CONTEXT_NAME>.xml



Solution:

source the application environment file
run relink as follows  
    adrelink.sh force=y ranlib=y "AD all"  
    adrelink.sh force=y ranlib=y "fnd FNDCPUCF"

try again

$perl adcfgclone.pl appsTier

now cloning will be completed successfully.

Recursively check ownership of all files



find files in a folder and their user permission other than oracle

find <<Starting search location>> -not -user oracle -printf "%p %u\n"

find files in a folder and thier group permission other than oinstall

find <<Starting search location>>  -not -user oinstall -printf "%p %u\n"