Checking oracle sid and database name

前端 未结 6 1142
滥情空心
滥情空心 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:15

    The V$ views are mainly dynamic views of system metrics. They are used for performance tuning, session monitoring, etc. So access is limited to DBA users by default, which is why you're getting ORA-00942.

    The easiest way of finding the database name is:

    select * from global_name;
    

    This view is granted to PUBLIC, so anybody can query it.

提交回复
热议问题