-
Hello,
I am surprised and not able to understand grant....execute procedure.....How it works....???
I created one procedure called fire_employee under user scott. When executed like execute fire_employee(empno) it removes one employee from emp table.
Connected as scott user ...
I executed command grant execute on fire_employee to sunil.
( Here sunil is another user).
Then I connected as user 'sunil' and given command
execute fire_employee(3000)......It has given error like
SQL> execute fire_employee(3000);
begin fire_employee(3000); end;
*
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00201: identifier 'FIRE_EMPLOYEE' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
The meaning of error pls-00201 is
PLS-00201 identifier name must be declared
Cause: An attempt was made to reference an undefined variable, exception, procedure, function, or other object. Either the identifier was not declared or it was not within the scope of the reference.
Action: Check the spelling and declaration of the identifier. Also confirm that the declaration is placed correctly in the block structure.
Can anybody tell me what is wrong......???
Sunil
-
hi sbhujbal,
Can u try Execute scott.fire_employee(empno) and let me know if u are facing the same Error.
Cheers,
Vinod Kumar.
-
Hi Sunil,
Connect as Scott, create public synonym on the procedure
as,
SQL> create public synonym fire_employee for fire_employee;
then execute under Sunil . It will work.
Otherwise include the owner name(scott) also while executing under sunil.
Thanks,
Bhaskar
[Edited by Bhaskara on 11-11-2000 at 02:38 PM]
-
Hello Vinod,Bhaskar,
I executed by execute scott.emplye_fire(3000) and it worked.
Thanks......for prompt reply.
Sunil
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|