网站首页
JSP空间
动态资讯
开源项目
技术文档
资源下载
J2EE资源
客户论坛
在线支付
 
  技术文档>>数据库技术>>Oracle技术>>Oracle开发>查看文档  
  oracle 9i sys_context函数的使用方法     
  文章作者:未知  文章来源:赛迪网技术社区  
  查看:70次  录入:管理员--2008-07-04  
 

【赛迪网-it技术报道】此函数在写一些触发器和函数的时候非常有用处。

用法:

select sys_context('userenv', '') from dual;

第二个参数的可选值:

authentication_data

data being used to authenticate the login user. for x.503 certificate authenticated sessions, this field returns the context of the certificate in hex2 format.

note: you can change the return value of the authentication_data attribute using the length parameter of the syntax. values of up to 4000 are accepted. this is the only attribute of userenv for which oracle implements such a change.

authentication_type

how the user was authenticated:

database: username/password authentication

os: operating system external user authentication

network: network protocol or ano authentication

proxy: oci proxy connection authentication

bg_job_id

job id of the current session if it was established by an oracle background process. null if the session was not established by a background process.

client_info

returns up to 64 bytes of user session information that can be stored by an application using the dbms_application_info package.

current_schema

name of the default schema being used in the current schema. this value can be changed during the session with an alter session set current_schema statement.

current_schemaid

identifier of the default schema being used in the current session.

current_user

the name of the user whose privilege the current session is under.

current_userid

user id of the user whose privilege the current session is under.

db_domain

domain of the database as specified in the db_domain initialization parameter.

db_name

name of the database as specified in the db_name initialization parameter.

entryid

the available auditing entry identifier. you cannot use this option in distributed sql statements. to use this keyword in userenv, the initialization parameter audit_trail must be set to true.

external_name

external name of the database user. for ssl authenticated sessions using v.503 certificates, this field returns the distinguished name (dn) stored in the user certificate.

fg_job_id

job id of the current session if it was established by a client foreground process. null if the session was not established by a foreground process.

host

name of the host machine from which the client has connected.

instance

the instance identification number of the current instance.

ip_address

ip address of the machine from which the client is connected.

isdba

true if you are logged on as sys.

lang

the iso abbreviation for the language name, a shorter form than the existing 'language' parameter.

language

the language and territory currently used by your session, along with the database character set, in the form:language_territory.characterset.

network_protocol

network protocol being used for communication, as specified in the 'protocol=protocol' portion of the connect string.

nls_calendar

the current calendar of the current session.

nls_currency

the currency of the current session.

nls_date_format

the date format for the session.

nls_date_language

the language used for expressing dates.

nls_sort binary

or the linguistic sort basis.

nls_territory

the territory of the current session.

os_user

operating system username of the client process that initiated the database session.

proxy_user

name of the database user who opened the current session on behalf of session_user.

proxy_userid

identifier of the database user who opened the current session on behalf of session_user.

session_user

database user name by which the current user is authenticated. this value remains the same throughout the duration of the session.

session_userid

identifier of the database user name by which the current user is authenticated.

sessionid

the auditing session identifier. you cannot use this option in distributed sql statements.

terminal

the operating system identifier for the client of the current session. in distributed sql statements, this option returns the identifier for your local session. in a distributed environment, this is supported only for remote select statements, not for remote insert, update, or delete operations.

(the return length of this parameter may vary by operating system.)

 
 
上一篇: oracle数据库维护常用sql语句集合(2)    下一篇: 用quick slice获取oracle进程的线程状态
  相关文档
讲解oracle freelist和hwm的性能优化 (1) 03-31
在单机上创建物理oracle数据库9i standby 07-17
对系统默认的约束名和索引名进行重命名 03-03
为什么同机安装10g和11g后会出现连接问题 04-17
oracle数据库sql语句性能调整的基本原则 (1) 05-07
sql语句格式化数字(前面补0)的参考示例 07-01
两个有用oracle运算:intersect和minus运算 08-14
轻松接触oracle9i中的一个特殊等待事件 11-22
丢失归档日志文件后数据库应当如何恢复 (1) 04-16
解析:oracle热备期间过量redo生成控制 11-15
教你轻松掌握Oracle与SQL Server的区别 09-01
解析:ORACLE性能调整--统计信息的迁移 08-05
同时使用数据库链和序列时的注意事项 (1) 02-27
轻松掌握分布式数据库全局名与数据库链 09-29
深刻理解Oracle数据库的启动和关闭 01-15
教你快速掌握oracle数据库的备份策略 04-14
Oracle中自动工作负载信息库(AWR)介绍 04-12
在Oracle 10g中如何获得索引建议 05-13
移动一个带有lob字段的表到另外一个表空间 03-06
oracle数据库中如何对时间格式进行处理 03-19
返回首页 | 关于我们 | J网章程 | JSP空间合租 | 客服中心 | 免责声明 | 常见问题 | 参观机房
本站主机空间代理至厦门市华众网络科技有限公司
《中华人民共和国增值电信业务经营许可证》
编号:闽B2-20050079
@2005-2008福建JSP技术网 版权所有 闽ICP备05000928号
厦门(总部):13616026886 福州:0591-87655121
邮箱:admin@fjjsp.com 站长QQ,点击这里给我发消息