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 > privilege

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-10-09, 05:17
oracle10gsingh oracle10gsingh is offline
Registered User
 
Join Date: Nov 2007
Posts: 72
privilege

Hi,
I have an requirement .

i want to insert into a table with user x via stored procedure.but that user should not be able to insert into that table directly and should not have any privilege on that table.

how can i achieve this ?
Please help ASAP
Reply With Quote
  #2 (permalink)  
Old 04-10-09, 06:20
rahul_s80 rahul_s80 is offline
Registered User
 
Join Date: Jul 2006
Location: Pune , India
Posts: 433
Just create the procedure and grant execute to that user. DB2 will take care of your requirement
__________________
Rahul Singh
Certified DB2 9 DBA / Application Developer
Reply With Quote
  #3 (permalink)  
Old 04-10-09, 06:49
oracle10gsingh oracle10gsingh is offline
Registered User
 
Join Date: Nov 2007
Posts: 72
i did think of creating a stored procedure give privileges within the stored procedure and invoke them in the end ...but lot many ppl will be running this stored procedure so while 2 ppl are running the stored procedure 1 is giving a rite and second is revoking it ..when they both are running it ..
Reply With Quote
  #4 (permalink)  
Old 04-10-09, 07:52
rahul_s80 rahul_s80 is offline
Registered User
 
Join Date: Jul 2006
Location: Pune , India
Posts: 433
I think you have misunderstood.... i m talking about execute priv

When a user executes a package that contains static SQL statements,
explicit privileges for database objects referenced in the statements are
not required. The user only needs EXECUTE privilege on the package to
execute the statements. However, this does not mean that the user has
direct access to the underlying database objects.
__________________
Rahul Singh
Certified DB2 9 DBA / Application Developer
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