SQL & PL/SQL :: How To Generate Email On Database Event

May 15, 2011

I've heard about diferent ways of generating email in response to a database event e.g

1 - Using UTL_MAIL package.
OR
2 - Event Driven Reporting feature of 10g Database and using SRW.Run_Report package to generate and mail a report.

Now I'm confused that how should I accomplish the following tasks:

(i) - How to generate an email after Insert/Update/Delete on a table and acknowledge the concerned users about that event?
(ii)- How to attach a text file with that email?

View 8 Replies


ADVERTISEMENT

How To Generate Email Based Trigger

May 9, 2011

I have a table in some db called retailer. I want to generate an email based trigger. What i want to achieve is as follows

I want to generate an email based trigger. What i want to do is that i should store the current retailer id which is until this point and then on each further insertions in retailer id i want that some trigger or script is running in background which is storing the retailer id. When the retailer id advances by 45 then a trigger should be generated saying that retailer id has advanced to 45 numbers from this date.

View 1 Replies View Related

Reports & Discoverer :: How To Generate Report And Send Straight To Email

Apr 11, 2013

How to generate a report and straight send it to an Email? I want to match student reg number and the parents email provided .

View 1 Replies View Related

SQL & PL/SQL :: Generate Auto Email To Concerned User Like A Schedule Date?

Feb 26, 2011

I am maintaining vehicles information of our company in our equipment master table and there is one field where I am storing one date ( Vehicle inspection due date) based on this date I want to generate auto email to concerned user like a schedule date is due and he needs to prepare his car for inspection .

This schedule will run on everyday basis and it will generate the email to concerned persons two days before. how I can setup this in oracle using Scheduler.

View 9 Replies View Related

Workflow :: No Event Subscriptions Exist For Event Error

Mar 6, 2013

we are running Oracle R12.1.3 on DB version 11.2.0.3. I just migrated a created a custom subscription for the oracle.apps.ap.supplier.event Oracle Event. I execute a custom package when this event fires. My package is working fine and I'm getting the expected results. My problem is I keep getting a Workflow notification saying:

Sent: Monday, March 04, 2013 9:14 PM
To: SYSADMIN
Subject: Action Required: Local Event UNEXPECTED : oracle.apps.ap.supplier.event / 36422

To               SYSADMIN
Sent               04-MAR-2013 21:13:40
ID               1659929
    
An Error occurred in the following Event Subscription: Event Subscription

Event Error Name:
Event Error Message: No Event Subscriptions exist for this Event
Event Error Stack:
Event Data: Event Data URL
Event Details
Event Field     Value
[code]...

I saw an earlier post about this and have tried changing the Source Type to "External" but that didn't change anything. why Workflow is telling me a subscription doesn't exist when my subscription is executing with no problems.

View 5 Replies View Related

SQL & PL/SQL :: Database Startup And Shutdown Event?

May 7, 2013

Any example of database startup event and database shutdown event?

View 2 Replies View Related

Database Time Spent Waiting % For Event Class Concurrency

Dec 4, 2012

Most of my day to day work involves the support of DB2 on AIX and z/OS. I support the database infrastructure for one business system that runs on the Oracle RDBMS. The application is Oracle Transportation Management. The non-production environments don't get much traffic. If I sign into the TEST or DEV Enterprise Manager DB Control screen, the following warning is almost always listed on the main page:

Metrics "Database Time Spent Waiting (%)" is at 44.00384 for event class "Concurrency"

Enterprise Manager reports that this metric is continuously fluctuating above and below the warning threshold of 30% of db time when the environment is idle.To investigate(and I am no oracle expert, far from it), I ran the following:

SELECT * FROM v$session_event
WHERE WAIT_CLASS='Concurrency'
ORDER BY TOTAL_WAITS DESC;

By far, the top two entries in the result are the following:
SIDEVENTTOTAL_WAITSTIME_WAITEDAVERAGE_WAITMAX_WAIT
124os thread startup12041423733.5218
359os thread startup150653433.5521
[code]...

Does this indicate a possible problem with the operating system?

View 2 Replies View Related

Reports & Discoverer :: Generate Report To Database Table?

Aug 25, 2011

Is it possible to save a report directly in a table instead of the typically destination? (file, cache,...)

View 4 Replies View Related

Data Guard :: Generate Log Sequence 1 At Standby Database Everyday

