| 導購 | 订阅 | 在线投稿
分享
 
 
當前位置: 王朝網路 >> oracle >> Oracle 9i SYS_CONTEXT函數的使用方法
 

Oracle 9i SYS_CONTEXT函數的使用方法

2008-07-05 06:43:48  編輯來源:互聯網  简体版  手機版  評論  字體: ||
 
 
  此函數在寫一些觸發器和函數的時候非常有用處。

  用法:

  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.)
 
 
 
上一篇《用Quick Slice獲取Oracle進程的線程狀態》
下一篇《深入了解Oracle數據恢複/挖掘工具FySafe》
 
 
 
日版寵物情人插曲《Winding Road》歌詞

日版寵物情人2017的插曲,很帶節奏感,日語的,女生唱的。 最後聽見是在第8集的時候女主手割傷了,然後男主用嘴幫她吸了一下,插曲就出來了。 歌手:Def...

兄弟共妻,我成了他們夜裏的美食

老鍾家的兩個兒子很特別,就是跟其他的人不太一樣,魔一般的執著。兄弟倆都到了要結婚的年齡了,不管自家老爹怎麽磨破嘴皮子,兄弟倆說不娶就不娶,老父母爲兄弟兩操碎了心...

如何磨出破洞牛仔褲?牛仔褲怎麽剪破洞?

把牛仔褲磨出有線的破洞 1、具體工具就是磨腳石,下面墊一個硬物,然後用磨腳石一直磨一直磨,到把那塊磨薄了,用手撕開就好了。出來的洞啊很自然的。需要貓須的話調幾...

我就是掃描下圖得到了敬業福和愛國福

先來看下敬業福和愛國福 今年春節,支付寶再次推出了“五福紅包”活動,表示要“把欠大家的敬業福都還給大家”。 今天該活動正式啓動,和去年一樣,需要收集“五福”...

冰箱異味産生的原因和臭味去除的方法

有時候我們打開冰箱就會聞到一股異味,冰箱裏的這種異味是因爲一些物質發出的氣味的混合體,聞起來讓人惡心。 産生這些異味的主要原因有以下幾點。 1、很多人有這種習...

《極品家丁》1-31集大結局分集劇情介紹

簡介 《極品家丁》講述了現代白領林晚榮無意回到古代金陵,並追隨蕭二小姐化名“林三”進入蕭府,不料卻陰差陽錯上演了一出低級家丁拼搏上位的“林三升職記”。...

李溪芮《極品家丁》片尾曲《你就是我最愛的寶寶》歌詞

你就是我最愛的寶寶 - 李溪芮 (電視劇《極品家丁》片尾曲) 作詞:常馨內 作曲:常馨內 你的眉 又鬼馬的挑 你的嘴 又壞壞的笑 上一秒吵鬧 下...

烏梅的功效與作用以及烏梅的食用禁忌有哪些?

烏梅,又稱春梅,中醫認爲,烏梅味酸,性溫,無毒,具有安心、除熱、下氣、祛痰、止渴調中、殺蟲的功效,治肢體痛、肺痨病。烏梅泡水喝能治傷寒煩熱、止吐瀉,與幹姜一起制...

什麽是脂肪粒?如何消除臉部脂肪粒?

什麽是脂肪粒 在我們的臉上總會長一個個像脂肪的小顆粒,弄也弄不掉,而且顔色還是白白的。它既不是粉刺也不是其他的任何痘痘,它就是脂肪粒。 脂肪粒雖然也是由油脂...

網絡安全治理:國家安全保障的主要方向是打擊犯罪,而不是處置和懲罰受害者

來源:中國青年報 新的攻擊方法不斷湧現,黑客幾乎永遠占據網絡攻擊的上風,我們不可能通過技術手段杜絕網絡攻擊。國家安全保障的主要方向是打擊犯罪,而不是處置和懲罰...

 
 
 
此函數在寫一些觸發器和函數的時候非常有用處。 用法: 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.)
󰈣󰈤
 
 
 
  免責聲明:本文僅代表作者個人觀點,與王朝網路無關。王朝網路登載此文出於傳遞更多信息之目的,並不意味著贊同其觀點或證實其描述,其原創性以及文中陳述文字和內容未經本站證實,對本文以及其中全部或者部分內容、文字的真實性、完整性、及時性本站不作任何保證或承諾,請讀者僅作參考,並請自行核實相關內容。
 
 
成熟風韻的Meinv
甜美少女
此女子姿色過人也
愛恨情愁傷哀怨
痞子的甘南日記
疑是銀河落九天
雪域壩上四——純美色
冬日戀歌——西城楊柳弄輕柔
 
>>返回首頁<<
 熱帖排行
 
 
王朝网络微信公众号
微信扫码关注本站公众号 wangchaonetcn
 
© 2005- 王朝網路 版權所有