DBA Data[Home] [Help]
Skip to content

VIEW: SYS.KU$_USER_BASE_VIEW

Source

View Text - Preformatted

select '1','0',
          u.user#,
          u.name,
          u.type#,
          u.password,
          ts1.name,
          ts2.name,
          to_char(u.ctime,'YYYY/MM/DD HH24:MI:SS'),
          to_char(u.ptime,'YYYY/MM/DD HH24:MI:SS'),
          to_char(u.exptime,'YYYY/MM/DD HH24:MI:SS'),
          to_char(u.ltime,'YYYY/MM/DD HH24:MI:SS'),
          u.resource$,
          p.name,
          replace(u.audit$,chr(0),'-'),
          u.defrole,
          u.defgrp#,
          u.defgrp_seq#,
          DECODE(NVL(instr(u.spare4, ';H:'),0), 0, u.astatus,
                 u.astatus - BITAND(u.astatus, 9) + 9),
          u.astatus,
          u.lcount,
          NVL((select cgm.consumer_group
                        from sys.resource_group_mapping$ cgm
                        where cgm.attribute = 'ORACLE_USER'
                        and cgm.status = 'ACTIVE'
                        and cgm.value = u.name), u.defschclass),
          u.ext_username,
          u.spare1,
          u.spare2,
          u.spare3,
          NVL(NVL(SUBSTR(u.spare4, 1, instr(u.spare4, ';H:') - 1),
             SUBSTR(u.spare4, 1, instr(u.spare4, ';T:') - 1)),
             u.spare4),
          u.spare4,
          u.spare5,
          to_char(u.spare6,'YYYY/MM/DD HH24:MI:SS')
  from sys.user$ u,
       sys.ts$ ts1, sys.ts$ ts2, sys.profname$ p
  where   u.datats# = ts1.ts# AND
          u.tempts# = ts2.ts# AND
          u.type# = 1 AND
          u.resource$ = p.profile#
          AND (SYS_CONTEXT('USERENV','CURRENT_USERID') = 0
                OR EXISTS ( SELECT * FROM sys.session_roles
                   WHERE role='EXP_FULL_DATABASE' ))
UNION
  select '1','0',
          u.user#,
          u.name,
          u.type#,
          NULL,
          ts1.name,
          ts2.name,
          to_char(u.ctime,'YYYY/MM/DD HH24:MI:SS'),
          to_char(u.ptime,'YYYY/MM/DD HH24:MI:SS'),
          to_char(u.exptime,'YYYY/MM/DD HH24:MI:SS'),
          to_char(u.ltime,'YYYY/MM/DD HH24:MI:SS'),
          u.resource$,
          p.name,
          replace(u.audit$,chr(0),'-'),
          u.defrole,
          u.defgrp#,
          u.defgrp_seq#,
          u.astatus,
          u.astatus,
          u.lcount,
          NVL((select cgm.consumer_group
               from sys.resource_group_mapping$ cgm
               where cgm.attribute = 'ORACLE_USER'
                 and cgm.status = 'ACTIVE'
                 and cgm.value = u.name), u.defschclass),
          u.ext_username,
          u.spare1,
          u.spare2,
          u.spare3,
          NULL, NULL,
          u.spare5,
          to_char(u.spare6,'YYYY/MM/DD HH24:MI:SS')
  from sys.user$ u,
       sys.ts$ ts1, sys.ts$ ts2, sys.profname$ p
  where   u.datats# = ts1.ts# AND
          u.tempts# = ts2.ts# AND
          u.type# = 1 AND
          u.resource$ = p.profile#
     AND (SYS_CONTEXT('USERENV','CURRENT_USERID') != 0 )
     AND NOT (EXISTS ( SELECT * FROM sys.session_roles
                   WHERE role='EXP_FULL_DATABASE' ))
     AND (EXISTS ( SELECT * FROM sys.session_roles
                   WHERE role='SELECT_CATALOG_ROLE' ))
View Text - HTML Formatted

