How to set priviliges
Up to DB2How to set priviliges
Posted by abcd at November 13. 2008Hi i need to set priviliges in DB2 list some set of users can't some set of tables.How to implement this .can any one help on this.
Regards
kanakaraju.Y
Re: How to set priviliges
Posted by perallis at December 04. 2008Hello KanaKaraju,
First Step - Check the priveliges all users have in a specif table
db2 " select substr(GRANTOR,1,40),substr(GRANTEE1,40), CONTROLAUTH, \
ALTERAUTH, DELETEAUTH, INDEXAUTH, INSERTAUTH, REFAUTH, SELECTAUTH, \
UPDATEAUTH from SYSCAT.TABAUTH where TABSCHEMA='<tabschema_name>'
and TABNAME='<tab_name>'"
db2 " select substr(GRANTOR,1,40),substr(GRANTEE1,40), CONTROLAUTH, ALTERAUTH, DELETEAUTH, INDEXAUTH, INSERTAUTH, REFAUTH, SELECTAUTH, UPDATEAUTH from SYSCAT.TABAUTH where TABSCHEMA='<tabschema_name>' and TABNAME='<tab_name>'"
Second Step: Grant or revoke the privelege that you want
db2 GRANT SELECT, insert ON <tabschema_name>.<tab_name>' TO USER <user_name>
Powered by
Ploneboard