Re: DBMS_ALERT from trigger does not work, why?

From: Thomas J. Kyte <tkyte_at_us.oracle.com>
Date: 1996/09/10
Message-ID: <32357018.1269435_at_dcsun4>#1/1


On Mon, 9 Sep 96 15:01:26 GMT, Almut Herzog <al-her_at_sectra.se> wrote:

>Hi,
>
>I try to use the DBMS_ALERT package from a trigger and it will not work
>though I can user DBMS_ALERT from the command line (see examples below)!
>So it's not as easy as "run catproc" or "grant execute on SYS.DBMS_ALERT
>to ME".

I think it is as easy as grant execute on dbms_alert to you. If you can execute it via an anonymous block but cannot create a stored object that accesses it, this indicates that you have access to it via a privelege granted to you from a role.

try granting execute to yourself.

>I never had trouble with this before, but I am not installing on my own
>server but on someone else's (i.e. I have not much rights to go roaming
>in the system and would anyway not know where to look).
>Any suggestions?
>Please reply by e-mail, too (it's faster!).
>TIA,
>
> Almut
>-----------------------
>
>SQL> create table t1 (t1 number(3));
>
>Table created.
>
>SQL> create or replace trigger tt1
> 2 after insert or update on t1
> 3 begin
> 4 dbms_alert.signal('hello', 'msg');
> 5 end;
> 6 /
>create or replace trigger tt1
>*
>ERROR at line 1:
>ORA-06550: line 4, column 3:
>PLS-00201: identifier 'SYS.DBMS_ALERT' must be declared
>ORA-06550: line 4, column 3:
>PL/SQL: Statement ignored
>------------------------
>
>SQL> begin
> 2 dbms_alert.signal('hello', 'msg');
> 3 end;
> 4 /
>
>PL/SQL procedure successfully completed.
>
>-------------------------
>SQL> select * from V$VERSION;
>
>Oracle7 Server Release 7.2.3.0.0 - Production Release
>PL/SQL Release 2.2.3.0.0 - Production
>CORE Version 3.4.3.0.0 - Production
>TNS for HPUX: Version 2.2.3.0.0 - Production
>NLSRTL Version 3.1.4.6.0 - Production
>
>
>--
>Almut Herzog
>SECTRA-Imtec AB e-mail: al-her_at_sectra.se
>Teknikringen 2 voice: ++46 13 235221
>583 30 Linkoping fax: ++46 13 212185
>SWEDEN
Thomas Kyte
Oracle Government
tkyte_at_us.oracle.com                          

http://govt.us.oracle.com

  • Check out Oracle Governments web site! ----- Follow the link to "Tech Center" and then downloadable Utilities for some free software...

statements and opinions are mine and do not necessarily reflect the opinions of Oracle Corporation Received on Tue Sep 10 1996 - 00:00:00 CEST

Original text of this message