How to grant all privileges on all tables in a schema to a user in IBM DB2?
If you want access to all data (ie, all tables in all schemas), you would need to grant dataaccess.
db2 grant dataaccess on database to user winuser1
If you only want winuser1 to access just the 100 tables in the schema you are referring to, then unfortunately, there is no easy way, you would need to grant SELECT on each table. That being said, it can be accomplished through scripting.
You could do the following
db2 -tnx "select distinct 'GRANT ALL ON TABLE '||
'\"'||rtrim(tabschema)||'\".\"'||rtrim(tabname)||'\" TO USER winuser1;'
from syscat.tables
where tabschema = 'myschema' " >> grants.sql
db2 -tvf grants.sql
This makes use of querying the system catalogs to dynamically generate a script to permission things. This is a lot of how we permission for users we don't want to give dataaccess to.
Here is a good page of the authorities for DB2.