Salim berbagi…. tempat belajar dan berinteraksi….


USERENV
March 12, 2010, 7:35 AM
Filed under: ORACLE

Di database ORACLE, kita dapat mendapatkan informasi IP Address, terminal name, database name dan lain – lain, dengan menggunakan SYS_CONTEXT.

Contoh:

select SYS_CONTEXT(‘USERENV’, ‘IP_ADDRESS’) ipaddr from dual;

Hasilnya adalah IP address tempat kita terhubung ke database.

Berikut daftar USERENV yang dapat digunakan:

          SYS_CONTEXT(‘USERENV’,’TERMINAL’) terminal
          SYS_CONTEXT(‘USERENV’,’LANGUAGE’) 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’) nls_territory
          SYS_CONTEXT(‘USERENV’,’NLS_CURRENCY’) nls_currency
          SYS_CONTEXT(‘USERENV’,’NLS_CALENDAR’) nls_calendar
          SYS_CONTEXT(‘USERENV’,’NLS_DATE_FORMAT’) nls_date_format
          SYS_CONTEXT(‘USERENV’,’NLS_DATE_LANGUAGE’) 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’) db_name
          SYS_CONTEXT(‘USERENV’,’HOST’) host
          SYS_CONTEXT(‘USERENV’,’OS_USER’) os_user
          SYS_CONTEXT(‘USERENV’,’EXTERNAL_NAME’) external_name
          SYS_CONTEXT(‘USERENV’,’IP_ADDRESS’) ip_address
          SYS_CONTEXT(‘USERENV’,’NETWORK_PROTOCOL’) 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
          SYS_CONTEXT(‘USERENV’,’CURRENT_SQL’) current_sql
          SYS_CONTEXT(‘USERENV’,’CLIENT_IDENTIFIER’) client_identifier
          SYS_CONTEXT(‘USERENV’,’GLOBAL_CONTEXT_MEMORY’)global_context_memory


1 Comment so far
Leave a comment

[…] USERENV | Salim berbagi…. tempat belajar dan … – 12/3/2010 · Salim berbagi…. tempat belajar dan berinteraksi…. Online Shop Batiknya Solo. … Belanja Online di LAZADA. Tinggal Pilih. BALITA (5) Belanja …… […]

Pingback by Cara Belanja Online Di Lazada | Fashion Sepatu Up To Date




Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s



%d bloggers like this: