Oracle中的USEREVN()

1.USEREVN()

返回当前用户环境的信息,opt可以是: ENTRYID,SESSIONID,TERMINAL,ISDBA,LABLE,LANGUAGE,CLIENT_INFO,LANG,VSIZE

1.ISDBA   查看当前用户是否是DBA如果是则返回true SQL> select userenv('isdba') from dual;

USEREN ------ FALSE

2.SESSION 返回会话标志

SQL> select userenv('sessionid') from dual;

USERENV('SESSIONID') --------------------                   152

4.ENTRYID 返回会话人口标志

SQL> select userenv('entryid') from dual;

USERENV('ENTRYID') ------------------                   0

5.INSTANCE 返回当前INSTANCE的标志 SQL> select userenv('instance') from dual;

USERENV('INSTANCE') -------------------                    1

6.LANGUAGE 返回当前环境变量 SQL> select userenv('language') from dual;

USERENV('LANGUAGE') ---------------------------------------------------- SIMPLIFIED CHINESE_CHINA.ZHS16GBK

7.LANG 返回当前环境的语言的缩写 SQL> select userenv('lang') from dual;

USERENV('LANG') ---------------------------------------------------- ZHS

8.TERMINAL 返回用户的终端或机器的标志 SQL> select userenv('terminal') from dual;

USERENV('TERMINA ---------------- GAO

9.VSIZE(X) 返回X的大小(字节)数 SQL> select vsize(user),user from dual;

VSIZE(USER) USER ----------- ------------------------------            6 SYSTEM