Is there is a way in DB2 to update user id Special register USER ?
Thank's in advance.
Indeed - log in as a different user ;-)
However, if you're looking for a way to "impersonat e" another user -
you can do this on DB2 9 and above, but only with certain privileges.
First, someone with SECADM authority has to grant your user
SETSESSIONUSER privilege [1] on the user ID you wish to impersonate.
Then, when you logon you simply use SET SESSION_USER [2]:
CONNECT TO SAMPLE USER DB2ADMIN;
GRANT SETSESSIONUSER ON USER FRED TO USER BARNEY;
CONNECT RESET;
CONNECT TO SAMPLE USER BARNEY;
SET SESSION_USER FRED;
If Barney now does something like "VALUES USER;" he should see:
Comment