Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2012
    Posts
    6

    Unanswered: How to restrict user from seeing other user's tables

    Can I somehow prevent user from seeing other users tables?
    Let's say I have users A and B. I don't want user B being able to describe user A tables (should not be able to do 'describe table A.table_name'). Also, if user is logged from control center (DB2 9.7) I would like him/her to see only their own tables.


    thank you

    Katarina

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    That would require revoking read permissions on the system catalog views, which would probably cripple the user functionality. I don't think there is a practical way of preventing a user from seeing just a subset of catalog view rows.

    What harm can there be in a user seeing some other schema's tables?
    ---
    "It does not work" is not a valid problem statement.

  3. #3
    Join Date
    Sep 2012
    Posts
    6
    Thank you.

    In my case I don't want user B to see what kind of information user A stores.

    I'm new to DB2, but thought that this would be doable as it is in Oracle. But Oracle has two catalog views, one showing only tables user has access to (all_tables) and another one for all tables in database (dba_tables) that typically only administartor has access to.

  4. #4
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Consider creating a separate database, not schema, for each user. Unlike Oracle, DB2 allows you to have multiple databases in a single instance. That would not be practical, of course, if the number of users is sufficiently large.
    ---
    "It does not work" is not a valid problem statement.

  5. #5
    Join Date
    Sep 2012
    Posts
    6
    There are too many users to create separate db for each.
    It seems I'll just have to allow users to see each others table structure.

    Thank you for help

  6. #6
    Join Date
    Jun 2007
    Location
    germany
    Posts
    155
    seems as if this is something that would be done for a class.
    are you the instructor?
    Dick Brenholtz, Ami in Deutschland

Posting Permissions

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