Oracle Session Information

Contents

Background

In logging is mandatory in a professional environment, especially the context where the reports was generated.

Getting Session Information


  select 'Script executed by ' || SYS_CONTEXT ('USERENV', 'OS_USER') from dual;


  SELECT sys_context('USERENV', 'MODULE') FROM DUAL;

  SELECT sys_context('USERENV', 'DB_UNIQUE_NAME') FROM DUAL;

  SELECT sys_context('USERENV', 'CLIENT_INFO') FROM DUAL;


  SELECT sys_context('USERENV', 'CLIENT_IDENTIFIER') FROM DUAL;
  -- empty

  SELECT sys_context('USERENV', 'ACTION') FROM DUAL;

  -- empty

  SELECT sys_context('USERENV', 'TERMINAL') FROM DUAL;
  --NT23232

  exec dbms_application_info.set_client_info('TEST');

  SELECT sys_context('USERENV', 'ISDBA') FROM DUAL;
  FASLE

  SELECT sys_context('USERENV', 'HOST') FROM DUAL;
  FIRM\NT32322

  SELECT sys_context('USERENV', 'INSTANCE_NAME') FROM DUAL;

  SELECT sys_context('USERENV', 'OS_USER') FROM DUAL;
  tux007


  SELECT sys_context('USERENV', 'SERVICE_NAME') FROM DUAL;

  SELECT sys_context('USERENV', 'SID') FROM DUAL;



  SELECT sys_context('USERENV', 'SESSION_USERID') FROM DUAL;
  8989

  SELECT sys_context('USERENV', 'SESSIONID') FROM DUAL;
  382120381



Status: Published Date: 2017/06/05 14:14:14 Revision: 1.1

Copyright bei Andreas Haack (C) 2014. Diese Seite wird so wie sie ist zur Verfuegung gestellt, ohne irgenweche Garantien der Verwendbarkeit fuer bestimte Zwecke. Die auf dieser Seiten angebrachten Links liegen ausserhalb der redaktionellen Verantwortung von Andreas Haack und es wird keine Haftung oder Garantie uebernommen. Die Seiten sind Copyright (c) 2014 von Andreas Haack. Kein Teil darf ohne die schriftliche Einverstaendnis von Andreas Haack veroeffentlicht werden.
The page is provided 'as is' , without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fit- ness for a particular purpose and non-infringement. In no event shall Andreas Haack be liable for any claim, damages or other liability. This page is copyrighted property of Andreas Haack. Copyright by Andreas Haack (c) 2014 . No part of this page may be published without written permission for Andreas Haack. A hyper-link may created to this page but NOT to the embedded elements of this page. It may be freely downloaded for private purpose only as long as it is unaltered.