Apr 21, 2011

We have standby dataguard set up namely CRMSTDY of 3 node RAC clusterware. It has been observed that log sequence number 1 is generated since last 4 days on standby database. There is nothing more information in alert_standby.log file and the same file is visible when we checked with ASMCMD utility. Check the attached print sceen and suggest. Below mentioned system information.

DB : Release 10.2.0.4.0
OS : Linux Enterprise release 5.2 (Carthage)

View 2 Replies View Related

Forms :: Generate File From Database Into Server And Copy It To Client Machine

Feb 2, 2012

I have a forms that generate a file from database into database server and copy it to client machine by the follow process:

IF webutil_file_transfer.Is_AS_readable(V_server_way || V_file_name) THEN

l_success := webutil_file_transfer.AS_to_Client
(clientFile => :V_screen_way

[code]...

But is showing the erro ora-105100 in one client machine

View 9 Replies View Related

PL/SQL :: How To Know Trigger Event Name

Dec 3, 2012

how to know the trigger event name in trigger calling...like-

CREATE OR REPLACE TRIGGER ******
BEFORE DELETE OR INSERT OR UPDATE
OF TOTAL_QUANTITY,CANCELLED
ON *********
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
BEGIN

-----------I want to know given trigger event at this level-----------

  IF INSERTING  THEN
    null;
  ELSIF UPDATING  THEN
   null;
  ELSIF DELETING THEN
     null;
  END IF;
END;

View 7 Replies View Related

SQL*Net More Data From Client Wait Event?

Oct 8, 2013

DB 11.2.0.2AIX 6 

I am getting following two top wait events from AWR report

1)SQL*Net more data from client
2)log file sync 

Does it hints towards network latency and hardware configuration?what should i do for first wait event?

View 11 Replies View Related

PL/SQL Timer Wait Event Analysis

Jun 22, 2013

One of our Job running long than usual time. I checked the wtait event for which its waiting. its PL/SQL Timer wait. But i noticed the total waits is 179 and timed out is also 179 for PL/SQL Timer. I checked that job that particular procedure calls dbms_lock.sleep in it. I want to know why this wait event is getting timed out ?

View 1 Replies View Related

Long Waiting Session (Null Event)

Jan 5, 2012

I have a problem with a statement that normally execute in few second but after 50h the session is still active and is still waiting for null event.

V$session_wait

EVENT WAIT_TIME SECONDS_IN_WAIT STATE
---------------------------------------------------------------- ---------- --------------- -------------------
null event -1 178737 WAITED KNOWN TIME
V$session

SID STATUS PROGRAM LAST_CALL_ET
---------- -------- ------------------------------------------------ ------------
364 ACTIVE f90runm@CENTRAL1 (TNS V1-V3) 178737

My Oracle version : Oracle9i Enterprise Edition Release 9.2.0.2.0 - 64bit Production
System version : HP-UX V1

I tried tracing the session but no trace file is generated it same there is no activity.

View 5 Replies View Related

SQL & PL/SQL :: List Persons Having Event In Consecutive Months?

Apr 7, 2011

how to query a list to see if a person had events in consectutive months within the past year. We call a person a LongTermResident if they had a review in any two consectutive months within a reporting period. I wrote a function isResidentLongTerm, passing in FacilityID, ResidentID, ReportPeriodStart, and ReportPeriodStop and returning a 'Y' or 'N'. It works, but the performance is slow.

So if I have a list of reviewers, facilities, reviewees I want to select only those SNF/NF residents who have had routine reviews in any two consectutive months at the same facility.

This is my query:

select ConsultantID, ResidentID
from (
select distinct ConsultantID, FacilityID, ResidentID
from Reviews
where BedType = 17820 -- SNF/NF bed
and ReviewType = 17474 -- routine review
)
where isResidentLongTerm( FacilityID, ResidentID, :startDate, :stopDate ) = 'Y'

View 1 Replies View Related

SQL & PL/SQL :: Record Event If No Rows Are Returned Between Two Timestamp?

Feb 21, 2013

I have employees under a supervisor defines as below:

select LOGIN_USER_ID from APPWMS.VIEW_EMP_LATEST_INFO where SPVSR_LOGIN_USER_ID='erbrand' and EMP_STAT_CODE='ACTIVE'

