We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now


Granting view schema for DB2 zSeries on mainframe

Irmawaty asked
Medium Priority
Last Modified: 2010-08-05
Hi experts,

I am trying to grant users a privilege to view some schemas on my DB2 mainframe. After looking around, I can only find this:

I don't want the users to be able to either create, drop, or alter. They only need to be able to see the schema and select tables in the schema.

Would you please kindly advise me on how to do this?

Thank you!!!
Watch Question

Irmawaty, grant select permissions to the user or group per table with a command like this:

Grant SELECT on table schema.tablename to user userid


Grant SELECT on table schema.tablename to group usergroup

You can't grant select privileges at the schema level.

hope this helps,

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
if there are alot of tables in the schema, granting select will be difficult, you can use following to create a script file:

SELECT 'GRANT SELECT ON ' || TABSCHEMA || '.' || TABLENAME || ' to user userA;' from syscat.tables where tabschema = 'DB2ADMIN';

easiest way to do this is to use the db2 Control Center.
Go to User abd Group Objects
Select DB Users
Select the user name, right click and choose change
From the tab selections, choose tables
Then choose Add table
Then select the schema name the tables
From the list of tables, highlight each table name in blue by clicking on it once, or click the entire group of tanles.
Click ok or apply
The tables are now put in new conatiner where you can set the select priv. You can do this one table at a time or highlight all the tables and adjust your priv allocations.
Click apply

Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.