Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Can someone please tell me what I'm doing wrong?
The owner of the procedure must have the privileges:
insert on eArchive.Users
select, delete on eSolutions.Users
directly and not within a role because roles are not
enable within a procedure.
--
Have a nice day
Michel
Wm. G. Urquhart <william_at_devnet-uk.net> a écrit dans le message :
vhV24.12318$0ju5.52167235_at_news5.usenetserver.com...
> Hi,
>
> I have a single instance or Oracle (8) running, and I have created two
> schemas in it one called eSolutions the other called eArchive. The first
> holds the active data the other holds the archived. However, when I try to
> run the following procedure (contained within the eSolutions schema) :
>
> CREATE PROCEDURE my_proc
> (vID IN NUMBER, OK OUT NUMBER)
> AS
> BEGIN
> SAVEPOINT del_usr ;
> SET TRANSACTION READ WRITE ;
>
> INSERT INTO eArchive.Users
> SELECT * FROM eSolutions.Users
> WHERE eSolutions.User_ID = vID ;
>
> DELETE FROM eSolutions.Users
> WHERE eSolutions.User_ID = vID ;
>
> IF SQLCODE = 0 THEN
> COMMIT ;
> ELSE
> ROLLBACK TO del_usr ;
> END IF ;
>
> OK := SQLCODE ;
>
> END ;
>
> I get an PLS-00201 error saying that User has to be declared. How do I get
> this to work.
>
> Thanx in advance.
>
> William Uurquhart.
>
>
>
>
>
Received on Tue Dec 07 1999 - 02:20:22 CST