SELECT '1'
, '0'
, U.USER#
, U.NAME
, U.TYPE#
, U.PASSWORD
, TS1.NAME
, TS2.NAME
, TO_CHAR(U.CTIME
, 'YYYY/MM/DD HH24:MI:SS')
, TO_CHAR(U.PTIME
, 'YYYY/MM/DD HH24:MI:SS')
, TO_CHAR(U.EXPTIME
, 'YYYY/MM/DD HH24:MI:SS')
, TO_CHAR(U.LTIME
, 'YYYY/MM/DD HH24:MI:SS')
, U.RESOURCE$
, P.NAME
, REPLACE(U.AUDIT$
, CHR(0)
, '-')
, U.DEFROLE
, U.DEFGRP#
, U.DEFGRP_SEQ#
, DECODE(NVL(INSTR(U.SPARE4
, ';H:')
, 0)
, 0
, U.ASTATUS
, U.ASTATUS - BITAND(U.ASTATUS
, 9) + 9)
, U.ASTATUS
, U.LCOUNT
, NVL((SELECT CGM.CONSUMER_GROUP
FROM SYS.RESOURCE_GROUP_MAPPING$ CGM
WHERE CGM.ATTRIBUTE = 'ORACLE_USER'
AND CGM.STATUS = 'ACTIVE'
AND CGM.VALUE = U.NAME)
, U.DEFSCHCLASS)
, U.EXT_USERNAME
, U.SPARE1
, U.SPARE2
, U.SPARE3
, NVL(NVL(SUBSTR(U.SPARE4
, 1
, INSTR(U.SPARE4
, ';H:') - 1)
, SUBSTR(U.SPARE4
, 1
, INSTR(U.SPARE4
, ';T:') - 1))
, U.SPARE4)
, U.SPARE4
, U.SPARE5
, TO_CHAR(U.SPARE6
, 'YYYY/MM/DD HH24:MI:SS')
FROM SYS.USER$ U
, SYS.TS$ TS1
, SYS.TS$ TS2
, SYS.PROFNAME$ P
WHERE U.DATATS# = TS1.TS# AND U.TEMPTS# = TS2.TS# AND U.TYPE# = 1 AND U.RESOURCE$ = P.PROFILE#
AND (SYS_CONTEXT('USERENV'
, 'CURRENT_USERID') = 0 OR EXISTS ( SELECT *
FROM SYS.SESSION_ROLES
WHERE ROLE='EXP_FULL_DATABASE' )) UNION SELECT '1'
, '0'
, U.USER#
, U.NAME
, U.TYPE#
, NULL
, TS1.NAME
, TS2.NAME
, TO_CHAR(U.CTIME
, 'YYYY/MM/DD HH24:MI:SS')
, TO_CHAR(U.PTIME
, 'YYYY/MM/DD HH24:MI:SS')
, TO_CHAR(U.EXPTIME
, 'YYYY/MM/DD HH24:MI:SS')
, TO_CHAR(U.LTIME
, 'YYYY/MM/DD HH24:MI:SS')
, U.RESOURCE$
, P.NAME
, REPLACE(U.AUDIT$
, CHR(0)
, '-')
, U.DEFROLE
, U.DEFGRP#
, U.DEFGRP_SEQ#
, U.ASTATUS
, U.ASTATUS
, U.LCOUNT
, NVL((SELECT CGM.CONSUMER_GROUP
FROM SYS.RESOURCE_GROUP_MAPPING$ CGM
WHERE CGM.ATTRIBUTE = 'ORACLE_USER'
AND CGM.STATUS = 'ACTIVE'
AND CGM.VALUE = U.NAME)
, U.DEFSCHCLASS)
, U.EXT_USERNAME
, U.SPARE1
, U.SPARE2
, U.SPARE3
, NULL
, NULL
, U.SPARE5
, TO_CHAR(U.SPARE6
, 'YYYY/MM/DD HH24:MI:SS')
FROM SYS.USER$ U
, SYS.TS$ TS1
, SYS.TS$ TS2
, SYS.PROFNAME$ P
WHERE U.DATATS# = TS1.TS# AND U.TEMPTS# = TS2.TS# AND U.TYPE# = 1 AND U.RESOURCE$ = P.PROFILE#
AND (SYS_CONTEXT('USERENV'
, 'CURRENT_USERID') != 0 )
AND NOT (EXISTS ( SELECT *
FROM SYS.SESSION_ROLES
WHERE ROLE='EXP_FULL_DATABASE' ))
AND (EXISTS ( SELECT *
FROM SYS.SESSION_ROLES
WHERE ROLE='SELECT_CATALOG_ROLE' ))