Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

ibm db2 column access restrictions

Posted on 2010-09-24
4
Medium Priority
?
414 Views
Last Modified: 2012-05-10
Hi Experts,

I am asking a question on behalf of a friend.  I don't have any experience with IBM DB2, but the question is this:  Can we add a user that only has rights to view the data in specific columns on specific tables?  If yes, can you maybe provide a screenshot or two to show how it's done or at least a vivid enough explanation of how to do it, since I'm working blind to give my friend his answer?

Thanks!
Mike
0
Comment
Question by:thready
  • 2
  • 2
4 Comments
 
LVL 37

Accepted Solution

by:
momi_sabag earned 2000 total points
ID: 33753945
you can create a view that selects only this column from the table and grants the user permissions to the view and not to the table
0
 
LVL 1

Author Comment

by:thready
ID: 33754011
cool - do you have more specific info on how to create a view in DB2?  Is a view like a table, so that I could do queries on the view's columns?
0
 
LVL 37

Assisted Solution

by:momi_sabag
momi_sabag earned 2000 total points
ID: 33754064
sure,

create view view_name_comes_here
as
select column_you_want_him_to_see
from table_name_contAInING_That_column
;


grant select on view_name_comes_here to special_username_comes_here;
0
 
LVL 1

Author Closing Comment

by:thready
ID: 33754117
thanks!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
Creating a Cordova application which allow user to save to/load from his Dropbox account the application database.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question