Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Calling DBMS_ALERT from a package.

Re: Calling DBMS_ALERT from a package.

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Mon, 06 Jul 1998 14:55:56 GMT
Message-ID: <35a2e541.7253850@192.86.155.100>


A copy of this was sent to Jens Fudickar <jens.fudickar_at_mni.fh-giessen.de> (if that email address didn't require changing) On Mon, 06 Jul 1998 13:22:55 +0100, you wrote:

>Hello all together.
>
>I have a problem calling a function from the DBMS_ALERT package from my
>own package or stored procedure.
>
>
>This is a test-procedure.
>CREATE OR REPLACE PROCEDURE test88 IS
>BEGIN
> dbms_alert.signal ('test', 'Test');
>END test88;
>
>Compiling this raised the following compiler-message:
>PLS-00201 : identifier "SYS.DBMS_ALERT" must be declared.
>

roles are never enabled during the execution of a procedure and you cannot create stored objects that reference objects you can see because of a grant to a role...

Try this:

SQL> set role none;
SQL> "statement you want to test to see if it'll work in a procedure"

If you can do it in plus with no roles you can do it in a procedure. If you can't, you must have the privelege from a role and hence won't be able to do it in a stored procedure..

Grant the privelege (execute on dbms_alert) directly to the owner of the procedure and it'll work.

>Calling this package from an anonymous block, there is no problem.
>BEGIN
> dbms_alert.signal ('test', 'Test');
>END ;
>
>Can anyone tell me, what i have to do, to call a procedure form the
>DBMS_ALERT Package.
>
>The same problem is with DBMS_PIPE, but there is no problem with
>DBMS_OUTPUT.
>
>Hope, that anyone can help me.
>
>Jens
>
>
>Viel Erfolg
 

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA  

http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Mon Jul 06 1998 - 09:55:56 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US