In Oracle/PLSQL, the userenv function can be used to retrieve information about the current Oracle session. Although this function still exists in Oracle for backwards compatibility, it is recommended that you use the sys_context function instead.
The syntax for the userenv function is:
userenv( parameter )
parameter is the value to return from the current Oracle session. The possible values are:
[@more@]
Parameter Explanation CLIENT_INFO Returns user session information stored using the DBMS_APPLICATION_INFO package ENTRYID Available auditing entry identifier INSTANCE The identifier number of the current instance ISDBA Returns TRUE if the user has DBA privileges. Otherwise, it will return FALSE. LANG The ISO abbreviation for the language LANGUAGE The language, territory, and character of the session. In the following format:
language_territory.charactersetSESSIONID The identifier of the auditing session TERMINAL The OS identifier of the current session
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/95530/viewspace-1023319/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/95530/viewspace-1023319/
本文介绍了在Oracle/PLSQL中使用userenv函数来检索当前Oracle会话信息的方法。尽管出于向后兼容的原因此函数仍然存在,但推荐使用sys_context函数。文章详细列举了可以通过userenv函数获取的不同参数及其含义。
9044

被折叠的 条评论
为什么被折叠?



