X$ oddity


You may be familiar with a Steve Adams script to expose view "copies" of the X$ tables which runs along the lines of:

create view X_$BLAH as select * from SYS.X$BLAH

But once you get to 10g, you might get a couple of interesting results, for example

SQL> desc X$KMGSCT
 Name                          Null?    Type
 ----------------------------- -------- --------------
 ADDR                                   RAW(4)
 INDX                                   NUMBER
 INST_ID                                NUMBER
 GRANTYPE                               NUMBER
 GRANSIZE                               NUMBER
 COMPONENT                              VARCHAR2(64)
 OPCODE                                 NUMBER
 OPMODE                                 NUMBER
 PARNO                                  NUMBER
 CURSIZE                                NUMBER
 USERSIZE                               NUMBER
 INITSIZE                               NUMBER
 TARGSIZE                               NUMBER
 MINSIZE                                NUMBER
 MAXSIZE                                NUMBER
 OPERCNT                                NUMBER
 LASTOPER                               NUMBER
 LASTMODE                               NUMBER
 LASTTIME                               DATE  <====
 STARTTIME                              DATE
 LASTTIME                               DATE  <====
 

Amazingly, this X$ table (and one other) appear to have two columns with the same name!