Results 1 to 11 of 11

Thread: User Permission

  1. #1
    Join Date
    Jan 2009
    Posts
    153

    Unanswered: 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

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Read the Manual for the GRANT statement.

    Andy

  3. #3
    Join Date
    Jan 2009
    Posts
    153
    Where can i get the manual? I am a newbie to DB2..

  4. #4
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    What DB2 version and OS?

    Andy

  5. #5
    Join Date
    Jan 2009
    Posts
    153
    DB2 Version 9.5A express and OS is Windows XP Professional

  6. #6
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5

  7. #7
    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?

  8. #8
    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

  9. #9
    Join Date
    Feb 2008
    Posts
    62
    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

  10. #10
    Join Date
    Jan 2009
    Posts
    153
    Thanks Prashant

  11. #11
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •