Hi all,
SQL> select banner from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bi
PL/SQL Release 10.2.0.3.0 - Production
CORE 10.2.0.3.0 Production
TNS for Solaris: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production
SQL>
the system runs on Sun-OS
I was wondering how oracle builds the view v$system_event.
So I tried the following:
SQL>
SQL> select text from dba_views where lower(view_name) = 'v$system_event';
no rows selected
SQL>
OK no problem. Probably v$system_event is a synonym.
SQL>
SQL> select owner, object_name, object_type from dba_objects where lower(object_name) = 'v$system_event';
OWNER OBJECT_NAME OBJECT_TYPE
------------------------------ -------------------- -------------------
PUBLIC V$SYSTEM_EVENT SYNONYM
SQL>
Yup...it is.
Let's take a look to what v$system_event is a synonym:
SQL>
SQL> select table_owner, table_name from dba_synonyms where lower(synonym_name)='v$system_event';
TABLE_OWNER TABLE_NAME
------------------------------ ------------------------------
SYS V_$SYSTEM_EVENT
SQL>
Is v_$system_event a view then?
SQL>
SQL> select owner, object_type from dba_objects where lower(object_name)='v_$system_event';
OWNER OBJECT_TYPE
------------------------------ -------------------
SYS VIEW
SQL>
Yup...it is.
Now find out how that view is being build:
SQL>
SQL> select text from dba_views where lower(view_name)='v_$system_event';
TEXT
----------------------------------------------------------------------------------------------------
select "EVENT","TOTAL_WAITS","TOTAL_TIMEOUTS","TIME_WAITED","AVERAGE_WAIT","TIME_WAITED_MICRO","EVEN
T_ID","WAIT_CLASS_ID","WAIT_CLASS#","WAIT_CLASS" from v$system_event
SQL>
Unfortunately....I don't get it: v$system_event is a synonym to v_$system_event which in it's code refers to v$system_event.
To me that is a circle. Where is some sort of base table or base-view out of which oracle gets its information for the view.
(I would guess some x$..... table or view or so)
Can somebody point me in the rigth direction.
Best regards,
Martijn
[Updated on: Fri, 01 May 2009 08:34]
Report message to a moderator