Coming from MySQL I was wondering whether DB2 has something similar to MySQL's user@host access rights concept.

1 Answer 1


By default DB2 delegates all authentication to the operating system of the server, so the "host" is always the same -- the DB2 server host and the authenticated user ID does have the "host" component and all privileges are verified against the user ID only.

Depending on what you are actually trying to achieve, you may be able to restrict access to certain actions or objects via custom authentication plugin, workload manager controls, or row/column access control mechanisms.


Thanks to @IanBjorhovde for reminding us of yet another option: trusted contexts (see tutorial), although it still is not an exact match. Even though you can restrict clients with certain IPs from connecting to the database, authentication is still performed at the server, so it's not exactly "user@remote_host" but rather "user@server_host connecting from remote_host".


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.