Query:
1) Generate grant statement to grant select privilege to user on all tables in schema
select 'grant insert, update, delete on table ' || trim(tabschema) || '.' ||
trim(tabname) || ' to user test;' from syscat.tables where type = 'T'
The above query generate grant statements
2) Run the Grant Statement to grant select and update access for all tables to user in schema
grant select,update on "tabschema"."tabname" to user "username"
where "tabschema" = Schema name of DB2 Instance
"tabname"= name of table
No comments:
Post a Comment