Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / October 2004

Tip: Looking for answers? Try searching our database.

View permissions

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Robert Stearns - 13 Oct 2004 15:20 GMT
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.
Rhino - 13 Oct 2004 15:57 GMT
> 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
Knut Stolze - 18 Oct 2004 11:02 GMT
> 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.

Signature

Knut Stolze
Information Integration
IBM Germany / University of Jena

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.