Thursday, July 4, 2019

Using Office 365 in Workflow Notification mailer in Test environments Configuration steps

Using Office 365 in Workflow Notification mailer in Test environments

Steps1- Configure the mail server and email sender


    1.      Login using ‘SYSADMIN user and go to responsibility 'System Administration' > Oracle     Applications Manager > Click on Workflow






   2.      Screen displayed as Notification mailer Down
 

   3.      Click on 'Service Components'



  
 4.      Select Workflow Notification Mailer and click on Edit.

   

Set the following parameters

   a)    Outbound EMail Account (SMTP)
Server Name: 'smtp.office365.com'
Username: 'mailer@Company.com'
Password: 'password'
Connection Security: 'STARTTLS'


        b)    Inbound EMail Account (IMAP)
Server Name: 'outlook.office365.com'
Username:'mailer@Company.com'
Password:'password'
Reply-To Address: 'mailer@Company.com'
Connection Security:'SSL/TLS'


         5.      Click on button 'Advanced'
          

         

          6.      Press 'Next'
   


    7.      Press 'Next'

               
      

          8.      Press 'Next'
             


      9.       Update from field to ‘Workflow Mailer Test Environment’ and click on finish.
         
      

          

           10.  Click on finish


       Steps2 - Configure the override address 

          Override email address is very imported in test environment. all the emails will be redirected to  this email. Following are the steps to set it up from back end.
      
          1.      Run the below sql statement


       SELECT fscv.parameter_value
       FROM fnd_svc_comp_params_tl fscp, fnd_svc_comp_param_vals fscv
       WHERE     fscp.display_name = 'Test Address'
       AND fscp.parameter_id = fscv.parameter_id; 

           

             Query will result with value     ‘NONE’ if override is not set earlier.




         2.      Now run the below sql update statement and commit


    UPDATE fnd_svc_comp_param_vals fscpv
    SET fscpv.PARAMETER_VALUE = 'erp.test02@company.com' --(Email        address to which all emails will be redirected)
    WHERE fscpv.parameter_id IN (SELECT fscp.parameter_id
    FROM fnd_svc_comp_params_tl fscp
    WHERE fscp.display_name = 'Test Address');

         3.      Now run the below SQL again to verify that the override email address has been set as required.
      SELECT fscv.parameter_value
      FROM fnd_svc_comp_params_tl fscp, fnd_svc_comp_param_vals fscv
      WHERE     fscp.display_name = 'Test Address'
    AND fscp.parameter_id = fscv.parameter_id;
           Query will result with value 'erp.test02@company.com'.

   4.      Start the workflow mailer from 'System Administration' > Oracle Applications Manager >  Click on Workflow



 Select Workflow Notification mailer and Click on   Select ‘Start’ from drop down list and Press on Go button. 
  



   5.      Workflow notification mailer should start and the status should be 'Running'.




      Steps3 - Test the setup


        

       1.      Click on 'Workflow Notification Mailer'.
       

  

  2.      Click on ‘Test Mailer’


        

       3.      Select user with email address set and click 'Accept' button.
Email address which has been set to  override will receive two email. 


      The emails should not be sent to the actual email address that is set for the user which selected above.

Now test environment has been configured to test workflow mailer server.





Friday, June 28, 2019

Oracle Home inventory is corrupted LsInventorySession failed: OracleHomeInventory

Oracle Home inventory is corrupted LsInventorySession failed: OracleHome Inventory

[oratest@slctest01 OPatch]$ opatch lsinventory
Oracle Interim Patch Installer version 11.2.0.3.3
Copyright (c) 2012, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/oracle/testdb/11.2.0
Central Inventory : /u01/oraInventory
   from           : /u01/oracle/testdb/11.2.0/oraInst.loc
OPatch version    : 11.2.0.3.3
OUI version       : 11.2.0.3.0
Log file location : /u01/oracle/testdb/11.2.0/cfgtoollogs/opatch/opatch2013-05-15_10-27-12AM_1.log

List of Homes on this system:

Inventory load failed... OPatch cannot load inventory for the given Oracle Home.
Possible causes are:
   Oracle Home dir. path does not exist in Central Inventory
   Oracle Home is a symbolic link
   Oracle Home inventory is corrupted
LsInventorySession failed: OracleHomeInventory gets null oracleHomeInfo

OPatch failed with error code 73


Solution

I was able to solve this issue; Follow the steps below:

 1. Login to the server.
 2. cd $ORACLE_HOME/oui/bin
 $ ./attachHome.sh
 Starting Oracle Universal Installer...

 Checking swap space: must be greater than 500 MB. Actual 196608 MB Passed
 Preparing to launch Oracle Universal Installer from /tmp/OraInstall2012-06-27_03-07-48AM. Please wait ...
 3. Re-run the same command and it is going to work.

 [oratest@slctest01 ~]$ opatch lsinventory

