Checking oracle sid and database name

前端 未结 6 1148
滥情空心
滥情空心 2020-12-07 09:07

I want to check SID and current database name.

I am using following query for checking oracle SID

select instance from v$thread;

bu

6条回答
  •  孤街浪徒
    2020-12-07 09:33

    I presume SELECT user FROM dual; should give you the current user

    and SELECT sys_context('userenv','instance_name') FROM dual; the name of the instance

    I believe you can get SID as SELECT sys_context('USERENV', 'SID') FROM DUAL;

提交回复
热议问题