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 > Automatically granting lost privileges

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-11-10, 09:36
dharmaraj_ganesan dharmaraj_ganesan is offline
Registered User
 
Join Date: Aug 2008
Posts: 23
Automatically granting lost privileges

Hello ppls,

We are using DB2 V8.2 for ERP(peoplesoft application)

Developers most of the time drop and recreate the tables via application side (not from DB side)

As everyone know, dropping the table removes all the privileges pertaining to that table.

The moment that table got dropped, i would like to grant select & update privileges to 3 - 4 users. Also i would like to automate this process.

Is there anyway we can do that? Trigger is out of scope, as there is no option of 'after create/drop'.

Will be great if anyone can shed some lights over here. Thanks.
Reply With Quote
  #2 (permalink)  
Old 05-11-10, 09:42
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
If the programmers are dropping and recreating tables via the application, then they should also recreate the privileges.

Andy
Reply With Quote
  #3 (permalink)  
Old 05-11-10, 09:47
dharmaraj_ganesan dharmaraj_ganesan is offline
Registered User
 
Join Date: Aug 2008
Posts: 23
No Andy,

(Peoplesoft) tool gives you the possibility of dropping and recreating only.

It is not having the flexibility of adding a extra DDL statement to it.
Reply With Quote
  #4 (permalink)  
Old 05-11-10, 09:59
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Unless you can have a window from when the table gets created to when the privileges get granted, you have a problem. The best I can offer is to set up a monitoring script on the server that detects a new table and then grants the privileges. Then schedule the script to run every few minutes (whatever your window is).

Andy
Reply With Quote
  #5 (permalink)  
Old 05-11-10, 10:27
dharmaraj_ganesan dharmaraj_ganesan is offline
Registered User
 
Join Date: Aug 2008
Posts: 23
My window is very small. As mentioned by you, i will have scripts scheduled as the last option.

Thanks andy for your inputs.
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