If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Nested Procedures & Permissions

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-01-05, 20:55
buckfast buckfast is offline
Registered User
 
Join Date: Sep 2004
Posts: 4
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.

Help!
Reply With Quote
  #2 (permalink)  
Old 03-02-05, 00:52
jacampbell jacampbell is offline
Registered User
 
Join Date: Jan 2005
Posts: 191
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On