Thursday, June 13, 2019

Oracle E-Business Suite Current patch level

 SELECT ABBREVIATION,
             NAME,
             TYPE,
             CODELEVEL,
             BASELINE
       FROM AD_TRACKABLE_ENTITIES
       WHERE ABBREVIATION IN ('ad',
                          'txk',
                          'fnd',
                          'fwk',
                          'atg_pf',
                          'icx')
      ORDER BY ABBREVIATION;

Defragment Concurrent Tables

--DEFRAGMENT
---Defragment the tables periodically to reclaim unused space / improve performance

alter table APPLSYS.FND_CONCURRENT_REQUESTS move;
alter table APPLSYS.FND_CRM_HISTORY move;
alter table APPLSYS.FND_CONCURRENT_PROCESSES move;
alter table APPLSYS.FND_CRM_HISTORY move;
alter table APPLSYS.FND_ENV_CONTEXT move;
alter table APPLSYS.FND_TEMP_FILES move;



--select owner, index_name, status from dba_indexes
--where table_owner = upper('APPLSYS') and
--table_name in ('FND_CONCURRENT_REQUESTS','FND_CRM_HISTORY','FND_CONCURRENT_PROCESSES','FND_CRM_HISTORY','FND_ENV_CONTEXT','FND_TEMP_FILES');


--alter index <owner>.<index_name> rebuild online;

alter index APPLSYS.FND_CONCURRENT_PROCESSES_N2 rebuild online;
alter index APPLSYS.FND_CONCURRENT_PROCESSES_N1 rebuild online;
alter index APPLSYS.FND_CONCURRENT_PROCESSES_U1 rebuild online;
alter index APPLSYS.FND_CONCURRENT_REQUESTS_N10 rebuild online;
alter index APPLSYS.FND_CONCURRENT_REQUESTS_N11 rebuild online;
alter index APPS.FND_CONCURRENT_REQUESTS_F1 rebuild online;
alter index APPLSYS.FND_CONCURRENT_REQUESTS_N9 rebuild online;
alter index APPLSYS.FND_CONCURRENT_REQUESTS_N2 rebuild online;
alter index APPLSYS.FND_CONCURRENT_REQUESTS_U1 rebuild online;
alter index APPLSYS.FND_CONCURRENT_REQUESTS_N1 rebuild online;
alter index APPLSYS.FND_CONCURRENT_REQUESTS_N3 rebuild online;
alter index APPLSYS.FND_CONCURRENT_REQUESTS_N4 rebuild online;
alter index APPLSYS.FND_CONCURRENT_REQUESTS_N5 rebuild online;
alter index APPLSYS.FND_CONCURRENT_REQUESTS_N6 rebuild online;
alter index APPLSYS.FND_CONCURRENT_REQUESTS_N7 rebuild online;
alter index APPLSYS.FND_CONCURRENT_REQUESTS_N8 rebuild online;
alter index APPLSYS.FND_CRM_HISTORY_U1 rebuild online;
alter index APPLSYS.FND_CRM_HISTORY_U2 rebuild online;
alter index APPLSYS.FND_ENV_CONTEXT_U1 rebuild online;
alter index APPLSYS.FND_TEMP_FILES_N1 rebuild online;
alter index APPLSYS.FND_TEMP_FILES_N2 rebuild online;


--exec fnd_stats.gather_table_stats ('APPLSYS','FND_CONCURRENT_REQUESTS',PERCENT=>99);

exec fnd_stats.gather_table_stats ('APPLSYS','FND_CONCURRENT_REQUESTS',PERCENT=>99);
exec fnd_stats.gather_table_stats ('APPLSYS','FND_CRM_HISTORY',PERCENT=>99);
exec fnd_stats.gather_table_stats ('APPLSYS','FND_CONCURRENT_PROCESSES',PERCENT=>99);
exec fnd_stats.gather_table_stats ('APPLSYS','FND_CRM_HISTORY',PERCENT=>99);
exec fnd_stats.gather_table_stats ('APPLSYS','FND_ENV_CONTEXT',PERCENT=>99);
exec fnd_stats.gather_table_stats ('APPLSYS','FND_TEMP_FILES',PERCENT=>99);

Creating ACL for UTL_SMTP

SELECT *
FROM dba_network_acls;

-- Create ACL and privilege
begin
  dbms_network_acl_admin.create_acl (
    acl         => 'utl_mail.xml',
    description => 'Allow mail to be send',
    principal   => 'APPS',
    is_grant    => TRUE,
    privilege   => 'connect'
    );
    commit;
end;

--Add Privilege

begin
  dbms_network_acl_admin.add_privilege (
  acl       => 'utl_mail.xml',
  principal => 'APPS',
  is_grant  => TRUE,
  privilege => 'resolve'
  );
  commit;
end


--Test1

begin
  dbms_network_acl_admin.assign_acl(
  acl  => 'utl_mail.xml',
  host => 'mail.company.com.sa'
  );
  commit;
end;

--Test2
begin
  utl_mail.send(
  sender     => 'fromuser@company.com',
  recipients => 'myname@company.com,user2@company.com, user3@company.com',
  message    => 'Test E-mail from ERP Database'
  );
  commit;
end;

Cost Manager Status

SELECT x.process_type "Name",
  DECODE(
  (SELECT '1' FROM fnd_concurrent_requests cr,
    fnd_concurrent_programs_vl cp,
    fnd_application a WHERE cp.concurrent_program_id = cr.concurrent_program_id
  AND cp.concurrent_program_name                     = x.process_name
  AND cp.application_id                              = a.application_id
  AND a.application_short_name                       = x.process_app_short_name
  AND phase_code                                    != 'C'
  ),'1','Active','Inactive') "Status",
  x.worker_rows "Worker Rows",
  x.timeout_hours "Timeout Hours",
  x.timeout_minutes "Timeout Minutes",
  x.process_hours "Process Interval Hours",
  x.process_minutes "Process Interval Minutes",
  x.process_seconds "Process Interval Seconds"
FROM
  (SELECT mipc.process_code ,
    mipc.process_status ,
    mipc.process_interval ,
    mipc.manager_priority ,
    mipc.worker_priority ,
    mipc.worker_rows ,
    mipc.processing_timeout ,
    mipc.process_name ,
    mipc.process_app_short_name ,
    a.meaning process_type ,
    FLOOR(mipc.process_interval    /3600) process_hours ,
    FLOOR((mipc.process_interval   - (FLOOR(mipc.process_interval/3600) * 3600))/60) process_minutes ,
    (mipc.process_interval         - (FLOOR(mipc.process_interval/3600) * 3600) - (FLOOR((mipc.process_interval - (FLOOR(mipc.process_interval/3600) * 3600))/60) * 60)) process_seconds ,
    FLOOR(mipc.processing_timeout  /3600) timeout_hours ,
    FLOOR((mipc.processing_timeout - FLOOR(mipc.processing_timeout/3600) * 3600)/60) timeout_minutes
  FROM mtl_interface_proc_controls mipc,
    mfg_lookups a
  WHERE a.lookup_type = 'PROCESS_TYPE'
  AND a.lookup_code   = mipc.process_code
  ) x
  -- WHERE x.PROCESS_TYPE = 'Cost Manager' -- uncomment this to display only the cost manager
ORDER BY 1;



SELECT request_id RequestId,
request_date RequestDt, concurrent_program_name,
phase_code Phase,
status_code Status FROM
fnd_concurrent_requests fcr,
fnd_concurrent_programs fcp
WHERE fcp.application_id = 702 AND
fcp.concurrent_program_name in ('CMCTCM', 'CMCMCW', 'CMCACW') AND
fcr.concurrent_program_id = fcp.concurrent_program_id AND
fcr.program_application_id = 702 AND fcr.phase_code <> 'C'


-- Pending Cost Transations
select count(*) from MTL_MATERIAL_TRANSACTIONS where COSTED_FLAG = 'N' --or COSTED_FLAG = 'N';
--and organization_id=317

select count(*) from MTL_MATERIAL_TRANSACTIONS where COSTED_FLAG = 'E'

select * from cst_lc_adj_interface


Select * from cst_lc_adj_interface

Select * from cst_lc_adj_interface_errors


select * from wip_cost_txn_interface

Cost Manager Datafix

select * from mtl_material_transactions where costed_flag = 'E';


select *
   from org_acct_periods where acct_period_id=13481
   --where period_name like 'JUL-14'

select transaction_id,creation_date,organization_id,transaction_date,acct_period_id
from mtl_material_transactions where costed_flag = 'E';




UPDATE mtl_material_transactions
SET acct_period_id         = 13406,
    costed_flag            = 'N',
    transaction_group_id   = NULL,
    transaction_set_id     = NULL,
    ERROR_CODE             = NULL,
    error_explanation      = NULL
WHERE     costed_flag = 'E'
      AND acct_period_id = 13443
      AND ERROR_CODE = 'CST_MATCH_DATE_PERIOD'
      AND organization_id = 317
      AND transaction_id = 4146439;
     
     

Update MTL_MATERIAL_TRANSACTIONS
set COSTED_FLAG = 'N', TRANSACTION_GROUP_ID = NULL
where COSTED_FLAG = 'E' or COSTED_FLAG = 'N';


select count(*) from MTL_MATERIAL_TRANSACTIONS where COSTED_FLAG = 'E' or COSTED_FLAG = 'N';

Some Tips About FNDLOAD

Data Synchronization  Data Synchronization is a process in which some setup data would be synchronized, and this would be more important w...