Personal tools
You are here: Home Forums DB2 How to set priviliges
Navigation
Log in


Forgot your password?
 
Document Actions

How to set priviliges

Up to DB2

How to set priviliges

Posted by abcd at November 13. 2008

Hi 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 abcd at November 27. 2008

Re: How to set priviliges

Posted by perallis at December 04. 2008

Hello 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
Security Awareness
Would you like your company to implement gamification into your security awareness program?





Polls