Troubleshooting Workflow Notification Mailer Issues

Troubleshooting Workflow Notification Mailer Issues

Find Workflow Notification Mailer is up and Running?


SELECT component_name, component_status
FROM fnd_svc_components
WHERE component_type = 'WF_MAILER';


Workflow log’s: FNDCPGSC*.txt under $APPLCSF/$APPLOG directory


Find the Failed One’s?


Select NOTIFICATION_ID, MESSAGE_TYPE, MESSAGE_NAME, STATUS, MAIL_STATUS, FROM_USER, TO_USER from wf_notifications where MAIL_STATUS='FAILED';


Check pending e-mail notification that was pending for process.


Sql> SELECT COUNT(*), message_name FROM wf_notifications
WHERE STATUS='OPEN'
AND mail_status = 'MAIL'
GROUP BY message_name;


Sql> SELECT * FROM wf_notifications WHERE STATUS='OPEN' AND mail_status = 'SENT'
ORDER BY begin_date DESC

Check the Workflow notification has been sent or not?


select mail_status, status from wf_notifications where notification_id=


--If mail_status is MAIL, it means the email delivery is pending for workflow mailer to send the notification
--If mail_status is SENT, its means mailer has sent email
--If mail_status is Null & status is OPEN, its means that no need to send email as notification preference of user is "Don't send email"
--Notification preference of user can be set by user by logging in application + click on preference + the notification preference


1. Verify whether the message is processed in WF_DEFERRED queue


select * from applsys.aq$wf_deferred a where a.user_data.getEventKey()= ''
- notification id


2. If the message is processed successfully message will be enqueued to WF_NOTIFICATION_OUT queue, if it errored out it will be enqueued to WF_ERROR queue


select wf.user_data.event_name Event_Name, wf.user_data.event_key Event_Key,
wf.user_data.error_stack Error_Stack, wf.user_data.error_message Error_Msg
from wf_error wf where wf.user_data.event_key = '
To check what all mails have went and which all failed ?


Select from_user,to_user,notification_id, status, mail_status, begin_date
from WF_NOTIFICATIONS where status = 'OPEN';


Select from_user, to_user, notification_id, status, mail_status,begin_date,USER_KEY,ITEM_KEY,MESSAGE_TYPE,MESSAGE_NAME begin_date
from WF_NOTIFICATIONS where status = 'OPEN';




Users complain that notifications are stuck ?


Use the following query to check to see whatever the users are saying is correct


SQL> select message_type, count(1) from wf_notifications
where status='OPEN' and mail_status='MAIL' group by message_type;


E.g o/p of query -


MESSAGE_Type COUNT(1)
-------- ----------
POAPPRV 11 --- 11 mails of Po Approval not sent ---
INVTROAP 12
REQAPPRV 9
WFERROR 45 --- 45 mails have error




If Mail not received by User ?


select Name,DISPLAY_NAME,EMAIL_ADDRESS,NOTIFICATION_PREFERENCE,STATUS
from wf_users where DISPLAY_NAME=’xxx,yyy’ ;


Status – Active
Notification_preference-> Mailtext
Email Address should not be null


Notification not sent waiting to be mailed ?


SQL> select notification_id, status, mail_status, begin_date from WF_NOTIFICATIONS
where status = ‘OPEN’ and mail_status = ‘MAIL’;
To debug the notification id ?


$FND_TOP/sql
run wfmlrdbg.sql
******************************

Note: 1054215.1 - How to Check if the Workflow Mailer is Running
Note: 415516.1 - How to Check Whether Notification Mailer is Working or Not

Note: 831982.1 - 11i/R12 - A guide for troubleshoting Workflow Notification Emails - Inbound and Outbound
Note: 1012344.7 - Notifications Not Being Sent In Workflow
Note: 560472.1 - Workflow Mailers Not Sending Notifications

Please see (Note: 753845.1 - How to Perform a Meaningful SMTP Telnet Test to Troubleshoot Java Mailer Issues), the same error is reported in this doc.

Database Initialization Parameter Sizing

Database Initialization Parameter Sizing
 

