SQLTeam.com | Weblogs | Forums

Application Context in SQL



Any one knows the MS SQL equivalent of Oracle dbms_application_info.read_client_info() and dbms_application_info.set_client_info() ?

I would like a way to insert (set_client_info()) and retrieve (set_client_info()) some user defined information i.e CurrentUserID + CurrentMenuStep into a memory variable that is specific to the current logged in user.




There are things like CURRENT_USER and SUSER_NAME which might get you what you need for CurrentUserID but no idea what CurrentMenuStep might be, sorry. There is very little in the way of "stuff" at the server end that maps onto what an Application is up to.


I doubt that MS SQL provides good, direct, replacements for those Oracle functions and thus it might be best if you describe what problem you are trying to solve and then folk here may be able to suggest how best to solve that in MS SQL.