dbms_alert question

From: Larry Shaffer <shaffer_at_juno.hha.com>
Date: 24 Oct 1994 17:13:17 -0400
Message-ID: <38h81d$vas_at_juno.hha.com>


This is my first crack at using the dbms_pipe package, and I'm looking for some advice with a problem:

Using an example in the Application Developer's Guide (I know, mistake #1 is trusting the documentation :) ) I have created the following trigger:

   create or replace trigger inmsg_ar
   after insert on inmsg
   for each row
   begin
   dbms_alert.register ('inmsg_alert');
   dbms_alert.signal ('inmsg_alert',:new.message);    end;

The inmsg table is defined as:

   MSG_NUMBER                      NOT NULL NUMBER(4)
   MESSAGE                                  VARCHAR2(40

The following error occurs during the insert:

   insert into inmsg(msg_number,message) values (1,'test')

            *
   ERROR at line 1:

   ORA-04092: cannot COMMIT in a trigger
   ORA-06512: at "SYS.DBMS_ALERT", line 455
   ORA-06512: at "SYS.DBMS_ALERT", line 60
   ORA-06512: at line 3
   ORA-04088: error during execution of trigger 'HHATEST.INMSG_AR'


Is the dbms_alert package issuing a commit? The ADG leads me to believe otherwise. Is there something I'm missing? Any suggestions?

Thanks in advance.

Larry Shaffer
shaffer_at_hha.com   Received on Mon Oct 24 1994 - 22:13:17 CET

Original text of this message