Now I need to determine if all above employees are clocked in , clocked out or not clocked between yesterday and today using following:

select to_char(CLOCK_IN_DATE,'dd-mon-yyyy hh24:mi:ss' ) ClockIn,to_char(CLOCK_OUT_DATE,'dd-mon-yyyy hh24:mi:ss' ) ClockOut ,LOGIN_USER_ID,--CLOCK_IN_DATE,CLOCK_OUT_DATE, CLOCK_OUT_DATE-CLOCK_IN_DATE,trunc(sysdate) , trunc(sysdate-1),
case when CLOCK_OUT_DATE is null then
'Not clocked out'
else

[code]....

The first SQL gives me 66 rows while second gives me 40 rows. For 26 people , no rows are returned which means these people donot have a clock in record between two timestamps.

How can we modify query to show those 26 people as 'Not clocked In'

View 7 Replies View Related

Application Express :: Onchange Event On A Column - Value Undefined?

Jul 4, 2012

I have a onchange event on a column which calls the following code:
function SetVal(pThis) {
//get the curren row index on change
var currIndex = $('select[name="'+pThis.name+'"]').index(pThis);
var currValue = pThis.Value;
  alert(currValue);
  $s('P21_mat_id_hold',currValue);

}currValue is "undefined"

Where am I missing something?

View 3 Replies View Related

Sending Automated Emails From Oracle DB To Users After A Certain Event

Jul 17, 2012

OS: RHEL 5.7 64 bit
DB: 11.2.0.2 Standard Edition 64 bit

Everyday EOD is run and after the eod, users are requesting to receive a mail confirming the same from the database. For this we need to configure automated email which will be sent to a list of users email ID immediately after the EOD is done.

View 3 Replies View Related

Reports & Discoverer :: Error In Event Driven Report Procedure?

Mar 30, 2011

.I created the following procedure to implement Event Driven Reporting:

CREATE OR REPLACE procedure ABC.eve_drv_rep as
myPlist system.SRW_PARAMLIST;
myIdent system.SRW.Job_Ident;
BEGIN
myPlist := system.SRW_PARAMLIST(system.SRW_PARAMETER('',''));
system.srw.add_parameter(myPlist,'GATEWAY','apsIP/reports/rwservlet');

[code]...

Procedure is created successfully but when I execute this procedure, I get the following error:

ORA-20001'Error sending email.Error: ORA-20999
ORA-06512: at "Nml.Eve_Drv_Rep", line 17
ORA-06512: at line 1

2ndly I want to know that whether I should give IP address or Application Server Machine Name in GATEWAY parameter?
And in SERVER parameter either I should give the Application Server Machine Name or Report Server name installed on Application Server Machine?Lastly from where I can get the complete list of Parameters to be added in SRW.Add_Parameter like SERVER, GATEWAY etc.

note that we r using Database 10g Rel.2 and Forms and Reports services on Application Server and the report being called was developed in Reports 10g.

View 6 Replies View Related

Forms :: Wait Event During Execution Simple Select Statement

Jul 19, 2013

Yesterday i got wait event when executed simple select from table.This select was like:

SELECT emp_number from employer where subs_id = 111

I got one row, select is very fast.In our Core Bank System we have package with function which returns such information. I tested this select on test DB, and nothing wrong. But when I executed such select and package on Production DB, DB Admin saw that 88 sessions waits when my session release the resource. But what can happen, it was simple select? I used PL/SQL developer to get information from table:

1) SELECT emp_number from employer where subs_id = 111 then
2) Package with this function

Another users used Oracle Forms screen to execute package. How simple select statement could stop all DB?

BANNER
1Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
2PL/SQL Release 10.2.0.5.0 - Production
3CORE 10.2.0.5.0 Production
4TNS for 64-bit Windows: Version 10.2.0.5.0 - Production
5NLSRTL Version 10.2.0.5.0 - Production
[code]...

Forgot to say that after succeful execution on Prod DB I disconnected, and in EM my session was INACTIVE.

View 3 Replies View Related

Application Express :: Skillbuilders Modal Page - End Open Event?

Apr 24, 2013

I'm using Skillbuilders Modal Page 2.0.0. plugin on Apex 4.2, and I can't seem to get the event End Open to work. stumbled upon this thread Skillbuilder Modal Page - Dynamic Title; nothing happens even if I set an alert to pop up on End Open

