Home » SQL & PL/SQL » SQL & PL/SQL » Problem with PIPES (10g, win 2000)
Problem with PIPES [message #311743] Sun, 06 April 2008 07:34 Go to next message
durgadas.menon
Messages: 365
Registered: December 2007
Location: Nowhere
Senior Member
Hi,

I am getting error

Quote:
identifier 'dbms_pipe' must be declared


when I try to create this procedure

create or replace procedure pr1 

status number;

a varchar(40) := 'Hi';
begin

dbms_pipe.reset_buffer;

status := dbms_pipe.create_pipe('test');

dbms_pipe.pack_message(a);

status := dbms_pipe.send_message('test');

end;


but it runs fine when I use the same code in an anonymous block

Can anyone tell me why? also if I want to make a named pl/sql block of this code then what should be done?

- Das
Re: Problem with PIPES [message #311747 is a reply to message #311743] Sun, 06 April 2008 08:50 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Privileges granted through roles are not enabled in stored procedures.
Read this and you will never forget.

By the way, you did not copy verbatim your test-procedure script.

[Updated on: Sun, 06 April 2008 08:51]

Report message to a moderator

Re: Problem with PIPES [message #311795 is a reply to message #311747] Sun, 06 April 2008 21:47 Go to previous messageGo to next message
durgadas.menon
Messages: 365
Registered: December 2007
Location: Nowhere
Senior Member
Thanks...

I tried doing the same in SYSTEM login and it worked..I exclusively granted rights on dbms_pipe to the user (practice1) and now it compiles...

and how exactly did you know this...

Quote:
you did not copy verbatim your test-procedure script


- Das

Re: Problem with PIPES [message #311821 is a reply to message #311795] Mon, 07 April 2008 00:31 Go to previous message
Frank
Messages: 7880
Registered: March 2000
Senior Member
You forgot the IS or AS after the create procedure line
Previous Topic: conditions for analytic function
Next Topic: BLOB value null: empty locator
Goto Forum:
  


Current Time: Thu Dec 08 04:11:49 CST 2016

Total time taken to generate the page: 0.19427 seconds