java - How to grant database privileges in DB2 to other Domain users -
in java application, have created 2 databases in db2 administrative authorities. using application, want access same databases on lan need grant database privileges other (in same domain) domain users, can access same databases end users.
i have tried db2 grant command, doesn't allow others access database, if use same user/pwd of administrator, db2 allow them access databases. may security issue know administrator user/pwd.
is there way on command prompt i.e. db2cmd
grant connect,accessctrl,dataaccess,dbadm,secadm on database user kishore this command doesn't solve issue.
thanks in advance.
i did @ian bjorhovde suggested. db2 services running domain\admin , grant command executed still other domain users not able connect dbs (with own authentications) created admin. code used
drivermanager.getconnection("jdbc:db2://servername:50000/testdb", username, password); the connection created throws sql exception (sqlcode=-204) while firing select query on supplied username domain\username.
to authenticate against domain, db2 service (instance) must running using domain account - can't started using account defined on local machine. can stop instance , windows services panel change db2 service start using domain id.
make sure domain id has sufficient privileges, documented here.
Comments
Post a Comment