Re: Using dbms_alert

From: Scott Urman <surman_at_oracle.com>
Date: 1995/08/31
Message-ID: <424qd5$ovl_at_inet-nntp-gw-1.us.oracle.com>#1/1


In article <4235mo$6le_at_newsbf02.news.aol.com>, egokhman_at_aol.com (E Gokhman) writes:
|> Hi,
|>
|> For some reason, when I try to use dbms_alert in a store procedure
|> inside of a package I get complaint, but when I execute dbms_alert
|> statements by themselves (in sqlplus) it's ok. Here is the errors
|> I get. I get no problems executing dbms_output.
|>
|> Thanx in advance, Ed Gokhman
|>
|>
|> create procedure mywait(channel in varchar2) as
|> message varchar2(256) := 'nothing';
|> status integer := 0;
|> begin
|> dbms_alert.register(channel);
|>
|> dbms_alert.waitone(channel, message, status, 0);
|>
|> if status = 0 then
|> dbms_output.put_line(message);
|> end if;
|>
|> end mywait;
|> /
|>
|> show errors;
|>
|> Errors for PROCEDURE MYWAIT:
|>
|> LINE/COL ERROR
|> -------- -----------------------------------------------------------------
|> 5/5 PLS-00201: identifier 'DBMS_ALERT' must be declared
|> 5/5 PL/SQL: Statement ignored
|> 7/2 PLS-00201: identifier 'DBMS_ALERT' must be declared
|> 7/2 PL/SQL: Statement ignored
|> SQL>
|>
|> --Count Edyulya, the man and the legend
You have been granted EXECUTE on the DBMS_ALERT package via a role. All roles are disabled inside stored procedures. Connect as SYS or SYSTEM, and grant EXECUTE on DBMS_ALERT directly to the user who owns the mywait procedure. Received on Thu Aug 31 1995 - 00:00:00 CEST

Original text of this message