Sizing recommendations based on the active Oracle E-Business Suite user counts.
Parameter NameDevelopment or Test Instance11-100 Users101-500 Users501-1000 Users1001-2000 Users
processes200
20080012002500
sessions400400160024005000
sga_target Footnote 11G1G2G3G14G
shared_pool_size (csp)N/AN/AN/A1800M3000M
shared_pool_reserved_size (csp)N/AN/AN/A180M300M
shared_pool_size (no csp)400M600M800M1000M2000M
shared_pool_reserved_size (no csp)40M60M80M100M100M
pga_aggregate_target1G2G4G10G20G
Total Memory Required Footnote 2~ 2 GB~ 3 GB~ 6 GB~ 13 GB~ 34 GB
Footnote 1

    The parameter sga_target should be used for Oracle 10g or 11g or 12c based environments such as Release 12. This replaces the parameter db_cache_size, which was used in Oracle 9i based environments. Also, it is not necessary to set the parameter undo_retention for 10g or 11g or 12c-based systems, since undo retention is set automatically as part of automatic undo tuning.

    Enabling the 11g or 12c Automatic Memory Management (AMM) feature is supported in EBS, and has been found to be useful in scenarios where memory is limited, as it will dynamically adjust the SGA and PGA pool sizes. AMM is enabled by using the memory_target and memory_max_target initialization parameters. MEMORY_TARGET specifies the system-wide sharable memory for Oracle to use when dynamically controlling the SGA and PGA as workloads change. The memory_max_target parameter specifies the maximum size that memory_target may take. AMM has proven useful for small to mid-range systems as it simplifies both the configuration and management. However, many customers with large production systems have experienced better performance with manually sized pools (or large minimum values for the pools). On Linux, Hugepages has resulted in improved performance; however, this configuration is not compatible with AMM. For large mission-critical applications systems, it is advisable to set sga_target with a minimum fixed value for shared_pool_size and pga_aggregate_target.

Footnote 2

    The total memory required refers to the amount of memory required for the database instance and associated memory, including the SGA and the PGA. You should ensure that your system has sufficient available memory in order to support the values provided above. The values provided above should be adjusted based on available memory so as to prevent paging and swapping.

 

SHOW PROCESS PARAMETER IN ORACLE

SHOW PROCESS PARAMETER IN ORACLE

sql> show parameter sessions
sql> show parameter processes
sql> show parameter transactions
And if you are increasing sessions parameter you should consider increasing processes and transactions parameter as well.
Here is the formula you can use to determine their values

processes=x
sessions=x*1.1+5
transactions=sessions*1.1

E.g.
processes=500
sessions=555
transactions=610

sql> alter system set processes=500 scope=both sid='*';
sql> alter system set sessions=555 scope=both sid='*';
sql> alter system set transactions=610 scope=both sid='*';


Current Utilization of process/sessions

select * from v$resource_limit where RESOURCE_NAME in ('sessions','processes','transactions');

To change the number of process

SQL> alter system set processes = 100 scope=spfile;

----------------------------------------------------
----------------------------------------------------

Database Initialization Parameter Sizing

This section provides sizing recommendations based on the active Oracle E-Business Suite user counts. The following table should be used to size the relevant parameters:



Parameter NameDevelopment or Test Instance11-100 Users101-500 Users501-1000 Users1001-2000 Users
processes200
20080012002500
sessions400400160024005000
sga_target Footnote 11G1G2G3G14G
shared_pool_size (csp)N/AN/AN/A1800M3000M
shared_pool_reserved_size (csp)N/AN/AN/A180M300M
shared_pool_size (no csp)400M600M800M1000M2000M
shared_pool_reserved_size (no csp)40M60M80M100M100M
pga_aggregate_target1G2G4G10G20G
Total Memory Required Footnote 2~ 2 GB~ 3 GB~ 6 GB~ 13 GB~ 34 GB
      
 >> Footnote 1
