DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: Grant ........Execute Procedure.....not working

  1. #1
    Join Date
    Oct 2000
    Posts
    28
    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



  2. #2
    Join Date
    Aug 2000
    Posts
    87
    hi sbhujbal,
    Can u try Execute scott.fire_employee(empno) and let me know if u are facing the same Error.

    Cheers,
    Vinod Kumar.



  3. #3
    Join Date
    Apr 2000
    Location
    Bangalore
    Posts
    16
    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]

  4. #4
    Join Date
    Oct 2000
    Posts
    28
    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
  •  


Click Here to Expand Forum to Full Width