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

【赛迪网-it技术报道】此函数在写一些触发器和函数的时候非常有用处。 style="text-indent:2em">

用法:

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中用Rowid查找和删除重复记录 04-11
用Oracle 9i全索引扫描快速访问数据 04-11
oracle数据库中使用rman建立data guard (1) 05-14
dml操作update和delete时产生的锁示例 (1) 04-07
轻松掌握oracle peeking 绑定变量的控制 11-15
Oracle数据库如何查询记录时给记录加锁 06-10
轻松接触分布式数据库全局名与数据库链 01-24
深入讲解如何使用rollup配合group by命令 04-09
oracle 10g中scn与timestamp的斗转星移 04-28
Oracle Text 的体系结构及其使用 09-29
如何避免Oracle数据库密码出现@符号 06-17
带你轻松接触"maa"结构中所包含的组件 03-05
怎样在oracle中执行一次基本的快照复制 04-29
带你轻松接触oracle dblink的简单运用 03-18
轻松接触oracle9i中的一个特殊等待事件 11-22
个人经验:怎样杀死"oracle"的死锁进程 02-01
教你如何快速转移Oracle中海量数据 04-11
使用dbms_stats时如何才能不生成histogram 03-27
如何检测oracle的可用性和表空间容量 02-28
教你在Oracle数据库中建立透明网关环境 04-11
返回首页 | 关于我们 | J网章程 | JSP空间合租 | 客服中心 | 免责声明 | 常见问题 | 参观机房
本站主机空间代理至厦门市华众网络科技有限公司
《中华人民共和国增值电信业务经营许可证》
编号:闽B2-20050079
@2005-2008福建JSP技术网 版权所有 闽ICP备05000928号
厦门(总部):13616026886 福州:0591-87655121
邮箱:admin@fjjsp.com 站长QQ,点击这里给我发消息