DBA Data[Home] [Help]

VIEW: OLAPSYS.ODM$OLAP2UJOIN_KEY_COLUMN_USES

Source

View Text - Preformatted

SELECT
  u.username owner
, d.name dimension_name
, nvl(h.hiername ,'NONE') hierarchy_name
, l.levelname child_level_name
, tu.username table_owner
, t.name table_name
, c.name column_name
, k.keypos# position
, 'FOREIGN KEY' join_key_type
FROM
  dba_users u
, sys.obj$ d
, sys.hier$ h
, sys.hierlevel$ hl
, sys.dimlevel$ l
, sys.dimjoinkey$ k
, dba_users tu
, sys.obj$ t
, sys.col$ c
, olapsys.cwm$level lev
WHERE u.user_id = d.owner#
AND d.type# = 43 /* DIMENSION */
AND (   cwm$util.dimension_tables_visible(d.obj#) = 'Y'
     OR EXISTS /* SELECT ANY TABLE, CREATE, ALTER, DROP ANY DIMENSION */
       (SELECT null FROM v$enabledprivs
        WHERE priv_number IN (-47,-215,-216,-217)))
AND d.obj# = h.dimobj#
AND h.dimobj# = hl.dimobj#
AND h.hierid# = hl.hierid#
AND hl.dimobj# = l.dimobj#
AND hl.levelid# = l.levelid#
AND hl.dimobj# = k.dimobj#
AND hl.hierid# = k.hierid#
AND hl.joinkeyid# = k.joinkeyid#
AND k.detailobj# = t.obj#
AND k.col# = c.col#
AND t.obj# = c.obj#
AND t.owner# = tu.user_id
AND lev.dimension_irid = l.dimobj#
AND lev.physicalname = l.levelname
UNION ALL SELECT /*+ORDERED*/
  u.username owner
, d.name dimension_name
, nvl(h.hiername ,'NONE') hierarchy_name
, l.levelname child_level_name
, tu.username table_owner
, t.name table_name
, c.name column_name
, k.keypos# position
, 'KEY' join_key_type
FROM
  dba_users u
, sys.obj$ d
, sys.hier$ h
, sys.hierlevel$ hl
, sys.dimlevel$ l
, sys.dimlevelkey$ k
, dba_users tu
, sys.obj$ t
, sys.col$ c
, olapsys.cwm$level lev
WHERE u.user_id = d.owner#
AND d.type# = 43 /* DIMENSION */
AND (   cwm$util.dimension_tables_visible(d.obj#) = 'Y'
     OR EXISTS /* SELECT ANY TABLE, CREATE, ALTER, DROP ANY DIMENSION */
       (SELECT null FROM v$enabledprivs
        WHERE priv_number IN (-47,-215,-216,-217)))
AND d.obj# = h.dimobj#
AND h.dimobj# = hl.dimobj#
AND h.hierid# = hl.hierid#
AND hl.dimobj# = l.dimobj#
AND hl.levelid# = l.levelid#
AND hl.joinkeyid# = 0
AND l.dimobj# = k.dimobj#
AND l.levelid# = k.levelid#
AND k.detailobj# = t.obj#
AND k.col# = c.col#
AND t.obj# = c.obj#
AND t.owner# = tu.user_id
AND lev.dimension_irid = l.dimobj#
AND lev.physicalname = l.levelname
union all
select owner, dimension_name, hierarchy_name, child_level_name, table_owner,
       table_name, column_name, position, join_key_type
from olapsys.ODM$olap2_join_key_column_uses  -- SEE ABOVE
with read only
View Text - HTML Formatted

SELECT U.USERNAME OWNER
, D.NAME DIMENSION_NAME
, NVL(H.HIERNAME
, 'NONE') HIERARCHY_NAME
, L.LEVELNAME CHILD_LEVEL_NAME
, TU.USERNAME TABLE_OWNER
, T.NAME TABLE_NAME
, C.NAME COLUMN_NAME
, K.KEYPOS# POSITION
, 'FOREIGN KEY' JOIN_KEY_TYPE FROM DBA_USERS U
, SYS.OBJ$ D
, SYS.HIER$ H
, SYS.HIERLEVEL$ HL
, SYS.DIMLEVEL$ L
, SYS.DIMJOINKEY$ K
, DBA_USERS TU
, SYS.OBJ$ T
, SYS.COL$ C
, OLAPSYS.CWM$LEVEL LEV WHERE U.USER_ID = D.OWNER# AND D.TYPE# = 43 /* DIMENSION */ AND ( CWM$UTIL.DIMENSION_TABLES_VISIBLE(D.OBJ#) = 'Y' OR EXISTS /* SELECT ANY TABLE
, CREATE
, ALTER
, DROP ANY DIMENSION */ (SELECT NULL
FROM V$ENABLEDPRIVS
WHERE PRIV_NUMBER IN (-47
, -215
, -216
, -217))) AND D.OBJ# = H.DIMOBJ# AND H.DIMOBJ# = HL.DIMOBJ# AND H.HIERID# = HL.HIERID# AND HL.DIMOBJ# = L.DIMOBJ# AND HL.LEVELID# = L.LEVELID# AND HL.DIMOBJ# = K.DIMOBJ# AND HL.HIERID# = K.HIERID# AND HL.JOINKEYID# = K.JOINKEYID# AND K.DETAILOBJ# = T.OBJ# AND K.COL# = C.COL# AND T.OBJ# = C.OBJ# AND T.OWNER# = TU.USER_ID AND LEV.DIMENSION_IRID = L.DIMOBJ# AND LEV.PHYSICALNAME = L.LEVELNAME UNION ALL SELECT /*+ORDERED*/ U.USERNAME OWNER
, D.NAME DIMENSION_NAME
, NVL(H.HIERNAME
, 'NONE') HIERARCHY_NAME
, L.LEVELNAME CHILD_LEVEL_NAME
, TU.USERNAME TABLE_OWNER
, T.NAME TABLE_NAME
, C.NAME COLUMN_NAME
, K.KEYPOS# POSITION
, 'KEY' JOIN_KEY_TYPE FROM DBA_USERS U
, SYS.OBJ$ D
, SYS.HIER$ H
, SYS.HIERLEVEL$ HL
, SYS.DIMLEVEL$ L
, SYS.DIMLEVELKEY$ K
, DBA_USERS TU
, SYS.OBJ$ T
, SYS.COL$ C
, OLAPSYS.CWM$LEVEL LEV WHERE U.USER_ID = D.OWNER# AND D.TYPE# = 43 /* DIMENSION */ AND ( CWM$UTIL.DIMENSION_TABLES_VISIBLE(D.OBJ#) = 'Y' OR EXISTS /* SELECT ANY TABLE
, CREATE
, ALTER
, DROP ANY DIMENSION */ (SELECT NULL
FROM V$ENABLEDPRIVS
WHERE PRIV_NUMBER IN (-47
, -215
, -216
, -217))) AND D.OBJ# = H.DIMOBJ# AND H.DIMOBJ# = HL.DIMOBJ# AND H.HIERID# = HL.HIERID# AND HL.DIMOBJ# = L.DIMOBJ# AND HL.LEVELID# = L.LEVELID# AND HL.JOINKEYID# = 0 AND L.DIMOBJ# = K.DIMOBJ# AND L.LEVELID# = K.LEVELID# AND K.DETAILOBJ# = T.OBJ# AND K.COL# = C.COL# AND T.OBJ# = C.OBJ# AND T.OWNER# = TU.USER_ID AND LEV.DIMENSION_IRID = L.DIMOBJ# AND LEV.PHYSICALNAME = L.LEVELNAME UNION ALL SELECT OWNER
, DIMENSION_NAME
, HIERARCHY_NAME
, CHILD_LEVEL_NAME
, TABLE_OWNER
, TABLE_NAME
, COLUMN_NAME
, POSITION
, JOIN_KEY_TYPE FROM OLAPSYS.ODM$OLAP2_JOIN_KEY_COLUMN_USES -- SEE ABOVE WITH READ ONLY