Hi,
Is it possible to revoke from public select from 'all' tables, in one command.
thanks
pete
db2 v 8.2
Mark A - 19 Jan 2005 14:20 GMT
> Hi,
> Is it possible to revoke from public select from 'all' tables, in one command.
>
> thanks
> pete
> db2 v 8.2
No, but you can revoke the ability to connect (granted by default to public)
to the database.
Another DB2 UDB DBA - 21 Jan 2005 07:05 GMT
You could generate a list of revoke statements by selecting against the
system catalog:
select 'revoke select on table',
rtrim(tabschema)||'.'||tabname,
'from public'
from syscat.tables
where type='T'
and tabschema not like 'SYS%'
;
If you ran that query from the DB2 CLP with options -txz
<outputfilename>, you could run the resulting file with db2 -f
Is that kind of what you're looking for?