By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,225 Members | 1,051 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,225 IT Pros & Developers. It's quick & easy.

View permissions

P: n/a
Can I construct a restricted view and grant select access on it to a
user without granting select access to the underlying tables and views?
This seems to be an easy way to restrict a user to just 'his part' of
the database.

Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a

"Robert Stearns" <rs**********@charter.net> wrote in message
news:10************@corp.supernews.com...
Can I construct a restricted view and grant select access on it to a
user without granting select access to the underlying tables and views?
This seems to be an easy way to restrict a user to just 'his part' of
the database.

Yes, you can give users access to views without giving them access to the
underlying tables. That is one of the main benefits of views in DB2.

Note that views may or may not be read-only, depending on how they are
defined. For example, if a view is defined on a join of two or more tables,
it is always automatically read-only. The exact rules for what makes a view
read-only are stated in the SQL Reference. If they are not read-only, you
may or may not want to take precautions to prevent updates via those views.

Also, views may be based on other views, to as many levels as you like so
that it is perfectly possible to have a view of a view of a view of a view.
Be careful though: if your view is based on another view or table, if that
object is dropped, your view also disappears, automatically and without
warning.

Rhino
Nov 12 '05 #2

P: n/a
Robert Stearns wrote:
Can I construct a restricted view and grant select access on it to a
user without granting select access to the underlying tables and views?
This seems to be an easy way to restrict a user to just 'his part' of
the database.


Yes, of course.

That's one of the benefits of views.

--
Knut Stolze
Information Integration
IBM Germany / University of Jena
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.