0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

カレント・セッションのSIDを確認する

Last updated at Posted at 2018-03-28

SYS_CONTEXT 関数の USERENV を使う。

SQL> select SYS_CONTEXT('USERENV', 'SID') from dual;

SYS_CONTEXT('USERENV','SID')
--------------------------------------------------------------------------------
149

昔からある USERENV 関数は現在も使えるが、下位互換用のレガシー・ファンクションとなっている模様。

SQL> select USERENV('SID') from dual;       

USERENV('SID')
--------------
           149
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?