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 > User Permission

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-29-09, 08:25
ratheeshknair ratheeshknair is offline
Registered User
 
Join Date: Jan 2009
Posts: 153
User Permission

Hi Experts,

I have three database A,B and C and i have two users user1 and user2.

I want only user1 to access objects under database A and C and USER2 to access objects under database B and C..How to achieve this .

Please reply ..its urgent

TIA
Reply With Quote
  #2 (permalink)  
Old 04-29-09, 08:38
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Read the Manual for the GRANT statement.

Andy
Reply With Quote
  #3 (permalink)  
Old 04-29-09, 08:42
ratheeshknair ratheeshknair is offline
Registered User
 
Join Date: Jan 2009
Posts: 153
Where can i get the manual? I am a newbie to DB2..
Reply With Quote
  #4 (permalink)  
Old 04-29-09, 09:28
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
What DB2 version and OS?

Andy
Reply With Quote
  #5 (permalink)  
Old 04-29-09, 11:26
ratheeshknair ratheeshknair is offline
Registered User
 
Join Date: Jan 2009
Posts: 153
DB2 Version 9.5A express and OS is Windows XP Professional
Reply With Quote
  #6 (permalink)  
Old 04-29-09, 11:30
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Reply With Quote
  #7 (permalink)  
Old 04-30-09, 03:33
ratheeshknair ratheeshknair is offline
Registered User
 
Join Date: Jan 2009
Posts: 153
Thanks Andy..

I created two users and one give access to one database but still the other user which havenot given any access is able to connect to that DB?
Reply With Quote
  #8 (permalink)  
Old 04-30-09, 05:34
rahul_s80 rahul_s80 is offline
Registered User
 
Join Date: Jul 2006
Location: Pune , India
Posts: 433
grant connect may be given to public. revoke from Public
__________________
Rahul Singh
Certified DB2 9 DBA / Application Developer
Reply With Quote
  #9 (permalink)  
Old 04-30-09, 08:05
prashant44 prashant44 is offline
Registered User
 
Join Date: Feb 2008
Posts: 59
You can do the following:

db2 connect to A
db2 revoke connect on database from public

db2 connect to B
db2 revoke connect on database from public


db2 connect to C
db2 revoke connect on database from public



db2 connect to A
db2 grant dbadm on database to user1

db2 connect to B
db2 grant dbadm on database to user1
db2 grant dbadm on database to user2

db2 connect to C
db2 grant dbadm on database to user1

Note that "dbadm" authority has a full control on database. If you want the grants more specific on the database object level then you can follow the reference manual

Regards,
Prashant
Reply With Quote
  #10 (permalink)  
Old 04-30-09, 11:05
ratheeshknair ratheeshknair is offline
Registered User
 
Join Date: Jan 2009
Posts: 153
Thanks Prashant
Reply With Quote
  #11 (permalink)  
Old 07-23-09, 11:23
mioot mioot is offline
Banned
 
Join Date: Jul 2009
Posts: 4
right click on the database select authority it takes u to permission granding wizard from where u can set the privilege
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