6, u.exptime,
9, u.exptime,
10, u.exptime,
decode(u.ptime, '', to_date(null),
decode(pr.limit#, 2147483647, to_date(null),
decode(pr.limit#, 0,
decode(dp.limit#, 2147483647, to_date(null), u.ptime +
dp.limit#/86400),
u.ptime + pr.limit#/86400)))),
dts.name, tts.name, u.ctime, p.name, u.defschclass, u.ext_username
from sys.user$ u, sys.ts$ dts, sys.ts$ tts, sys.profname$ p,
sys.user_astatus_map m, sys.profile$ pr, sys.profile$ dp
where u.datats# = dts.ts#
and u.resource$ = p.profile#
and u.tempts# = tts.ts#
and u.astatus = m.status#
and u.type# = 1
and u.resource$ = pr.profile#
and dp.profile# = 0
and dp.type#=1
and dp.resource#=1
and pr.type# = 1
and pr.resource# = 1
sql>
三、如何查找用户自定义的某个表的定义?
在oracle 9i以前,可以使用下面的方法:
sql> select substr(table_name,1,20) tabname,
2 substr(column_name,1,20)column_name,
3 rtrim(data_type)||'('||data_length||')' from dba_tab_columns
4 where owner='&username'
5 /
tabname column_name rtrim(data_type)||'('||data_le
---------------------------------------- ---------------------------------------- --------------------------------------------------------------------------------
bonus ename varchar2(10)
bonus job varchar2(9)
bonus sal number(22)
bonus comm number(22)