MERCADOS FINANCIEROS

martes, 27 de septiembre de 2011

SYS_CONTEXT FROM DUAL


http://www.techonthenet.com/oracle/functions/sys_context.php


  1* select sys_context( 'userenv', 'CURRENT_SCHEMA' ) from dual
SQL> /

SYS_CONTEXT('USERENV','CURRENT_SCHEMA')
--------------------------------------------------------------------------------
SYS

SQL> ed
Wrote file afiedt.buf

  1* select sys_context( 'userenv', 'HOST' ) from dual
SQL> /

SYS_CONTEXT('USERENV','HOST')
--------------------------------------------------------------------------------
localhost.localdomain

SQL> ed
Wrote file afiedt.buf

  1* select sys_context( 'userenv', 'INSTANCE_NAME' ) from dual
SQL> /

SYS_CONTEXT('USERENV','INSTANCE_NAME')
--------------------------------------------------------------------------------
acme

select SYS_CONTEXT('USERENV','SESSION_USER'),
    SYS_CONTEXT('USERENV','HOST'),SYS_CONTEXT('USERENV','TERMINAL'),SYS_CONTEXT('USERENV','OS_USER')
    from dual;


OPCIONES

Parameter
ACTION
AUDITED_CURSORID
AUTHENTICATED_IDENTITY
AUTHENTICATION_DATA
AUTHENTICATION_METHOD
AUTHENTICATION_TYPE
BG_JOB_ID
CLIENT_IDENTIFIER
CLIENT_INFO
CURRENT_BIND
CURRENT_SCHEMA
CURRENT_SCHEMAID
CURRENT_SQL
CURRENT_SQL_LENGTH
CURRENT_USER
CURRENT_USERID
DB_DOMAIN
DB_NAME
DB_UNIQUE_NAME
ENTRYID
ENTERPRISE_IDENTITY
EXTERNAL_NAME
FG_JOB_ID
GLOBAL_CONTEXT_MEMORY
GLOBAL_UID
HOST
IDENTIFICATION_TYPE
INSTANCE
INSTANCE_NAME
IP_ADDRESS
ISDBA
LANG
LANGUAGE
MODULE
NETWORK_PROTOCOL
NLS_CALENDAR
NLS_CURRENCY
NLS_DATE_FORMAT
NLS_DATE_LANGUAGE
NLS_SORT
NLS_TERRITORY
OS_USER
POLICY_INVOKER
PROXY_ENTERPRISE_IDENTITY
PROXY_GLOBAL_UID
PROXY_USER
PROXY_USERID
SERVER_HOST
SERVICE_NAME
SESSION_USER
SESSION_USERID
SESSIONID
SID
STATEMENTID
TERMINAL


No hay comentarios: