Saturday, 29 October 2022

LsInventorySession failed: RawInventory gets null OracleHomeInfo

 Database environment not set, going to check for GridHome.

LsInventorySession failed: RawInventory gets null OracleHomeInfo


Error running opatch. Error code : 73

Cannot confirm bugfixes applied to the Database ORACLE_HOME.



Solution:

cd $ORACLE_HOME/oui/bin
./attachHome.sh

Thursday, 27 October 2022

[UNEXPECTED] Could not find patch context file from database [UNEXPECTED]Patch edition context file not found in database for host

 [UNEXPECTED] Could not find patch context file from database [UNEXPECTED]Patch edition context file not found in database for host

Solution: Run Autoconfig in Patch file system


sqlplus ebs_system/sys

alter trigger ebs_logon disable;


Source the patch file system and run Autoconfig

 


Enable SSH for user equivalency in RAC and EBS

If your Linux version 8 modify the scp as below:

mv /usr/bin/scp /usr/bin/scp.orig

create a new file /usr/bin/scp contains below line:
/usr/bin/scp.orig -T $*

Change the file permission
chmod   555 /usr/bin/scp
then run below commands

For database and RAC
$ORACLH_HOME/deinstall/sshUserSetup.sh -user oracle -hosts "server01 server02"  -noPromptPassphrase 
For EBS
$RUN_BASE/FMW_Home/Oracle_EBS-app1/oui/prov/resources/scripts/sshUserSetup.sh -user applmgr -hosts "server001 server002" -noPromptPassphrase 

Autoconfig failing with afcpctx.sh INSTE8_PRF -1

 Solution:

adrelink.sh force=y "fnd FNDCPUCF"

Thursday, 6 October 2022

Call Oracle Stored Procedure from Shell Script

 #!/bin/bash


export ORACLE_HOME=/u01/app/oracle_home

export PATH=$PATH:$ORACLE_HOME/bin

export ORACLE_SID=ERPCDB1

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib


l_user='apps'

l_psw='Admin1234'

l_conn_string='mydb'


sql_error=`sqlplus -silent $l_user/$l_psw@$l_conn_string <<END

WHENEVER SQLERROR EXIT 1

begin

/* Call compute_sal stored procedure */

  XX_AP_PAY_BATCH_JOB_PRC;

exception

 when others then

  raise;

end;

/

 EXIT;

END`


Result=$?


echo $Result


if [[ $Result -ne 0 ]]

then

  echo "${sql_error}"

  echo "Error calling the PL/SQL procedure."

  exit $Result

else

  echo "PL/SQL Procedure executed successfully."

  exit 0

fi


Tuesday, 4 October 2022

EBS Workflow Mailer not sending mails mail_status failed solution

 

When a notification fails to be rendered or delivered from the Java tier (in this case due to an email server outage) then the notification will be placed into a FAILED state. The notifications that fails to be delivered to a user then has their notification preference set to DISABLED and any subsequent notifications will be automatically be set to FAILED either at the PL/SQL level or the java level depending on where the request for a notification is received. 


Run the following select statement to identify those users that are DISABLED:

select user_name from fnd_user_preferences where PREFERENCE_VALUE = 'DISABLED';



Below block update the user preferences

DECLARE

 l_disabled_count NUMBER;

 l_updated_count  NUMBER;

BEGIN

 DBMS_OUTPUT.PUT_LINE('Program to display updated row count');

 DBMS_OUTPUT.PUT_LINE('**************************************');

    SELECT count(*)

    INTO   l_disabled_count

    FROM fnd_user_preferences

    WHERE PREFERENCE_VALUE = 'DISABLED';

    dbms_output.put_line('Disabled Count :'||l_disabled_count);


     BEGIN

     update fnd_user_preferences

     set    preference_value = 'MAILHTML'

     where PREFERENCE_VALUE = 'DISABLED';

       

     dbms_output.put_line('Updated Row count: '||SQL%ROWCOUNT);

       COMMIT;

       

     EXCEPTION WHEN OTHERS THEN

     dbms_output.put_line('Error in Update - '||SUBSTR(SQLERRM,1,100));

     END;

       

 DBMS_OUTPUT.PUT_LINE('**************************************');


EXCEPTION WHEN OTHERS THEN

DBMS_OUTPUT.PUT_LINE('Error in Main - '||SUBSTR(SQLERRM,1,100));

END;

Number of Visitors