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 > Stored procedure authority

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-28-11, 22:59
Randy_Roberts Randy_Roberts is offline
Registered User
 
Join Date: Jul 2011
Posts: 2
Stored procedure authority

I'm running db2 9.5 on AIX and have an authorisation issue on a SP:

Basically, the procedure creates a table (31 of them actually), then another process attempts to insert to the table(s). This causes a problem with authorisation as the inserter does not have insert authority on the table created from the procedure.

I don’t want to have the administrative overhead of granting to all the tables created in the procedure – is there another way of achieving this?

Cheers…
Reply With Quote
  #2 (permalink)  
Old 07-28-11, 23:09
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally Posted by Randy_Roberts View Post
I don’t want to have the administrative overhead of granting to all the tables
Then you can choose to have a security hole by granting the DBADM authority to the inserter. There's also a DATAACCESS authority but I don't think it'd been fully implemented before DB2 9.7.
Reply With Quote
  #3 (permalink)  
Old 07-29-11, 00:38
Randy_Roberts Randy_Roberts is offline
Registered User
 
Join Date: Jul 2011
Posts: 2
Thanks for the reply...

We don't really want to extend the authority on the inserter, so that rules that option out. Obviously we could issue grant statements for each of the tables created in the SP - which is an administrative overhead.

It's not clear to me how the authority of the SP is carried forward. In db2 Z - you can specify whether or not authority for the executing SP is based on the caller or the compiler of the SP. It seems in LUW that the compiler/binder of the SP is the authorisation that is used for the running of the SP.

Is there a way to make the callers authorisiation pass to the SP - this would also solve our problem.

Cheers
Reply With Quote
  #4 (permalink)  
Old 07-29-11, 02:43
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Randy_Roberts, I guess DYNAMICRULES option is the one you are after .

BIND - IBM DB2 9.7 for Linux, UNIX, and Windows

How to override the default bind options :

IBM DB2 9.7 for Linux, UNIX and Windows Information Center
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
Reply

Tags
stored procedure

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