Home » RDBMS Server » Server Administration » v$system_event vs. v_$system_event (rdbms 10.2.0.3.0 - 64bi on SunOS)
v$system_event vs. v_$system_event [message #401082] Fri, 01 May 2009 08:26 Go to next message
martijn
Messages: 286
Registered: December 2006
Location: Netherlands
Senior Member
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

Re: v$system_event vs. v_$system_event [message #401102 is a reply to message #401082] Fri, 01 May 2009 11:08 Go to previous messageGo to next message
Michel Cadot
Messages: 68665
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Ah the Magical Mystery Tour.

Quote:
Where is some sort of base table or base-view out of which oracle gets its information for the view.

v$fixed_view_definition

Regards
Michel


Re: v$system_event vs. v_$system_event [message #401334 is a reply to message #401102] Mon, 04 May 2009 02:16 Go to previous messageGo to next message
martijn
Messages: 286
Registered: December 2006
Location: Netherlands
Senior Member
Michel Cadot wrote on Fri, 01 May 2009 18:08
Ah the Magical Mystery Tour.

Quote:
Where is some sort of base table or base-view out of which oracle gets its information for the view.

v$fixed_view_definition

Regards
Michel




Oh tnx .... great.

v$.... references gv$..... (which I think is logical) and then v$fixed_view_definition tells me what I wanted to know.

I wonder now how the v$fixed_view_definition and the dba_views.text relate to each other.


Anyway....thanks

Best Regards,
Martijn
Re: v$system_event vs. v_$system_event [message #401338 is a reply to message #401334] Mon, 04 May 2009 02:24 Go to previous message
Michel Cadot
Messages: 68665
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
No relation between them.

Regards
Michel
Previous Topic: excessive archive log are generating by oracle
Next Topic: Unable to start the database (Oracle 9.2.0.1.0)
Goto Forum:
  


Current Time: Tue Jul 02 23:18:21 CDT 2024