Re: Describing X$ tables in Oracle 21c and 23c

  • From: Tanel Poder <tanel@xxxxxxxxxxxxxx>
  • To: gogala.mladen@xxxxxxxxx
  • Date: Mon, 1 Apr 2024 18:23:04 -0400

I have an xde.sql script for that in my TPT repo. It even shows you the
fixed index columns if known (IDX col):

SQL> @xde x$ksppi
Describe X$ tables and show indexed columns...

TABLE_NAME                COLUMN_NAME                    DATA_TYPE
     KQFCOSIZ     OFFSET OFF_HEX    IDX
------------------------- ------------------------------
-------------------- ---------- ---------- --------- ----
X$KSPPI                   ADDR                           RAW(8)
           8          0      0x0
                          INDX                           NUMBER(4)
            4          0      0x0
                          INST_ID                        NUMBER(4)
            4          0      0x0
                          CON_ID                         NUMBER(2)
            2          0      0x0
                          KSPPINM                        VARCHAR2(80)
          80          4      0x4     1
                          KSPPITY                        NUMBER(4)
            4         96     0x60
                          KSPPDESC                       VARCHAR2(255)
          255        100     0x64
                          KSPPIFLG                       NUMBER(4)
            4        356    0x164
                          KSPPILRMFLG                    NUMBER(4)
            4        360    0x168
                          KSPPIHASH                      NUMBER(4)
            4        364    0x16C



On Sat, Mar 30, 2024 at 3:42 PM Mladen Gogala <gogala.mladen@xxxxxxxxx>
wrote:

On Sat, 2024-03-30 at 18:13 +0100, Martin Berger wrote:

Hi Mladen,

Maybe you want to define an
alias descx=SELECT name, type, object_id

FROM v$fixed_table
WHERE lower(name) like 'b1:%';


Hi Martin,
Thanks for your help. However, the above is not quite enough. I would have
to follow Jonathan's advice to join x$kqfta and x$kqfco. I need column
names and types and V$FIXED_TABLE will not give that to me. The simplest
trick would be to check V$FIXED_VIEW_DEFINITION but X$ "tables" are not
listed there.
I will write my own alias and put it into login.sql. I also hope that that
Jeff Smith occasionally follows this group and that he will read this and
fix the bug. I can switch to sqlplus when I need SYS connection.
Thanks again. Frohe Ostern.

--

Mladen Gogala
Database SME
https://dbwhisperer.wordpress.com


Other related posts: