Coming from MySQL I was wondering whether DB2 has something similar to MySQL's user@host access rights concept.
DB2 – Does DB2 Support Host-Based Access Control?
access-controldb2
Related Question
- Db2 – Adding User access to DB2
- Db2 – Adding group rights in db2 for a stored procedure
- DB2 LUW – Usage of Modules in Stored Procedures
- DB2 – Does Primary Key Order Data?
- DB2 Connection Error – Data Access Tool Failed to Connect
- Database Design – Access Control List (ACL) Structure
- DB2 Permissions – Granting SELECT on syscat.schemata
- Create Temporary Access to production support
Best Answer
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.
Edit
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".