Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2002
    Location
    Hamilton
    Posts
    150

    Unanswered: Stored Procedure problem

    DB2 V8 on AIX 5.2 FP2

    I have a database that needs to accessed by another id to execute some stored procedures

    I issued the below grant statement

    $ db2 grant execute on package P4041283 to user blah

    where the P### is associated with the stored proc

    Then when the user tries to execute his unit of work he gets the below message

    A0078 Stored Proc execute error. GetDeliverableRequests (process_completed_reque
    sts)
    I0006 SQLState: 42501 (checkStmtHandle)
    I0006 SQLMsg: [IBM][CLI Driver][DB2/6000] SQL0551N "USER" does not have th
    e privilege to perform operation "EXECUTE" on object "USER1.GETDELIVERABLEREQUE
    STS". SQLSTATE=42501
    (checkStmtHandle)
    I0006 Context: hstmtGetDeliverableRequests (checkStmtHandle)
    A0078 Stored Proc execute error. GetDeliverableRequests (process_completed_reque
    sts)
    I0006 SQLState: 42501 (checkStmtHandle)
    I0006 SQLMsg: [IBM][CLI Driver][DB2/6000] SQL0551N "USER" does not have th
    e privilege to perform operation "EXECUTE" on object "USER1.GETDELIVERABLEREQUE
    STS". SQLSTATE=42501
    (checkStmtHandle)
    I0006 Context: hstmtGetDeliverableRequests (checkStmtHandle)

    Am i granting the proper authority or is there something else I am missing?

    thanks

    mark

  2. #2
    Join Date
    Jan 2004
    Location
    Tallahassee, FL, USA
    Posts
    96
    if other other user re-build the stored procedure , anther user , try execute it , he will get not auther to execute error, chek some body ( other that executing user) re-build the procedure.

    from sysibm.sysprocedures.

    hope , it may helps , if any info or questions ,let me know.


    thank you

    Lekharaju ennam

  3. #3
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    In Version 8, you have a new GRANT statement

    GRANT EXECUTE ON PROCEDURE TO <authorization name>

    HTH

    Sathyaram
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  4. #4
    Join Date
    Feb 2002
    Location
    Hamilton
    Posts
    150
    Thanks Sathyaram

    your post worked, I looked at V 8 documentation but didn't see that grant option

    Mark

  5. #5
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    Visit the new-look IDUG Website , register to gain access to the excellent content.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •