Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to determine the user that called a stored proc 1

Status
Not open for further replies.

ddiamond

Programmer
Apr 22, 2005
918
US
My platform is AS400 V5R4 DB2.

Is it possible for a sql stored procedure or stored function to determine what userid executed it? For example in oracle you could use the following select:
Code:
select user from dual ;
Is there anything equivalent for DB2?

 
The UserId is in the USER special register. The data type of the special register is VARCHAR(18).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top