473,396 Members | 1,599 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 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 3218

"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Richard Holliingsworth | last post by:
Hello: I have an Access 2K form I built from a SQL Server 7.0 view. I want to lock certain fields in the database from users so they can see them on the views and forms, but NOT be able to edit...
3
by: Mike | last post by:
I have never written a trigger before, but I have a couple of uses for them now so I am trying. I have a view that I created and I want to have this trigger, run anytime the view is run. I don't...
3
by: wireless | last post by:
What is the best way to grant a user permission to create a view? I first created a role using enterprise manager but for the role I created it doesn't seem to offer that permission. It offers...
1
by: timc | last post by:
We are running SQL Server 2000 Developer Edition. I don't want to make the developers the sysadmin or even the dbo in the user databases. Is there a way to give them access to only view the...
1
by: Kelly Prendergast | last post by:
Is there a way to allow users to see the design view of a table without having dbo permissions? Thanks
4
by: sea | last post by:
I have a database in Access 2002 but I am unable to view code or write any modules when logged in with a limited user account using Windows XP, service pack 2 -- no problems when logging in as...
0
by: davebrad4d | last post by:
Please help me I am trying to port over some old 3rd party code (using XVT), and am using .net via managed c++. All my buttons and edit controls look great. However i can't get a virtual...
5
by: Grzegorz Danowski | last post by:
Hi I have two databases: Customers and Operations. In Customers database I have made a view based on a few tables from both Customers and Operations (left join - customers without any...
1
by: rdemyan via AccessMonster.com | last post by:
When users are setup in my app, the administrator can restrict the products that are available for viewing by the user. I have a table, Table 1, that lists the User Name, Product ID and Viewing...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.