471,853 Members | 1,245 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,853 software developers and data experts.

View permissions

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
2 3141

"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
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.

Similar topics

4 posts views Thread by Richard Holliingsworth | last post: by
3 posts views Thread by Mike | last post: by
3 posts views Thread by wireless | last post: by
1 post views Thread by Kelly Prendergast | last post: by
1 post views Thread by rdemyan via AccessMonster.com | last post: by
NeoPa
reply views Thread by NeoPa | last post: by
aboka
reply views Thread by aboka | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.