Is it possible to grant read-only access to Ingres tables?
From memory, I thought all SQL servers were pretty similar, and that you could
create a user with read access but no write access. Someone in my dept could
then login to the database using this ID and suck any data they wanted, safe
in the knowledge that they couldn't do any harm.
Our IT department have said they don't think it can be done, from limited past
experience I think it probably can.
Replies here or (preferrably) by mail: pa...@itl.net
Thanks in advance!
Paul
--
Paul Crick: pa...@cix.compulink.co.uk -- +44-1534-819755 (24 hours)
pa...@ivcdata.demon.co.uk -- PO Box 783, Jersey JE4 0SH, UK
Yes, it is. The most common way is using grants (e.g., grant select on TBL to
X). In
OpenIngres it is also possible to modify a table to readonly.
>
> From memory, I thought all SQL servers were pretty similar, and that you
could
> create a user with read access but no write access. Someone in my dept could
> then login to the database using this ID and suck any data they wanted, safe
> in the knowledge that they couldn't do any harm.
>
> Our IT department have said they don't think it can be done, from limited
past
> experience I think it probably can.
Grants are just ANSI standard stuff, nothing special.
>
> Replies here or (preferrably) by mail: pa...@itl.net
>
> Thanks in advance!
> Paul
Chip Nickolett Ch...@CaribouLake.com
Caribou Lake Software http://www.CaribouLake.com Java/RDBMS Solutions
Phone: 414-544-9954
When you need the best don't settle for less than Caribou Lake!
Off course you can.
Just (make) create an OS-user (say 'peeker' )
and than issue the statement:
grant select on my_table to user 'peeker' ;
You'll have to repeat this statement for each table .
You could also use the group or role mechanisms; see your sql-manual
for details.
A list of all tables can be obtained from the cataloginterface view
'iitables' . just do a "select table_name, table_owner from iitables" ,
and youll find out.
Happy hacking,
--
Adriaan van Kessel.
Ingres DBA, C/Unix hacker
Email: Adriaan.v...@NotThere.rivm.nl
(remove NotThere. from the above address)
The answers are correct but FYI
It also depends on how you want to connect to the DB server and how the
user(s) are t have access to the DB.
If connection via Ingres/Net and the user already has an application
controled ingres account with R/W privledges, then even if you create a
new ingres account with read only priv (grants to target tables), the
user can configure a new ingres/net Vnode for the R/W account and have
full access. This is ussually a sticking point if wanting a single user
to have multiple levels of access to a specific DB. (Ex/ full acces via
application and selet only for ad hoc queries).