赞
踩
select sys_guid() from dual;
select username,user_id from dba_users where user_id=uid;
select user from dual;
- SELECT SYS_CONTEXT('USERENV', 'TERMINAL') 客户端名称,
- SYS_CONTEXT('USERENV', 'LANGUAGE') 客户端语言,
- SYS_CONTEXT('USERENV', 'SESSIONID') sessionid,
- SYS_CONTEXT('USERENV', 'INSTANCE') instance,
- SYS_CONTEXT('USERENV', 'ENTRYID') entryid,
- SYS_CONTEXT('USERENV', 'ISDBA') isdba,
- SYS_CONTEXT('USERENV', 'NLS_TERRITORY') 地区,
- SYS_CONTEXT('USERENV', 'NLS_CURRENCY') 货币,
- SYS_CONTEXT('USERENV', 'NLS_CALENDAR') nls_calendar,
- SYS_CONTEXT('USERENV', 'NLS_DATE_FORMAT') 时间格式,
- SYS_CONTEXT('USERENV', 'NLS_DATE_LANGUAGE') 时间语言,
- SYS_CONTEXT('USERENV', 'NLS_SORT') nls_sort,
- SYS_CONTEXT('USERENV', 'CURRENT_USER') current_user,
- SYS_CONTEXT('USERENV', 'CURRENT_USERID') current_userid,
- SYS_CONTEXT('USERENV', 'SESSION_USER') session_user,
- SYS_CONTEXT('USERENV', 'SESSION_USERID') session_userid,
- SYS_CONTEXT('USERENV', 'PROXY_USER') proxy_user,
- SYS_CONTEXT('USERENV', 'PROXY_USERID') proxy_userid,
- SYS_CONTEXT('USERENV', 'DB_DOMAIN') db_domain,
- SYS_CONTEXT('USERENV', 'DB_NAME') 数据库名称,
- SYS_CONTEXT('USERENV', 'HOST') 客户端完成名称,
- SYS_CONTEXT('USERENV', 'OS_USER') 客户端用户,
- SYS_CONTEXT('USERENV', 'EXTERNAL_NAME') external_name,
- SYS_CONTEXT('USERENV', 'IP_ADDRESS') 客户端IP地址,
- SYS_CONTEXT('USERENV', 'NETWORK_PROTOCOL') 网络协议,
- SYS_CONTEXT('USERENV', 'BG_JOB_ID') bg_job_id,
- SYS_CONTEXT('USERENV', 'FG_JOB_ID') fg_job_id,
- SYS_CONTEXT('USERENV', 'AUTHENTICATION_TYPE') authentication_type,
- SYS_CONTEXT('USERENV', 'AUTHENTICATION_DATA') authentication_data
- FROM DUAL
结果:
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。