The parameter sga_target should be used for Oracle 10g or 11g or 12c based environments such as Release 12. This replaces the parameter db_cache_size, which was used in Oracle 9i based environments. Also, it is not necessary to set the parameter undo_retention for 10g or 11g or 12c-based systems, since undo retention is set automatically as part of automatic undo tuning.
 
Enabling the 11g or 12c Automatic Memory Management (AMM) feature is supported in EBS, and has been found to be useful in scenarios where memory is limited, as it will dynamically adjust the SGA and PGA pool sizes. AMM is enabled by using the memory_target and memory_max_target initialization parameters. MEMORY_TARGET specifies the system-wide sharable memory for Oracle to use when dynamically controlling the SGA and PGA as workloads change. The memory_max_target parameter specifies the maximum size that memory_target may take. AMM has proven useful for small to mid-range systems as it simplifies both the configuration and management. However, many customers with large production systems have experienced better performance with manually sized pools (or large minimum values for the pools). On Linux, Hugepages has resulted in improved performance; however, this configuration is not compatible with AMM. For large mission-critical applications systems, it is advisable to set sga_target with a minimum fixed value for shared_pool_size and pga_aggregate_target.
>> Footnote 2

The total memory required refers to the amount of memory required for the database instance and associated memory, including the SGA and the PGA. You should ensure that your system has sufficient available memory in order to support the values provided above. The values provided above should be adjusted based on available memory so as to prevent paging and swapping.

 

Crontab example


 Crontab example

Copying file in same server

==========


* * * * * <command> #Runs every minute
30 * * * * <command> #Runs at 30 minutes past the hour
45 6 * * * <command> #Runs at 6:45 am every day
45 18 * * * <command> #Runs at 6:45 pm every day
00 1 * * 0 <command> #Runs at 1:00 am every Sunday
00 1 * * 7 <command> #Runs at 1:00 am every Sunday
00 1 * * Sun <command> #Runs at 1:00 am every Sunday
30 8 1 * * <command> #Runs at 8:30 am on the first day of every month
00 0-23/2 02 07 * <command> #Runs every other hour on the 2nd of July

==========
CREATE :-

testCron.txt

ENTRY :-

*/1 * * * * scp -rp /Oracle/CRONTAB_TEST/TEST/PRIM/* /Oracle/CRONTAB_TEST/TEST/SEC/

SUBMIT :-

crontab testCron.txt

EDIT :-

crontab -e

REMOVE :-

crontab -r



RMAN Backup Scripts

RMAN Backup Scripts

Whole Database backup

RMAN> backup database;
Default backup location is Flash Recovery Area (FRA) - $ORACLE_HOME/dbs

Check  RFA setup
SQL> show parameter recovery_file_dest;

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string /recovery_area
db_recovery_file_dest_size big integer 20G

MOS - 305648.1 What is a Flash Recovery Area and how to configure it ?
 

Set  backup other than Flash Recovery Area

RMAN> backup database format '/backups/TEST/df_t%t_s%s_p%p';

 

Backup Individual Tablespace

RMAN> backup tablespace SYSTEM, UNDOTBS, USERS; 


Backup Individual Datafile
RMAN> backup datafile 6;

RMAN> backup datafile 6 format '/backups/TEST/df_t%t_s%s_p%p';

RMAN> backup datafile 2,4,6,8,10;

RMAN> backup datafile '/Data1/proddata/system01.dbf'; 


Backup Controlfile & Spfile

RMAN> backup current controlfile;

RMAN> backup current controlfile format '/backups/TEST/df_t%t_s%s_p%p';

RMAN> backup spfile; 


Backup Archivelogs
RMAN> backup archivelog all;
 

>> Time based

RMAN> backup archivelog from time 'sysdate-30' until time 'sysdate-7';
>> With delete input option

RMAN> backup archivelog from logseq=XXX until logseq=YYY delete input format '/backups/TEST/%d_archive_%T_%u_s%s_p%p'; 


Backup whole database including archivelogs
RMAN> backup database plus archivelog;
 

>> With delete input option

RMAN> backup database plus archivelog delete input;

RMAN> backup database plus archivelog delete input format '/backups/TEST/df_t%t_s%s_p%p';




----------