View 7 Replies View Related

Performance Tuning :: High CPU Utilization In RAC And Log File Sequential Read Event

Apr 13, 2011

In a 3-node RAC setup; one node is showing high CPU utilization around 40~50%. The CPU utilization was less than 20% 10 days back but from 9th oldest day it jumped and consistently shows the double figure. I ran AWR reports on all three nodes and found one node with high CPU utilization and shows below tops events-

EVENT WAITS TIME(S) AVG WAIT(MS) %TOTAL CALL TIME WAIT CLASS
CPU
time 5,802 34.9

RFS
ping 15 5,118 33,671 30.8 Other

Log file sequential
read 234,831 5,036 21 30.3 System I/O

Sql*Net
more data from
client 24,1711,08745 6.5 Network

Db file sequential
read130,939 4533 2.7 User I/O

Findings:-
On AWR report(file attached) for node= sipd207; we can see that "RFS PING" wait event takes 30% of the waits and "log file sequential read" wait event takes 30% of the waits that occurs in database.

1)Are these symptoms of undersized log buffer?
2)I feel Network wait can be reduced by tweaking SDU & TDU values based on MDU.

View 2 Replies View Related

Application Express :: Capture On Change Event For Select List Using JavaScript

Nov 15, 2012

Is there any way I can capture on change event for the Select List (already created on the page) using java script and then refresh chart region?

View 2 Replies View Related

Server Administration :: Event Alert Created Successfully On Custom Table But Not Firing?

Mar 8, 2013

I have created custom table in inventory and after register table & columns, i create event alert on it. event alert is not firing.

View 1 Replies View Related

PL/SQL :: Wait Event Starts With SQL*Net Message From Client - Time Wait 178577 Units

Dec 11, 2012

I am trying to look at wait events for a long running query in TOAD.I start the query on one instance of TOAD and open the Session Browser on another instance.But I am surprised to find that in "TOtal Waits" on the RHS-> SQL*Net message from client is the longest time taking and is already -> 178577 units whereas I have just started the query.

Whereas in the Current Waits it shows DB File Scattered Read currectly as some seconds.

View 5 Replies View Related

SQL & PL/SQL :: How To Get Email Address From Xml

Dec 27, 2011

I want to know how can I find/take from In parameter who is xmltype an email address ?

My function: (clob is cast to xmltype)

function submit(session_id in number, claim in clob) return xmltype

For example - I have more e-mail addresses in this:

<emails>
wtfn00b1@yahoo.com
wtfn00b2@inbox.com
wtfn00b3@mail.com
...
</emails>

I know that there is `extract` function for xml. How can I know if there is break or space between the emails ?

View 9 Replies View Related

How To Setup Email In 11g

Aug 1, 2012

I migrated a server + data + APEX application from 10g to 11g. Now my email sending is all messed up because of the ACL in 11g. I can't seem to figure out how to appease it. I have the smtp server correctly set in the parameters. Here is the procedure I'm trying to use (from [URL]):

CREATE OR REPLACE PROCEDURE send_email(
  pFromUser IN VARCHAR2,
  pToUser IN VARCHAR2,
  pSubject IN VARCHAR2 DEFAULT NULL,
  pBody IN VARCHAR2 DEFAULT NULL)

[code]....

View 8 Replies View Related

Getting Name In Email Address (Oracle SQL Plus)

Nov 6, 2007

How do I select the name in an email address. I would like to be able to order a list of email addresses by the name of the person ie. what comes before the @ sign.

So is there a query I could use to get everything before the at line . So in pseudocode I would need to be able to do something like this.

select substr(email, indexOf(@)+1,email.length) from table order by email

So I how could I go about doing that?

View 2 Replies View Related

SQL & PL/SQL :: Send Email In Oracle?

Apr 24, 2013

what is the best way to send an email in oracle?

1.utl_smtp
2.utl_mail
3.utl_tcp

View 6 Replies View Related

SQL & PL/SQL :: Dbms_scehduler Email Notification

Sep 13, 2012

I have set up my dbms_scheduler schedule and all run fine. I have set up the smtp server for outgoing email and it all looks good just like multiple of our other boxes here.The problem is that the event (SUCCESS) for a job is raised yet the email notification is not sent. My question is this: Is there somewhere where the actual log of email notifications sent (and/or failure there-of) is actually kept?

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved