Alerts - Full Features
Alerts - Full Features
Alerts - Full Features
called alerts to monitor your business information and to notify you of the information you want. You can define one of two types of alerts: an event alert or a periodic alert. EVENT ALERTS Event alerts immediately notify you of activity in your database as it happens. You define what a database event is--an insert or an update to a table--and Oracle Alert informs you when it happens. PERIODIC ALERTS Periodic alerts periodically report key information according to a schedule you define.
PERIODIC ALERTS A periodic alert, checks the database for information according to a schedule you define. When you create a periodic alert, you specify the following: A SQL Select statement that retrieves specific database information. The frequency that you want the periodic alert to run the SQL statement. Actions that you want Oracle Alert to perform once it runs the SQL statement. Include all the actions you want Oracle Alert to perform, in an action set. DEFINING PERIODIC ALERTS Responsibility: Alert Manager Navigation: Alert -> Define
Enter application and Name. Name the alert (up to 50 characters), and give it a meaningful description (up to 240 characters). Enter a name for the alert that is unique within the application.
Warning: Use characters other than the pound sign (#), the colon (:), or the percent sign (%) for your initial letter; as these characters are reserved for use in Enter Query mode.
Select Periodic in the Type field. Check Enabled to enable your periodic alert.
Select a frequency for your periodic alert. You can choose from nine frequency options:
On Demand-- Oracle Alert checks your periodic alert only when you specify. You do not have to fill in any other field in the Periodic Details block. You check on demand alerts by using the Request Periodic Alert Check window. On Day of the Month--If you choose this frequency, Oracle Alert checks your alert on a monthly basis on the day number you enter in the Day field. On Day of the Week--If you choose this frequency, Oracle Alert checks your alert on the day of the week you enter in the Day field. Every N Calendar Days--If you choose this frequency, enter a value in the Days field. Oracle Alert considers every day a calendar day, and does not skip holidays. Every Day--Choosing this frequency is the same as choosing Every N Calendar Days and entering a value of 1 in the Days field. Every Other Day--Choosing this frequency is the same as choosing Every N Calendar Days and entering a value of 2 in the Days field. Every N Business Days--If you choose this frequency, enter a value in the Days field. Oracle Alert lets you choose your business days, but does not skip any holidays. Every Business Day--Choosing this frequency is the same as choosing Every N Business Days and entering a value of 1 in the Days field.
Every Other Business Day--Choosing this frequency is the same as choosing Every N Business Days and entering a value of 2 in the Days field.
Every N-business days will only count monday to friday. If you choose 3 days, and start on monday. It will run Monday, Thursday, the next Tuesday, Friday. Note: The business days above are determined based on the Business Day system selected in the below screen. Alert Manager Responsibility -> System -> Options -> More Option tab
The American system starts with Sunday and defines Monday through Friday as business days. The European system starts with Monday and defines Monday through Friday as business days. The Middle Eastern System starts with Monday and defines Monday through Saturday as business days. Every N-calendar days will count all days of the weeks. If you choose 3, and start on monday. It will run Monday, Thursday, Sunday, Wednesday, etc.
Keep Days Field: Number of days of exceptions, actions, and response actions history you want to keep for this alert. End Date Field: To disable your alert by a certain date. Note that you can enter a date in this field only if the alert is enabled. Last Checked field: In the Last Checked field, Oracle Alert displays the last date that this exception condition was checked, if it has been checked.
To enter a SQL Select statement for your periodic alert: Enter a SQL Select statement that retrieves all the data your alert needs to perform the actions you plan to define. Must include INTO clause Inputs are identified by colon before the name. :INPUT_NAME Outputs are identified by ampersand (&) before the name. &OUTPUT_NAME
you can format your number outputs as real numbers by specifying a SQL*Plus format mask in your Select statement. &PRICE#9999.99 PL/SQL functions can be used. SQL Select statement must be less than 64K. SQL query can be imported from external sources and it also has to be less than 64K. If the Select statement in the file does not contain an Into clause, Oracle Alert automatically inserts an Into clause into the alert Select statement. This default Into clause contains three outputs: &OUTPUT1, &OUTPUT2, and &OUTPUT3. You may want to give these outputs meaningful names. Verify the SQL statement: You can verify the accuracy and effectiveness of your Select statement. Choose Verify to parse your Select statement and display the result in a Note window. Choose Run to execute the Select statement in one of your application's Oracle IDs, and display the number of rows returned in a Note window.
EVENT ALERTS To create an event alert, you perform the following tasks in the order listed: Define the database events that will trigger your alert Specify the details for your alert Define actions for your alert Create action sets containing the actions you want your alert to perform
DEFINING EVENT ALERTS Responsibility: Alert Manager Navigation: Alert -> Define
EVENT DETAILS: Application: The application of the table the alert has to monitor. Table: The table name Note: You cannot use a view as the event table for your alert. Do not define an event alert on the table FND_CONCURRENT_REQUESTS. Oracle Alert submits a concurrent request to the concurrent manager when an event alert is triggered by an insert or update to an event table. After Insert/ After Update: The trigger event when the alert has to be triggered
ALERT DETAILS WINDOW Note: From this section the process is the same for Event and Periodic Alerts The Alert Details window includes information such as which Application installations you want the alert to run against, what default values you want your inputs variables to use, and what additional characteristics you want your output variables to have.
INPUTS TAB:
Input Name: Oracle Alert automatically displays the inputs used in your Select statement. There are 4 implicit inputs provided by oracle ROWID--Contains the ID number of the row where the insert or update that triggers an event alert occurs. MAILID--Contains the email username of the person who enters an insert or update that triggers an event alert. DATE_LAST_CHECKED--Contains the date and time that the alert was most recently checked ORG_IDcontains the current org ID. Description: Optionally add a description for each input. Data type: Oracle Alert uses the data type to validate the default values for inputs you enter in the Default Values field Default Values: You can enter up to 240 characters.
OUTPUTS TAB:
Output Name: In the Outputs alternative region, Oracle Alert automatically displays the outputs used in your alert Select statement without the ampersand (&) and any numbering format. Description: Optionally add a description for each input. Max Length Detail Summary You can specify the maximum number of output characters you want to display in your detail or summary message actions. Number Format: If your output value is numeric, enter the SQL*Plus format mask in the Number Format field. Check for Duplicates: Checks the previous combination of outputs for duplicates. Note: You must save history for your alert to use duplicate checking.
INSTALLATIONS TAB:
Oracle ID: specify an Oracle ID if you want Oracle Alert to check your alert against that specific Oracle ID. Operating Unit: Not mandatory for Periodic Alerts.
Action Name: User defined name. Description: Optional Action Level: DETAIL: Action is being performed for each individual exception. SUMMARY: Once for all exceptions found. NO EXCEPTION: Action performs when no exception is found. ACTION DETAILS: (for Action Level DETAIL and NO EXCEPTION) There are four types of actions you can create: message actions concurrent program actions operating script actions SQL statement script actions
List: The distribution List Note: Below fields are disabled if this field is entered. Reply To: Reply to mail ID To, Subject, CC,BCC : Similar to conventional mail options. Print for user: the names, or alert outputs or response variables that represent the names of the recipients for whom you want to print a copy of the message Note: You can enter as many recipients as you want, up to 240 characters. Response Set/Response Days (explained in later sections in this document) Text: The message that has to be sent. Ouput variables referred using &. Note: For detail or no exception message actions, the message text that you specify in Oracle Alert must be less than 2000 characters, while the message file that you specify must be less than 64K.
Application: The application name in which the concurrent program is registered. Program Name: User Concurrent program name. Arguments: Parameters for the program separated by space. Dynamic outputs from alert SQL query are passed using &VARIABLE_NAME. Action Type: OPERATING SYSTEM SCRIPT
Application: If the operating system script you want to execute is in a file located in an Application's base path bin directory, specify that Application name in the Application field. Arguments: Parameters to the program. File: Enter the full path of the operating system script. Application name should not be entered in this case. Note: Oracle Alert cannot substitute values into output variables located in an operating system script file. Script should be less than 64K. Text: The script is entered here. It should be less than 2000 characters. Output variables can be passed here. Action Type: SQL STATEMENT SCRIPT
Application: If the operating system script you want to execute is in a file located in an Application's base path bin directory, specify that Application name in the Application field.
Arguments: Parameters to the program. File: Path of the file. Note: Script should be less than 64K. Text: The SQL script. PL/SQL procedures and Functions can be used here. Note: The SQL script you enter must have less than 2000 characters.
ACTION DETAILS: (for Action Level SUMMARY) Action Type: SQL STATEMENT SCRIPT / CONCURRENT PROGRAM/ OPERATING SYSTEM SCRIPT Defining the action details remains the same for all these action types except that for summary, Oracle Alert performs the actions once for each unique combination of critical output values. Outputs used as arguments are considered critical outputs. Action Type: MESSAGE
For MESSAGE action type the Text filed changes to a standard template type. This action sends one mail consolidating all the outputs from the exceptions. Example:
=**= Enter summary template below this line =**= ** PO Number: &PO Vendor: &VENDOR Description: &DESC Line: &LINE Item: &ITEM Quantity: &QTY Price: $&PRICE
You specify the format of a summary message in two Oracle Alert windows: In the Outputs alternative region of the Alert Details window in the Alerts form In the Action Details block of the Actions window in the Alerts form Reference Link: http://docs.oracle.com/cd/A60725_05/html/comnls/us/alr/summary.htm#e_fsum
Seq: The sequence in which the actions has to be performed. Action Set Name: User defined name.
Description: Optional (up to 240 characters). Suppress Duplicates: suppress the actions in this action set if the exception found is a duplicate that occurred during the last alert check. Note: Must save History to use this action. Enabled: To enable action set. End Date: Disable action set after that date. ACTION SET DETAILS
Inputs/ Outputs Tab: The variables in alert SQL are displayed here. Can change default input values which are action set specific. Seq: The sequence in which the action set has to be performed. Action: LOV which contains actions defined in the actions window. Type: Populates based on the action selected. Not user enterable.
On error: The action that has to take place if the current action fails. o Action: Abort Aborts the alert Set The action set that has to trigger if current action set fails Member The action within the same action set. o Seq: Enabled only for Action set and member Enabled: To enable action set. End Date: Disable action set member after that date.
ALERTS RESPONSE PROCESSING Oracle Alert can process responses to your alert messages. When Oracle Alert receives a response to a specific alert message, it automatically performs the actions you define. When Oracle Alert sends out your message, it automatically appends two pieces of text: Response Text--tells the recipient exactly how to reply to the alert message. This text originates from the Message Elements alternative region of the Oracle Alert Options form. Your Oracle Alert installation is supplied with the following default text, which you can customize to your needs:
Your response to this mail note will be processed electronically. For successful processing, you must: - Include this note in your reply by using your mail system's Reply With Original feature. - Make your actual response EXACTLY like ONE of the following; however, you should replace the question mark (?) with the value you want to specify. Choose one of the following responses:
Valid Response Text--lists the possible responses that the recipient must reply with. You define these possible responses in the Valid Responses block of the Response Sets window. Oracle Alert appends this Valid Response Text to your message, so the recipient knows the exact text he or she must respond with.
The steps followed are. 1. Define Response set which contains Define variables for use in responses if needed. Define a set of possible responses to a particular alert message Define one or more actions for Oracle Alert to take when it receives a particular response Define actions for responses that are not valid. Define actions for no response condition 2. Attach the response set to the appropriate message action in DEFINE ALERTS window STEP 1: Defining Response set RESPONSE SET WINDOW
Response Set Name: User defined name. Description: Optional Enabled: Checkbox must be checked. End Date: Date until which it is valid.
RESPONSE VARIABLES
Note: Response variable and output variables should not have the same name Variable Name: Valid name (up to 30 characters) Description: (up to 240 characters). Type: Data type of the variable. Max Length: Maximum length of the variable. If the value to the variable exceeds the max length filed then oracle alert Truncates character and date data Displays a row of pound signs (######) for numeric data
RESPONSE ACTIONS: VALID A valid response is a response that you expect from an alert message recipient, and one that initiates the alert actions you specify. You can define any number of valid responses.
Response Name: User defined name. Text: The text which has to be displayed in the alert message sent in mail. Note: Your response must not include a blank line, so limit your response to one paragraph. Oracle Alert interprets a blank line as the end of the response. If you want the respondent to specify a particular value for a response variable in her/his response, enter the response variable in the Text field, followed by an equal sign and a question mark between a set of quotation marks (="?"). Example: If a response variable QUANTITY is used, while soliciting response from user in message use it as
Reorder QUANTITY="?"
Actions Block: Seq: The sequence in which the action has to be performed. Action: LOV which lists the set of actions defined in the ACTIONS window.
Description/ Type: Populates once action is selected. Enabled: Checkbox must be checked End Date: Date till which the response is valid.
Define here the set of actions that has to be performed if the response provided by the responder is no valid or is not understood Seq: The sequence in which the action has to be performed. Action: LOV which lists the set of actions defined in the ACTIONS window. Description/ Type: Populates once action is selected. Enabled: Checkbox must be checked End Date: Date till which the response is valid.
Define here the set of actions that has to be performed if there is no response from the responder within the number of days mentioned in the alert message. Seq: The sequence in which the action has to be performed. Action: LOV which lists the set of actions defined in the ACTIONS window. Description/ Type: Populates once action is selected. Enabled: Checkbox must be checked End Date: Date till which the response is valid.
STEP 2: Attaching response set to Alert Message action Navigate to Alert -> Define -> Actions -> the message action
Response Set: The response set defined in previous step. Response Days: The number of days within which the user is expected to respond.
TRIGGERING ORACLE ALERTS FOR TESTING EVENT ALERTS: Since they are similar to database triggers they can be triggered by updating or inserting a row into the corresponding table. Whenever event alerts are created 2 database triggers (insert & Update) get created in backend for the table. This can be verified using
SELECT dba_triggers.table_name, dba_triggers.trigger_name, dba_triggers.status, user_objects.status, dba_triggers.trigger_body FROM user_objects, dba_triggers
WHERE dba_triggers.trigger_name = user_objects.object_name AND user_objects.object_type = 'TRIGGER' AND user_objects.object_name LIKE '%<table name>%'
Whenever event alerts are triggered a program Check Event Alert' gets submitted. Hence it can be verified in back end by the following query
SELECT REQUEST_ID, REQUEST_DATE, PHASE_CODE, STATUS_CODE, ORACLE_ID, PROGRAM_APPLICATION_ID, CONCURRENT_PROGRAM_ID FROM APPLSYS.FND_CONCURRENT_REQUESTS WHERE Concurrent_program_id = (SELECT Concurrent_program_id FROM fnd_concurrent_programs_tl WHERE USER_CONCURRENT_PROGRAM_NAME = 'Check Event Alert') ORDER BY request_date DESC;
PERIODIC ALERTS: Set the Frequency in Periodic alert to On Demand Navigate to Alert Manager Responsibility -> Request -> Check
Alert: The name of the periodic alert to be checked. Start Date: Gets populated automatically based on frequency set while defining alert. Once the Submit Request button is clicked the periodic alert is triggered and request ID gets generated.
ORACLE ALERT HISTORY Once periodic or event alerts are triggered they can be verified using the alert history. Navigate to Alert Manager Responsibility -> History
Application: The application in which the alert is defined. Alert Name: The name of the alert to be checked. Type/ Keep Days/ Last checked: Populated automatically based on alert definition View History Dates: From/ To: Dates on which the alert history has to be viewed.
FIND CHECKS:
Requestor: User who started the concurrent manager if periodic alert else the user who caused the event in case of event alert. Date/ Time: When the alert was triggered. Request ID: The request ID generated. Status: The possible statuses are: Completed--The alert check is complete Running--Oracle Alert is currently checking the alert Pending--The alert is in the concurrent queue waiting to run
Error--The alert check did not complete successfully The log can also be viewed for each chevk in the Tools -> Request Log
FIND EXCEPTIONS: This is to review the output variable values for each exception triggered in the output. The Review Alert Exceptions window displays the name of the action set run for each exception, when the action set ran and completed and the Oracle ID
FIND ACTIONS The action details of the triggered alert are displayed here.
DUPLICATES CHECKING AND ESCALATION GROUP Duplicates for the output variable values during exceptions can be tracked at alert level or action set level. This checks the previous exception output and suppresses the action if duplicates are found. Saving history by entering Keep Days is mandatory for duplicate checking. Alert level: Alerts -> Define -> Alert Details -> Outputs Tab -> Check box Check For Duplicates enabled
Action Set Level: Alerts -> Define -> Action sets -> Action Set Details -> Outputs Tab -> Check box Check For Duplicates enabled
Note: Action set duplication takes precedence over the alert duplication. ESCALATION ACTION Escalation group are set of actions defined for Oracle Alert, to perform when it finds the same exceptions during consecutive alert checks. Creating Escalation Groups: Alerts -> define -> create new alert and save Tool special menu -> Escalation Groups
Group Name: User defined name. Description: Optional Type: Message/ SQL Statement/ Concurrent program/ Operating System script Note: Actions within an escalation group must be of the same action type. Escalation Group Member Block Action Name: Predefined actions from the Actions Window Level: The hierarchy level when it has to be triggered. Each time Oracle Alert checks the alert and finds the same exception, it performs the next higher level of action in the escalation group Note: Once escalation reaches the highest enabled action level
Suppress Duplicates check box checked in Action set: Oracle Alert no longer performs any action within that escalation group, even if the exception remains in your database. Suppress Duplicates check box unchecked in Action set: Oracle Alert continues to perform the highest action until the exception is removed from your database. ****************************************************************** SUMMARY THRESHOLD Oracle Alert can automatically determine whether to perform a detail or summary action, depending upon the number of exceptions found by the alert Select statement. If you define a summary threshold, Oracle Alert performs a detail action for each exception found by the Select statement, but if the number of exceptions found exceeds the summary threshold, Oracle Alert performs a summary action. Note: A threshold group is composed of one detail action and one summary action of the same action type. Defining summary thresholds 1. Create an alert Alert Manager Responsibility -> Define 2. Define a detail and summary action of same type in the alert. 3. Navigate to Tools menu -> Threshold Groups 4. Define the threshold group.
Name/Description: User enterable fields. Note: Name upto 80 characters and description upto 240 characters. Type: the type of action of the group Threshold Group Member Block Action: The detail and summary action names Level: Populated automatically based on the action defined 5. Define an action set in the alerts action sets window
Action Set Name: User defined name Enabled Checkbox: Enable 6. Define the action details Seq: The sequence of the action Action: The summary threshold name Summary Threshold: The maximum number of exceptions that the alert Select statement can find before Oracle Alert switches from performing the detail action in the threshold group to performing the summary action.
****************************************************************** CREATING DISTRIBUTION LISTS Distribution lists let you predefine a set of message recipients for use on many actions. Application: Name of application Name: User defined name (upto 30 characters) Description: User defined (upto 240 characters) Mail Recipients Block To/CC/BCC: The mail IDs Note: Best practise is not to use alert output variables here.
****************************************************************** DEFINING PERIODIC SETS Periodic sets are created for alerts that need to be checked simultaneously. Application: The application Name Note: Only periodic alerts defiend under this application can be added in this periodic set. Name: User Defined name Description: <optional> (upto 240 characters) Periodic Set Memebers Block Seq: The sequence in which the alerts should fire. Application: Application of the alert Name: Periodic alerts defined earlier.
****************************************************************** TRANSFER ALERT An alert definition can be transferred to another database, or we can make a copy of an existing alert. Source Alert Block Application: Name of application of the alert. Alert: The name of alert we want to transfer Database: The user name and password of the database username/password Destination Alert Block Application: Name of application of the alert we want to transfer to. Alert: The new name for the alert. Database: The user name and password of the database where it has to be stored username/password
****************************************************************** REGISTERING CUSTOM APPLICATION Alerts can be defined for custom applications. The registered custom application has to be installed in alert manager responsibility to define alerts in it. They can be registered using below form. Application: The application that has to be registered, Oracle Username: Oracle ID associated with the custom application Status: Since this is not installed during auto upgrade it displays as custom for all the applications we register.
****************************************************************** ORACLE ALERT OPTIONS WINDOW Options window is used to define the options oracle alerts uses when checking alerts. Mail systems, Mail server options and Response Processing tabbed regions are no longer used. Message Elements Tab: Information such as Response Text, Message Action header and Footer are defined here. More options Tab: The details such as Business Day System, summary message widht, concurrent manager name are mentioned here.
****************************************************************** DEMO CREATING EVENT ALERTS Scenario: Create Event alerts to notify the DBA whenever an User is created or updated in the application STEP 1: Responsibility: Alert Manager Navigation: Alert -> Define Application: Application Object Library Name: EVENT_ALERT_TEST Description: <Optional> Select EVENT tab. EVENT DETAILS BLOCK Application: Application Object Library Table: FND_USER After Insert/ After Update Check box: Checked Keep Days: 1 End Date: <optional>
STEP 2: Click Actions Button ACTION TYPE: SQL Statement Script Action Name: Update Table Description: <optional> Action Level: Detail Click Action Details Button Action Type: SQL Statement Script Application: <optional> required if script is present in server path Arguments: For passing parameters dynamically Text:
ACTION TYPE: Submit Program Action Name: Submit Program Description: <optional> Action Level: Detail Click Action Details Button
Action Type: SQL Statement Script Application: Application Object Library Program Name: Active Users Arguments: For passing parameters dynamically
ACTION TYPE: Message Action Name: Send Mail Description: <optional> Action Level: Detail Click Action Details Button
List: <Optional> Reply To: If response needed default mail ID To: [email protected] Subject: User Altered CC: [email protected] BCC: [email protected] Text: The Following User has been created or Updated. User Name: &UNAME
STEP 3: Creating action sets for the alert. Click Action sets button Seq: 1 Action Set Name: SQL Action Set Enabled: Checked Click Action Set Details button Members Tab Seq: 1 Action: Update Table Type: Action: SQL Statement On Error Action: Set Seq: 2 Enabled: Checked
Seq: 2 Action Set Name: Submit Prog Set Enabled: Checked Click Action Set Details button Members Tab Seq: 1 Action: Submit Program Type: Action: Concurrent Program On Error Action: Abort Enabled: Checked
Seq: 3 Action Set Name: Send Mail Set Enabled: Checked Click Action Set Details button Members Tab
Seq: 1 Action: Send Mail Type: Action: Message On Error Action: Abort Enabled: Checked
STEP 4: Save the alert and verify in back end if the triggers have been created for the table. ALR_FND_USER_0_108_UAR ALR_FND_USER_0_108_IAR Are the 2 triggers created for after insert and after update.
STEP 5: Trigger the alert by updating or creating a new user. Navigation: System Administrator -> Security ->Define Altered existing User.
STEP 7: Check alert history. Navigation: Alert Manager Responsibility->History Application: Application Object Library Alert Name: EVENT_ALERT_TEST Click Find Actions Button
STEP 8: Verify if the actions have been performed. Action: Submit Program
Event alert successfully defined and tested. ***************************************************************** CREATING PERIODIC ALERTS Scenario: Create periodic alert to check the sales orders created for every 30 days. STEP 1: Responsibility: Alert Manager Navigation: Alert -> Define
Application: Application Object Library Name: PERIODIC_ALERT_DEMO Description: <Optional> Select PERIODIC tab PERIODIC DETAILS BLOCK Frequyency: Eery N Calendar Days Days: 30 Start Time: 09:00:00 Keep Days: 1 End Date: <optional> Last Day Checked: Populates automatically Select Statement:
SELECT order_number, header_id, ordered_date, cust_po_number, (SELECT MESSAGE_TEXT FROM FND_NEW_MESSAGES WHERE MESSAGE_NAME = 'XX_ALERT_DEMO' AND ROWNUM = 1) xx_msg INTO &p_order_number, &p_headre_id, &p_ordered_date, &p_cust_po_number, &p_xx_msg FROM oe_order_headers_all WHERE (ordered_date > (SYSDATE - 30) AND ordered_date < SYSDATE)
Note: In the above select statement you can find a message text referred from FND_NEW_MESSAGES table. This is used because there are limitations on the number of characters that can be entered in the text field for action sets. Hence hard coded text can be defiend as Application Messages and added as variable. Definin g Message Responsibility: Application Developer Navigation: Application->Messages Name: XX_ALERT_DEMO Language: US Application: Application Pbject Library
Current Message Text: The above orders have been created since the past 30 days. Kindly verify from your end and send us the consolidated report for the same.
Further steps are similar to the ones cretaed for EVENT alerts. STEP 2: Click Actions Button ACTION TYPE: Message Action Name: Send Mail Description: <optional> Action Level: Summary
Click Action Details Button Action Type: Message To: [email protected] Subject: Orders Created Text: =**= Enter summary template below this line =**= ** Order Number: &P_ORDER_NUMBER Ordered Date: &P_ORDERED_DATE Customer PO Number: &P_CUST_PO_NUMBER =**= Enter summary template above this line =**= &p_xx_msg Note: The action level selected above is SUMMARY thus the action is being performed once for all the exceptions detected. Hence a predefined template occurs for the text type and we need to place the ouput variables that has to be printed for each exception inside the template and the ones that need to be printed once in the message outside the template. &p_xx_msg is the message variable which stores content of the application message and gets printed at the end of the mail.
ACTION TYPE: SQL Statement Script Action Name: SQL Mail Description: <optional> Action Level: Detail Click Action Details Button Action Type: SQL Statement Script Text:
EXEC XX_send_mail;
STEP 3: Creating action sets for the alert. Click Action sets button
Seq: 1 Action Set Name: Summary Mail Enabled: Checked Click Action Set Details button Members Tab Seq: 1 Action: Send Mail Type: Action: Message On Error Action: Abort Enabled: Checked
Seq: 2 Action Set Name: SQL Set Enabled: Checked Click Action Set Details button Members Tab
Seq: 1 Action: sql Mails Type: Action: SQL Statement script On Error Action: Abort Enabled: Checked
STEP 4: Verify if the periodic alert is working fine. Set Frequency to On Demand or change the Start Date to sysdate in Check Window
Navigate to Alert Manager Responsibility->Request-> Check Application: Application Object Library Alert: PERIODIC_ALERT_DEMO Start Date: Sysdate gets populated
Click Submit Request button A program gets submitted in back end. View->Requests->Find
STEP 5: Check alert history. Navigation: Alert Manager Responsibility->History Application: Application Object Library Alert Name: PERIODIC_ALERT_DEMO
Click Find Exception Button Note: The application message text has been fetched into the variable P_XX_MSG
Click Find Checks Button Note: In the below screen shot you can see that in Summary mail action for the 25 Exceptions for the alert 1 Action has been performed. This is because we have defined the action level as SUMMARY. But for action SQL mails we have 20 actions since there it is DETAIL level.
Periodic alert created successfully and tested. ****************************************************************** ESCALATION ACTION DEMO
******************************************************************