Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2004

    Unanswered: Nested Procedures & Permissions

    I am wondering if it´s possible to get the same security schema for nested procedures in db2 as in SQLServer.

    I have made a main procedure that calls many utility procedures and that I want to avoid is that these utility procedures can be called directly.

    In sqlserver there´s no problem, because the utility procedures don´t need permission when called from inside a procedure.

    In db2 if I omit grant execute permission to the utility procedures I got an error.


  2. #2
    Join Date
    Jan 2005
    Several ways I can think of:

    - Use static sql (I suspect you are using dynamic) in the master SP. In this case it is the binder of the master SP's package that needs the execute permission on the sub-procedures - not callers of master SP.

    - Bind the master SP's package with DYNAMICRULES(BIND) and use dynamic sql. Again, it will be the binder's privileges that will be used to authorise the calls to the sub-procedures.

    - Use non-DB2 calls. Depending on the coding language you may be able to run the sub-procedures as sub-routines. There will be no direct interface from DB2 to them - only through the mechanisms in the master SP.

    James Campbell

Posting Permissions

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