DBA views

139 views
Skip to first unread message

sher...@gmail.com

unread,
May 13, 2008, 5:32:33 AM5/13/08
to Balaji Group, sher...@gmail.com

OWNER VIEW_NAME TEXT_LENGTH TEXT TYPE_TEXT_LENGTH TYPE_TEXT
OID_TEXT_LENGTH OID_TEXT VIEW_TYPE_OWNER VIEW_TYPE SUPERVIEW_NAME
SYS DATABASE_COMPATIBLE_LEVEL 67 "select value,description
from v$parameter
where name = 'compatible'"
SYS DATABASE_PROPERTIES 43 "select name, value$, comment$
from props$"
SYS DBA_2PC_NEIGHBORS 268 "select local_tran_id, 'in', parent_db,
db_user, interface, parent_dbid,
session_id, rawtohex(branch_id)
from sys.ps1$
union all
select local_tran_id, 'out', dblink, owner_name, interface, dbid,
session_id, to_char(sub_session_id)
from sys.pss1$"
SYS DBA_2PC_PENDING 322 "select local_tran_id,
nvl(global_oracle_id, global_tran_fmt||'.'||
global_foreign_id),
state, decode(status,'D','yes','no'), heuristic_dflt,
tran_comment,
fail_time, heuristic_time, reco_time,
top_os_user, top_os_terminal, top_os_host, top_db_user,
global_commit#
from sys.pending_trans$"
SYS DBA_ALL_TABLES 1386 "select OWNER, TABLE_NAME, TABLESPACE_NAME,
CLUSTER_NAME, IOT_NAME,
PCT_FREE, PCT_USED,
INI_TRANS, MAX_TRANS,
INITIAL_EXTENT, NEXT_EXTENT,
MIN_EXTENTS, MAX_EXTENTS, PCT_INCREASE,
FREELISTS, FREELIST_GROUPS, LOGGING,
BACKED_UP, NUM_ROWS, BLOCKS, EMPTY_BLOCKS,
AVG_SPACE, CHAIN_CNT, AVG_ROW_LEN,
AVG_SPACE_FREELIST_BLOCKS, NUM_FREELIST_BLOCKS,
DEGREE, INSTANCES, CACHE, TABLE_LOCK,
SAMPLE_SIZE, LAST_ANALYZED, PARTITIONED,
IOT_TYPE, NULL, NULL, NULL, TEMPORARY, SECONDARY, NESTED,
BUFFER_POOL, ROW_MOVEMENT,
GLOBAL_STATS, USER_STATS, DURATION, SKIP_CORRUPT, MONITORING,
CLUSTER_OWNER, DEPENDENCIES
from dba_tables
union all
select
""OWNER"",""TABLE_NAME"",""TABLESPACE_NAME"",""CLUSTER_NAME"",""IOT_NAME"",""PCT_FREE"",""PCT_USED"",""INI_TRANS"",""MAX_TRANS"",""INITIAL_EXTENT"",""NEXT_EXTENT"",""MIN_EXTENTS"",""MAX_EXTENTS"",""PCT_INCREASE"",""FREELISTS"",""FREELIST_GROUPS"",""LOGGING"",""BACKED_UP"",""NUM_ROWS"",""BLOCKS"",""EMPTY_BLOCKS"",""AVG_SPACE"",""CHAIN_CNT"",""AVG_ROW_LEN"",""AVG_SPACE_FREELIST_BLOCKS"",""NUM_FREELIST_BLOCKS"",""DEGREE"",""INSTANCES"",""CACHE"",""TABLE_LOCK"",""SAMPLE_SIZE"",""LAST_ANALYZED"",""PARTITIONED"",""IOT_TYPE"",""OBJECT_ID_TYPE"",""TABLE_TYPE_OWNER"",""TABLE_TYPE"",""TEMPORARY"",""SECONDARY"",""NESTED"",""BUFFER_POOL"",""ROW_MOVEMENT"",""GLOBAL_STATS"",""USER_STATS"",""DURATION"",""SKIP_CORRUPT"",""MONITORING"",""CLUSTER_OWNER"",""DEPENDENCIES""
from dba_object_tables"
SYS DBA_ANALYZE_OBJECTS 268 "select u.name, o.name, decode(o.type#, 2,
'TABLE', 3, 'CLUSTER')
from sys.user$ u, sys.obj$ o, sys.tab$ t
where o.owner# = u.user#
and o.obj# = t.obj# (+)
and t.bobj# is null
and o.type# in (2,3)
and o.linkname is null"
SYS DBA_APPLICATION_ROLES 81 "select u.name, schema, package from
user$ u, approle$ a
where u.user# = a.role#"
SYS DBA_APPLY 611 "select ap.apply_name, q.name, u.name,
decode(bitand(ap.flags, 1), 1, 'YES',
0, 'NO'),
ap.ruleset_name, ap.ruleset_owner,
u2.name, ap.apply_dblink, ap.apply_tag, ap.ddl_handler,
ap.message_handler,
decode(ap.status, 1, 'DISABLED',
2, 'ENABLED',
4, 'ABORTED', 'UNKNOWN')
from ""_DBA_APPLY"" ap, system.aq$_queues q,
system.aq$_queue_tables t, sys.user$ u, sys.user$ u2
where ap.queue_oid = q.oid
and q.table_objno = t.objno
and t.schema = u.name
and ap.apply_userid = u2.user#"
SYS DBA_APPLY_CONFLICT_COLUMNS 684 "select u.username, o.name,
eh.method_name, eh.resolution_column,
ac.column_name, NULL
from sys.obj$ o, ""_DBA_APPLY_CONF_HDLR_COLUMNS"" ac,
""_DBA_APPLY_ERROR_HANDLER"" eh, dba_users u
where o.obj# = ac.object_number
and o.obj# = eh.object_number
and ac.resolution_id = eh.resolution_id
and u.user_id = o.owner#
and o.remoteowner is NULL
union
select o.remoteowner, o.name, eh.method_name, eh.resolution_column,
ac.column_name, o.linkname
from sys.obj$ o, apply$_conf_hdlr_columns ac, apply$_error_handler
eh
where o.obj# = ac.object_number
and o.obj# = eh.object_number
and ac.resolution_id = eh.resolution_id
and o.remoteowner is not NULL"
SYS DBA_APPLY_DML_HANDLERS 1161 "select u.username, o.name,
decode(do.apply_operation, 0, 'DEFAULT',
1, 'INSERT',
2, 'UPDATE',
3, 'DELETE',
4, 'BLOB_UPDATE',
5, 'CLOB_UPDATE',
6, 'NCLOB_UPDATE', 'UNKNOWN'),
do.user_apply_procedure,
do.error_handler, NULL
from sys.obj$ o, apply$_dest_obj_ops do, dba_users u
where o.obj# = do.object_number
and o.owner# = u.user_id
and o.remoteowner is NULL
union
select o.remoteowner, o.name,
decode(do.apply_operation, 0, 'DEFAULT',
1, 'INSERT',
2, 'UPDATE',
3, 'DELETE',
4, 'BLOB_UPDATE',
5, 'CLOB_UPDATE',
6, 'NCLOB_UPDATE', 'UNKNOWN'),
do.user_apply_procedure,
do.error_handler, o.linkname
from sys.obj$ o, apply$_dest_obj_ops do
where o.obj# = do.object_number
and o.remoteowner is not null"
SYS DBA_APPLY_ERROR 348 "select p.apply_name, e.queue_name,
e.queue_owner, e.local_transaction_id,
e.source_database, e.source_transaction_id,
e.source_commit_scn, e.message_number, e.error_number,
e.error_message, e.recipient_id, e.recipient_name,
e.message_count
from ""_DBA_APPLY_ERROR"" e, sys.streams$_apply_process p
where e.apply# = p.apply#(+)"
SYS DBA_APPLY_INSTANTIATED_OBJECTS 108 "select source_db_name, owner,
name,
type, inst_scn, ignore_scn, dblink
from ""_DBA_APPLY_SOURCE_OBJ"""
SYS DBA_APPLY_KEY_COLUMNS 66 "select sname, oname, cname, dblink
from sys.streams$_key_columns"
SYS DBA_APPLY_PARAMETERS 394 "select ap.apply_name, pp.name, pp.value,
decode(pp.user_changed_flag, 1, 'YES', 'NO')
from sys.streams$_process_params pp, sys.streams$_apply_process ap
where pp.process_type = 1
and pp.process# = ap.apply#
and /* display internal parameters if the user changed them */
(pp.internal_flag = 0
or
(pp.internal_flag = 1 and pp.user_changed_flag = 1)
)"
SYS DBA_APPLY_PROGRESS 187 "select ap.apply_name, am.commit_scn,
am.oldest_scn, apply_time,
applied_message_create_time
from streams$_apply_process ap, ""_DBA_APPLY_MILESTONE"" am
where ap.apply# = am.apply#"
SYS DBA_AQ_AGENTS 185 SELECT u.agent_name, decode(bitand(u.protocol,
1), 0, 'NO ', 1, 'YES ') http_enabled, decode(bitand(u.protocol, 2),
0, 'NO ', 2, 'YES ') smtp_enabled FROM SYSTEM.AQ$_Internet_Agents u
SYS DBA_AQ_AGENT_PRIVS 285 (SELECT u.agent_name, t.db_username,
decode(bitand(u.protocol, 1), 0, 'NO ', 1, 'YES ') http_enabled,
decode(bitand(u.protocol, 2), 0, 'NO ', 2, 'YES ') smtp_enabled FROM
SYSTEM.AQ$_Internet_Agent_Privs t RIGHT OUTER JOIN SYSTEM.AQ
$_Internet_Agents u ON t.agent_name = u.agent_name)
SYS DBA_ASSOCIATIONS 581 "select u.name, o.name, c.name,
decode(a.property, 1, 'COLUMN', 2, 'TYPE', 3, 'PACKAGE', 4,
'FUNCTION', 5, 'INDEX', 6, 'INDEXTYPE', 'INVALID'),
u1.name, o1.name,a.default_selectivity,
a.default_cpu_cost, a.default_io_cost, a.default_net_cost,
a.interface_version#
from sys.association$ a, sys.obj$ o, sys.user$ u,
sys.obj$ o1, sys.user$ u1, sys.col$ c
where a.obj#=o.obj# and o.owner#=u.user#
AND a.statstype#=o1.obj# (+) and o1.owner#=u1.user# (+)
AND a.obj# = c.obj# (+) and a.intcol# = c.intcol# (+)"
SYS DBA_ATTRIBUTE_TRANSFORMATIONS 304 "SELECT t.transformation_id,
u.name, t.name,
t.from_schema||'.'||t.from_type, t.to_schema||'.'||t.to_type,
at.attribute_number,
at.sql_expression
FROM transformations$ t, attribute_transformations$ at, sys.user$ u
WHERE u.name = t.owner and t.transformation_id =
at.transformation_id"
SYS DBA_AUDIT_EXISTS 548 "select os_username, username, userhost,
terminal, timestamp,
owner, obj_name,
action_name,
new_owner,
new_name,
obj_privilege, sys_privilege, grantee,
sessionid, entryid, statementid, returncode, client_id, SESSION_CPU
from dba_audit_trail
where returncode in
(942, 943, 959, 1418, 1432, 1434, 1435, 1534, 1917, 1918, 1919,
2019,
2024, 2289,
4042, 4043, 4080, 1, 951, 955, 957, 1430, 1433, 1452, 1471, 1535,
1543,
1758, 1920, 1921, 1922, 2239, 2264, 2266, 2273, 2292, 2297, 2378,
2379,
2382, 4081, 12006, 12325)"
SYS DBA_AUDIT_OBJECT 571 "select OS_USERNAME, USERNAME, USERHOST,
TERMINAL, TIMESTAMP,
OWNER, OBJ_NAME, ACTION_NAME, NEW_OWNER, NEW_NAME,
SES_ACTIONS, COMMENT_TEXT, SESSIONID, ENTRYID, STATEMENTID,
RETURNCODE, PRIV_USED, CLIENT_ID, SESSION_CPU
from dba_audit_trail
where (action between 1 and 16)
or (action between 19 and 29)
or (action between 32 and 41)
or (action = 43)
or (action between 51 and 99)
or (action = 103)
or (action between 110 and 113)
or (action between 116 and 121)
or (action between 123 and 128)
or (action between 160 and 162)"
SYS DBA_AUDIT_POLICIES 197 "select u.name, o.name, f.pname, f.ptxt,
f.pcol, f.pfschma, f.ppname, f.pfname,
decode(f.enable_flag, 0, 'NO', 'YES')
from user$ u, obj$ o, fga$ f
where u.user# = o.owner#
and f.obj# = o.obj#"
SYS DBA_AUDIT_SESSION 257 "select os_username, username, userhost,
terminal, timestamp, action_name,
logoff_time, logoff_lread, logoff_pread, logoff_lwrite,
logoff_dlock,
sessionid, returncode, client_id, session_cpu
from dba_audit_trail
where action between 100 and 102"
SYS DBA_AUDIT_STATEMENT 698 "select OS_USERNAME, USERNAME, USERHOST,
TERMINAL, TIMESTAMP,
OWNER, OBJ_NAME, ACTION_NAME, NEW_NAME,
OBJ_PRIVILEGE, SYS_PRIVILEGE, ADMIN_OPTION, GRANTEE,
AUDIT_OPTION,
SES_ACTIONS, COMMENT_TEXT, SESSIONID, ENTRYID, STATEMENTID,
RETURNCODE, PRIV_USED, CLIENT_ID, SESSION_CPU
from dba_audit_trail
where action in ( 17 /* GRANT OBJECT */,
18 /* REVOKE OBJECT */,
30 /* AUDIT OBJECT */,
31 /* NOAUDIT OBJECT */,
49 /* ALTER SYSTEM */,
104 /* SYSTEM AUDIT */,
105 /* SYSTEM NOAUDIT */,
106 /* AUDIT DEFAULT */,
107 /* NOAUDIT DEFAULT */,
108 /* SYSTEM GRANT */,
109 /* SYSTEM REVOKE */,
114 /* GRANT ROLE */,
115 /* REVOKE ROLE */ )"
SYS DBA_AUDIT_TRAIL 2353 "select spare1 /* OS_USERNAME */,
userid /* USERNAME */,
userhost /* USERHOST */,
terminal /* TERMINAL */,
timestamp# /* TIMESTAMP */,
obj$creator /* OWNER */,
obj$name /* OBJECT_NAME */,
aud.action# /* ACTION */,
act.name /* ACTION_NAME */,
new$owner /* NEW_OWNER */,
new$name /* NEW_NAME */,
decode(aud.action#,
108 /* grant sys_priv */, null,
109 /* revoke sys_priv */, null,
114 /* grant role */, null,
115 /* revoke role */, null,
auth$privileges)
/* OBJ_PRIVILEGE */,
decode(aud.action#,
108 /* grant sys_priv */, spm.name,
109 /* revoke sys_priv */, spm.name,
null)
/* SYS_PRIVILEGE */,
decode(aud.action#,
108 /* grant sys_priv */, substr(auth$privileges,1,1),
109 /* revoke sys_priv */, substr(auth$privileges,1,1),
114 /* grant role */, substr(auth$privileges,1,1),
115 /* revoke role */, substr(auth$privileges,1,1),
null)
/* ADMIN_OPTION */,
auth$grantee /* GRANTEE */,
decode(aud.action#,
104 /* audit */, aom.name,
105 /* noaudit */, aom.name,
null)
/* AUDIT_OPTION */,
ses$actions /* SES_ACTIONS */,
logoff$time /* LOGOFF_TIME */,
logoff$lread /* LOGOFF_LREAD */,
logoff$pread /* LOGOFF_PREAD */,
logoff$lwrite /* LOGOFF_LWRITE */,
decode(aud.action#,
104 /* audit */, null,
105 /* noaudit */, null,
108 /* grant sys_priv */, null,
109 /* revoke sys_priv */, null,
114 /* grant role */, null,
115 /* revoke role */, null,
aud.logoff$dead)
/* LOGOFF_DLOCK */,
comment$text /* COMMENT_TEXT */,
sessionid /* SESSIONID */,
entryid /* ENTRYID */,
statement /* STATEMENTID */,
returncode /* RETURNCODE */,
spx.name /* PRIVILEGE */,
clientid /* CLIENT_ID */,
sessioncpu /* SESSION_CPU */
from sys.aud$ aud, system_privilege_map spm, system_privilege_map spx,
STMT_AUDIT_OPTION_MAP aom, audit_actions act
where aud.action# = act.action (+)
and - aud.logoff$dead = spm.privilege (+)
and aud.logoff$dead = aom.option# (+)
and - aud.priv$used = spx.privilege (+)"
SYS DBA_AWS 195 "SELECT u.name, a.awseq#, a.awname,
count(unique(p.psnumber)),
count(unique(p.psgen))
FROM aw$ a, ps$ p, user$ u
WHERE a.owner#=u.user# and a.awseq#=p.awseq#
group by a.awseq#, a.awname, u.name"
SYS DBA_AW_PS 191 "SELECT u.name, a.awseq#, a.awname, p.psnumber,
count(unique(p.psgen))
FROM aw$ a, ps$ p, user$ u
WHERE a.owner#=u.user# and a.awseq#=p.awseq#
group by a.awseq#, a.awname, u.name, p.psnumber"
SYS DBA_BASE_TABLE_MVIEWS 355 "select s.mowner, s.master, s.snaptime,
s.snapid
from sys.slog$ s
union
select ct.source_schema_name, ct.source_table_name, cs.last_extended,
cs.handle
from sys.cdc_change_tables$ ct, sys.cdc_subscribers$ cs,
sys.cdc_subscribed_tables$ st
where st.change_table_obj# (+) = ct.obj#
and st.handle = cs.handle
and bitand(ct.mvl_flag, 128) = 128"
SYS DBA_BLOCKERS 426 "select /*+ordered */ distinct s.ksusenum
holding_session
from v$session_wait w, x$ksqrs r, v$_lock l, x$ksuse s
where w.wait_Time = 0
and w.event = 'enqueue'
and r.ksqrsid1 = w.p2
and r.ksqrsid2 = w.p3
and r.ksqrsidt = chr(bitand(p1,-16777216)/16777215)||
chr(bitand(p1,16711680)/65535)
and l.block = 1
and l.saddr = s.addr
and l.raddr = r.addr
and s.inst_id = userenv('Instance')"
SYS DBA_CACHEABLE_NONTABLE_OBJECTS 1209 "SELECT u.username owner,
u.username object_name, 'USER'
FROM dba_users u
WHERE u.username NOT IN ('SYS', 'SYSTEM', 'OUTLN', 'ORDSYS',
'CTXSYS',
'MDSYS', 'ORDPLUGINS', 'PUBLIC','DBSNMP',
'AURORA$JIS$UTILITY$', 'AURORA$ORB
$UNAUTHENTICATED',
'LBACSYS', 'OSE$HTTP$ADMIN', 'ICPB',
'TRACESVR',
'XDB', 'PERFSTAT', 'RMAIL')
UNION ALL
SELECT o.owner, o.object_name, o.object_type
FROM dba_objects o
WHERE owner NOT IN ('SYS', 'SYSTEM', 'OUTLN', 'ORDSYS', 'CTXSYS',
'MDSYS', 'ORDPLUGINS', 'PUBLIC','DBSNMP',
'AURORA$JIS$UTILITY$', 'AURORA$ORB
$UNAUTHENTICATED',
'LBACSYS', 'OSE$HTTP$ADMIN', 'ICPB',
'TRACESVR',
'XDB', 'PERFSTAT', 'RMAIL')
AND
((object_type = 'VIEW'
AND NOT EXISTS (SELECT 1 FROM dba_snapshots s
WHERE s.owner = o.owner
AND s.name = o.object_name))
OR
(object_type IN ('TYPE', 'PACKAGE', 'PROCEDURE', 'FUNCTION',
'SEQUENCE')))
MINUS
SELECT r.sname, r.oname, r.type
FROM dba_repgenerated r"
SYS DBA_CACHEABLE_OBJECTS 721 "SELECT
""OWNER"",""OBJECT_NAME"",""OBJECT_TYPE"" FROM
dba_cacheable_nontable_objects o
WHERE o.object_type != 'TYPE'
UNION ALL
SELECT t.owner, t.table_name object_name,
decode(t.temporary, 'Y', 'TEMP TABLE', 'TABLE')
FROM dba_cacheable_tables_base t
WHERE /* Exclude the following tables
- * 0x00000001 typed tables
- * 0x00000002 having ADT cols
- * 0x00000004 having nested table columns
- * 0x00000008 having REF cols
- * 0x00000010 having array cols
- * 0x00002000 nested table
- * 0x01000000 user-defined REF columns
*/
bitand(t.property,16785439) = 0"
SYS DBA_CACHEABLE_OBJECTS_BASE 218 "SELECT OWNER, OBJECT_NAME,
OBJECT_TYPE
FROM dba_cacheable_nontable_objects
UNION ALL
SELECT t.owner, t.table_name object_name,
decode(t.temporary, 'Y', 'TEMP TABLE', 'TABLE')
FROM dba_cacheable_tables_base t"
SYS DBA_CACHEABLE_TABLES 569 "SELECT t.owner, t.table_name
FROM dba_cacheable_tables_base t
WHERE temporary = 'N'
/* Exclude the following tables
- * 0x00000001 typed tables
- * 0x00000002 having ADT cols
- * 0x00000004 having nested table columns
- * 0x00000008 having REF cols
- * 0x00000010 having array cols
- * 0x00002000 nested table
- * 0x01000000 user-defined REF columns
*/
AND bitand(t.property,16785439) = 0"
SYS DBA_CACHEABLE_TABLES_BASE 1671 "SELECT u.name, o.name,
decode(bitand(o.flags, 2), 0, 'N', 2, 'Y', 'N'),
tab.property
FROM sys.user$ u,
sys.obj$ o,
(SELECT t.obj#, t.property
FROM sys.tab$ t
WHERE /* Exclude the following tables
* 0x00008000 FILE columns
* 0x00020000 AQ table
* 0x08000000 sub-object
*/
bitand(t.property,134381568) = 0
AND
/* Exclude tables with LONG columns */
NOT EXISTS (SELECT 1 FROM sys.col$ c
WHERE t.obj# = c.obj#
AND c.type# IN (8, 24) /* DTYLNG,DTYLBI
*/)) tab
WHERE o.owner# = u.user#
AND o.obj# = tab.obj#
AND
/* Exclude SYS,SYSTEM,ORDSYS,CTXSYS,MDSYS,ORDPLUGINS,OUTLN
tables */
u.name NOT IN ('SYS', 'SYSTEM', 'ORDSYS', 'CTXSYS', 'MDSYS',
'ORDPLUGINS', 'OUTLN', 'DBSNMP','AURORA$JIS
$UTILITY$',
'AURORA$ORB$UNAUTHENTICATED',
'LBACSYS', 'OSE$HTTP$ADMIN', 'ICPB',
'TRACESVR',
'XDB', 'PERFSTAT', 'RMAIL')
AND
/* Exclude snapshot and updatable snapshot log container
tables */
NOT EXISTS (SELECT 1 FROM sys.snap$ s
WHERE s.sowner = u.name
AND ((s.tname = o.name) OR (s.uslog =
o.name)))
AND
/* Exclude snapshot log container tables */
NOT EXISTS (SELECT 1 from sys.mlog$ m
WHERE m.mowner = u.name
AND m.log = o.name)"
SYS DBA_CAPTURE 431 "select cp.capture_name, q.name, u.name,
cp.ruleset_name,
cp.ruleset_owner, cp.start_scn,
decode(cp.status, 1, 'DISABLED',
2, 'ENABLED',
4, 'ABORTED', 'UNKNOWN'),
cp.spare1, cp.spare2
from system.aq$_queues q, ""_DBA_CAPTURE"" cp,
system.aq$_queue_tables t, sys.user$ u
where cp.queue_oid = q.oid
and q.table_objno = t.objno
and u.name = t.schema"
SYS DBA_CAPTURE_PARAMETERS 388 "select q.capture_name, p.name,
p.value,
decode(p.user_changed_flag, 1, 'YES', 'NO')
from sys.streams$_process_params p, sys.streams$_capture_process q
where p.process_type = 2
and p.process# = q.capture#
and /* display internal parameters if the user changed them */
(p.internal_flag = 0
or
(p.internal_flag = 1 and p.user_changed_flag = 1)
)"
SYS DBA_CAPTURE_PREPARED_DATABASE 86 "select timestamp from streams
$_prepare_ddl
where usrid is NULL
and global_flag = 1"
SYS DBA_CAPTURE_PREPARED_SCHEMAS 103 "select u.username, pd.timestamp
from streams$_prepare_ddl pd, dba_users u
where u.user_id = pd.usrid"
SYS DBA_CAPTURE_PREPARED_TABLES 151 "select o.owner,
substr(o.object_name, 1, 30), co.ignore_scn, co.timestamp
from streams$_prepare_object co, dba_objects o
where o.object_id = co.obj#"
SYS DBA_CATALOG 626 "select u.name, o.name,
decode(o.type#, 0, 'NEXT OBJECT', 1, 'INDEX', 2, 'TABLE', 3,
'CLUSTER',
4, 'VIEW', 5, 'SYNONYM', 6, 'SEQUENCE',
'UNDEFINED')
from sys.user$ u, sys.obj$ o
where o.owner# = u.user#
and o.linkname is null
and ((o.type# in (4, 5, 6))
or
(o.type# = 2 /* tables, excluding iot - overflow and nested
tables */
and
not exists (select null
from sys.tab$ t
where t.obj# = o.obj#
and (bitand(t.property, 512) = 512 or
bitand(t.property, 8192) = 8192))))"
SYS DBA_CLUSTERS 1568 "select u.name, o.name, ts.name,
mod(c.pctfree$, 100),
decode(bitand(ts.flags, 32), 32, to_number(NULL), c.pctused
$),
c.size$,c.initrans,c.maxtrans,
s.iniexts * ts.blocksize,
decode(bitand(ts.flags, 3), 1, to_number(NULL),
s.extsize * ts.blocksize),
s.minexts, s.maxexts,
decode(bitand(ts.flags, 3), 1, to_number(NULL),
s.extpct),
decode(bitand(ts.flags, 32), 32, to_number(NULL),
decode(s.lists, 0, 1, s.lists)),
decode(bitand(ts.flags, 32), 32, to_number(NULL),
decode(s.groups, 0, 1, s.groups)),
c.avgchn, decode(c.hashkeys, 0, 'INDEX', 'HASH'),
decode(c.hashkeys, 0, NULL,
decode(c.func, 0, 'COLUMN', 1, 'DEFAULT',
2, 'HASH EXPRESSION', 3, 'DEFAULT2',
NULL)),
c.hashkeys,
lpad(decode(c.degree, 32767, 'DEFAULT', nvl(c.degree,1)),
10),
lpad(decode(c.instances, 32767, 'DEFAULT', nvl(c.instances,
1)),10),
lpad(decode(bitand(c.flags, 8), 8, 'Y', 'N'), 5),
decode(s.cachehint, 0, 'DEFAULT', 1, 'KEEP', 2, 'RECYCLE',
NULL),
lpad(decode(bitand(c.flags, 65536), 65536, 'Y', 'N'), 5),
decode(bitand(c.flags, 8388608), 8388608, 'ENABLED',
'DISABLED')
from sys.user$ u, sys.ts$ ts, sys.seg$ s, sys.clu$ c, sys.obj$ o
where o.owner# = u.user#
and o.obj# = c.obj#
and c.ts# = ts.ts#
and c.ts# = s.ts#
and c.file# = s.file#
and c.block# = s.block#"
SYS DBA_CLUSTER_HASH_EXPRESSIONS 142 "select us.name, o.name,
c.condition
from sys.cdef$ c, sys.user$ us, sys.obj$ o
where c.type# = 8
and c.obj# = o.obj#
and us.user# = o.owner#"
SYS DBA_CLU_COLUMNS 452 "select u.name, oc.name, cc.name, ot.name,
decode(bitand(tc.property, 1), 1, ac.name, tc.name)
from sys.user$ u, sys.obj$ oc, sys.col$ cc, sys.obj$ ot, sys.col$ tc,
sys.tab$ t, sys.attrcol$ ac
where oc.owner# = u.user#
and oc.obj# = cc.obj#
and t.bobj# = oc.obj#
and t.obj# = tc.obj#
and tc.segcol# = cc.segcol#
and t.obj# = ot.obj#
and oc.type# = 3
and tc.obj# = ac.obj#(+)
and tc.intcol# = ac.intcol#(+)"
SYS DBA_COLL_TYPES 1550 "select u.name, o.name, co.name,
c.upper_bound,
decode(bitand(c.properties, 32768), 32768, 'REF',
decode(bitand(c.properties, 16384), 16384, 'POINTER')),
nvl2(c.synobj#, (select u.name from user$ u, obj$ o
where o.owner#=u.user# and o.obj#=c.synobj#),
decode(bitand(et.properties, 64), 64, null, eu.name)),
nvl2(c.synobj#, (select o.name from obj$ o where
o.obj#=c.synobj#),
decode(et.typecode,
52, decode(c.charsetform, 2, 'NVARCHAR2', eo.name),
53, decode(c.charsetform, 2, 'NCHAR', eo.name),
54, decode(c.charsetform, 2, 'NCHAR VARYING',
eo.name),
61, decode(c.charsetform, 2, 'NCLOB', eo.name),
eo.name)),
c.length, c.precision, c.scale,
decode(c.charsetform, 1, 'CHAR_CS',
2, 'NCHAR_CS',
3, NLS_CHARSET_NAME(c.charsetid),
4, 'ARG:'||c.charsetid),
decode(bitand(c.properties, 131072), 131072, 'FIXED',
decode(bitand(c.properties, 262144), 262144, 'VARYING')),
decode(bitand(c.properties, 65536), 65536, 'NO', 'YES')
from sys.user$ u, sys.obj$ o, sys.collection$ c, sys.obj$ co,
sys.obj$ eo, sys.user$ eu, sys.type$ et
where o.owner# = u.user#
and o.oid$ = c.toid
and o.type# <> 10 -- must not be invalid
and c.coll_toid = co.oid$
and c.elem_toid = eo.oid$
and eo.owner# = eu.user#
and c.elem_toid = et.toid
and c.elem_version# = et.version#"
SYS DBA_COL_COMMENTS 279 "select u.name, o.name, c.name, co.comment$
from sys.obj$ o, sys.col$ c, sys.user$ u, sys.com$ co
where o.owner# = u.user#
and o.type# in (2, 4)
and o.obj# = c.obj#
and c.obj# = co.obj#(+)
and c.intcol# = co.col#(+)
and bitand(c.property, 32) = 0 /* not hidden column */"
SYS DBA_COL_PRIVS 494 "select ue.name, u.name, o.name, c.name,
ur.name, tpm.name,
decode(mod(oa.option$,2), 1, 'YES', 'NO')
from sys.objauth$ oa, sys.obj$ o, sys.user$ u, sys.user$ ur, sys.user$
ue,
sys.col$ c, table_privilege_map tpm
where oa.obj# = o.obj#
and oa.grantor# = ur.user#
and oa.grantee# = ue.user#
and oa.obj# = c.obj#
and oa.col# = c.col#
and bitand(c.property, 32) = 0 /* not hidden column */
and oa.col# is not null
and oa.privilege# = tpm.privilege
and u.user# = o.owner#"
SYS DBA_CONSTRAINTS 1926 "select ou.name, oc.name,
decode(c.type#, 1, 'C', 2, 'P', 3, 'U',
4, 'R', 5, 'V', 6, 'O', 7,'C', '?'),
o.name, c.condition, ru.name, rc.name,
decode(c.type#, 4,
decode(c.refact, 1, 'CASCADE', 2, 'SET NULL', 'NO
ACTION'),
NULL),
decode(c.type#, 5, 'ENABLED',
decode(c.enabled, NULL, 'DISABLED', 'ENABLED')),
decode(bitand(c.defer, 1), 1, 'DEFERRABLE', 'NOT DEFERRABLE'),
decode(bitand(c.defer, 2), 2, 'DEFERRED', 'IMMEDIATE'),
decode(bitand(c.defer, 4), 4, 'VALIDATED', 'NOT VALIDATED'),
decode(bitand(c.defer, 8), 8, 'GENERATED NAME', 'USER NAME'),
decode(bitand(c.defer,16),16, 'BAD', null),
decode(bitand(c.defer,32),32, 'RELY', null),
c.mtime,
decode(c.type#, 2, ui.name, 3, ui.name, null),
decode(c.type#, 2, oi.name, 3, oi.name, null),
decode(bitand(c.defer, 256), 256,
decode(c.type#, 4,
case when (bitand(c.defer, 128) = 128
or o.status in (3, 5)
or ro.status in (3, 5)) then 'INVALID'
else null end,
case when (bitand(c.defer, 128) = 128
or o.status in (3, 5)) then 'INVALID'
else null end
),
null),
decode(bitand(c.defer, 256), 256, 'DEPEND ON VIEW', null)
from sys.con$ oc, sys.con$ rc, sys.user$ ou, sys.user$ ru, sys.obj$
ro,
sys.obj$ o, sys.cdef$ c, sys.obj$ oi, sys.user$ ui
where oc.owner# = ou.user#
and oc.con# = c.con#
and c.obj# = o.obj#
and c.type# != 8 /* don't include hash expressions */
and c.type# != 12 /* don't include log groups */
and c.rcon# = rc.con#(+)
and c.enabled = oi.obj#(+)
and oi.owner# = ui.user#(+)
and rc.owner# = ru.user#(+)
and c.robj# = ro.obj#(+)"
SYS DBA_CONS_COLUMNS 463 "select u.name, c.name, o.name,
decode(ac.name, null, col.name, ac.name), cc.pos#
from sys.user$ u, sys.con$ c, sys.col$ col, sys.ccol$ cc, sys.cdef$
cd,
sys.obj$ o, sys.attrcol$ ac
where c.owner# = u.user#
and c.con# = cd.con#
and cd.type# != 12 /* don't include log groups */
and cd.con# = cc.con#
and cc.obj# = col.obj#
and cc.intcol# = col.intcol#
and cc.obj# = o.obj#
and col.obj# = ac.obj#(+)
and col.intcol# = ac.intcol#(+)"
SYS DBA_CONS_OBJ_COLUMNS 1298 "select uc.name, oc.name, c.name,
ut.name, ot.name,
lpad(decode(bitand(sc.flags, 2), 2, 'Y', 'N'), 15)
from sys.user$ uc, sys.obj$ oc, sys.col$ c, sys.user$ ut, sys.obj$ ot,
sys.subcoltype$ sc
where oc.owner# = uc.user#
and bitand(sc.flags, 1) = 1 /* Type is specified in the IS OF
clause */
and oc.obj#=sc.obj#
and oc.obj#=c.obj#
and c.intcol#=sc.intcol#
and sc.toid=ot.oid$
and ot.owner#=ut.user#
and bitand(c.property,32768) != 32768 /* not unused
column */
and not exists (select null /* Doesn't exist in
attrcol$ */
from sys.attrcol$ ac
where ac.intcol#=sc.intcol#
and ac.obj#=sc.obj#)
union all
select uc.name, oc.name, ac.name, ut.name, ot.name,
lpad(decode(bitand(sc.flags, 2), 2, 'Y', 'N'), 15)
from sys.user$ uc, sys.obj$ oc, sys.col$ c, sys.user$ ut, sys.obj$ ot,
sys.subcoltype$ sc, sys.attrcol$ ac
where oc.owner# = uc.user#
and bitand(sc.flags, 1) = 1 /* Type is specified in the IS OF
clause */
and oc.obj#=sc.obj#
and oc.obj#=c.obj#
and oc.obj#=ac.obj#
and c.intcol#=sc.intcol#
and ac.intcol#=sc.intcol#
and sc.toid=ot.oid$
and ot.owner#=ut.user#
and bitand(c.property,32768) != 32768 /* not unused
column */"
SYS DBA_CONTEXT 211 "select o.name, c.schema, c.package,
DECODE( c.flags,0,'ACCESSED LOCALLY',1,'INITIALIZED EXTERNALLY',
2,'ACCESSED GLOBALLY',4,'INITIALIZED GLOBALLY')
from context$ c, obj$ o
where c.obj# = o.obj#
and o.type# = 44"
SYS DBA_DATA_FILES 1214 "select v.name, f.file#, ts.name,
ts.blocksize * f.blocks, f.blocks,
decode(f.status$, 1, 'INVALID', 2, 'AVAILABLE', 'UNDEFINED'),
f.relfile#, decode(f.inc, 0, 'NO', 'YES'),
ts.blocksize * f.maxextend, f.maxextend, f.inc,
ts.blocksize * (f.blocks - 1), f.blocks - 1
from sys.file$ f, sys.ts$ ts, sys.v$dbfile v
where v.file# = f.file#
and f.spare1 is NULL
and f.ts# = ts.ts#
union all
select
v.name,f.file#, ts.name,
decode(hc.ktfbhccval, 0, ts.blocksize * hc.ktfbhcsz, NULL),
decode(hc.ktfbhccval, 0, hc.ktfbhcsz, NULL),
decode(f.status$, 1, 'INVALID', 2, 'AVAILABLE', 'UNDEFINED'),
f.relfile#,
decode(hc.ktfbhccval, 0, decode(hc.ktfbhcinc, 0, 'NO', 'YES'),
NULL),
decode(hc.ktfbhccval, 0, ts.blocksize * hc.ktfbhcmaxsz, NULL),
decode(hc.ktfbhccval, 0, hc.ktfbhcmaxsz, NULL),
decode(hc.ktfbhccval, 0, hc.ktfbhcinc, NULL),
decode(hc.ktfbhccval, 0, hc.ktfbhcusz * ts.blocksize, NULL),
decode(hc.ktfbhccval, 0, hc.ktfbhcusz, NULL)
from sys.v$dbfile v, sys.file$ f, sys.x$ktfbhc hc, sys.ts$ ts
where v.file# = f.file#
and f.spare1 is NOT NULL
and v.file# = hc.ktfbhcafno
and hc.ktfbhctsn = ts.ts#"
SYS DBA_DB_LINKS 103 "select u.name, l.name, l.userid, l.host, l.ctime
from sys.link$ l, sys.user$ u
where l.owner# = u.user#"
SYS DBA_DDL_LOCKS 673 "select s.sid session_id,
substr(ob.kglnaown,1,30) owner,
substr(ob.kglnaobj,1,30) name,
decode(ob.kglhdnsp, 0, 'Cursor', 1, 'Table/Procedure/Type', 2,
'Body',
3, 'Trigger', 4, 'Index', 5, 'Cluster', 13, 'Java Source',
14, 'Java Resource', 32, 'Java Data',
to_char(ob.kglhdnsp)) type,
decode(lk.kgllkmod, 0, 'None', 1, 'Null', 2, 'Share', 3,
'Exclusive',
'Unknown') mode_held,
decode(lk.kgllkreq, 0, 'None', 1, 'Null', 2, 'Share', 3,
'Exclusive',
'Unknown') mode_requested
from v$session s, x$kglob ob, x$kgllk lk
where lk.kgllkhdl = ob.kglhdadr
and lk.kgllkuse = s.saddr
and ob.kglhdnsp != 0"
SYS DBA_DEPENDENCIES 1391 "select u.name, o.name,
decode(o.type#, 0, 'NEXT OBJECT', 1, 'INDEX', 2, 'TABLE', 3,
'CLUSTER',
4, 'VIEW', 5, 'SYNONYM', 6, 'SEQUENCE', 7,
'PROCEDURE',
8, 'FUNCTION', 9, 'PACKAGE', 10, 'NON-EXISTENT',
11, 'PACKAGE BODY', 12, 'TRIGGER',
13, 'TYPE', 14, 'TYPE BODY',
28, 'JAVA SOURCE', 29, 'JAVA CLASS',
42, 'MATERIALIZED VIEW', 43, 'DIMENSION',
56, 'JAVA DATA',
'UNDEFINED'),
decode(po.linkname, null, pu.name, po.remoteowner), po.name,
decode(po.type#, 0, 'NEXT OBJECT', 1, 'INDEX', 2, 'TABLE', 3,
'CLUSTER',
4, 'VIEW', 5, 'SYNONYM', 6, 'SEQUENCE', 7,
'PROCEDURE',
8, 'FUNCTION', 9, 'PACKAGE', 10, 'NON-EXISTENT',
11, 'PACKAGE BODY', 12, 'TRIGGER',
13, 'TYPE', 14, 'TYPE BODY',
28, 'JAVA SOURCE', 29, 'JAVA CLASS',
42, 'MATERIALIZED VIEW', 43, 'DIMENSION',
56, 'JAVA DATA',
'UNDEFINED'),
po.linkname,
decode(d.property, 2, 'REF', 'HARD')
from sys.obj$ o, sys.disk_and_fixed_objects po, sys.dependency$ d,
sys.user$ u,
sys.user$ pu
where o.obj# = d.d_obj#
and o.owner# = u.user#
and po.obj# = d.p_obj#
and po.owner# = pu.user#"
SYS DBA_DIMENSIONS 271 "select u.name, o.name,
decode(o.status, 5, 'Y', 'N'),
decode(o.status, 1, 'VALID', 5, 'NEEDS_COMPILE', 'ERROR'),
1 /* Metadata revision number */
from sys.dim$ d, sys.obj$ o, sys.user$ u
where o.owner# = u.user#
and o.obj# = d.obj#"
SYS DBA_DIM_ATTRIBUTES 292 "select u.name, o.name, dl.levelname,
c.name, 'N'
from sys.dimattr$ da, sys.obj$ o, sys.user$ u, sys.dimlevel$ dl,
sys.col$ c
where da.dimobj# = o.obj#
and o.owner# = u.user#
and da.dimobj# = dl.dimobj#
and da.levelid# = dl.levelid#
and da.detailobj# = c.obj#
and da.col# = c.intcol#"
SYS DBA_DIM_CHILD_OF 612 "select u.name, o.name, h.hiername, chl.pos#,
cdl.levelname,
decode(phl.joinkeyid#, 0, NULL, phl.joinkeyid#),
pdl.levelname
from sys.obj$ o, sys.user$ u, sys.hier$ h,
sys.hierlevel$ phl, sys.hierlevel$ chl,
sys.dimlevel$ pdl, sys.dimlevel$ cdl
where phl.dimobj# = o.obj#
and o.owner# = u.user#
and phl.dimobj# = h.dimobj#
and phl.hierid# = h.hierid#
and phl.dimobj# = pdl.dimobj#
and phl.levelid# = pdl.levelid#
and phl.dimobj# = chl.dimobj#
and phl.hierid# = chl.hierid#
and phl.pos# = chl.pos# + 1
and chl.dimobj# = cdl.dimobj#
and chl.levelid# = cdl.levelid#"
SYS DBA_DIM_HIERARCHIES 125 "select u.name, o.name, h.hiername
from sys.hier$ h, sys.obj$ o, sys.user$ u
where h.dimobj# = o.obj#
and o.owner# = u.user#"
SYS DBA_DIM_JOIN_KEY 422 "select u.name, o.name, djk.joinkeyid#,
dl.levelname,
djk.keypos#, h.hiername, c.name
from sys.dimjoinkey$ djk, sys.obj$ o, sys.user$ u,
sys.dimlevel$ dl, sys.hier$ h, sys.col$ c
where djk.dimobj# = o.obj#
and o.owner# = u.user#
and djk.dimobj# = dl.dimobj#
and djk.levelid# = dl.levelid#
and djk.dimobj# = h.dimobj#
and djk.hierid# = h.hierid#
and djk.detailobj# = c.obj#
and djk.col# = c.intcol#"
SYS DBA_DIM_LEVELS 548 "select u.name, o.name, dl.levelname,
temp.num_col,
u1.name, o1.name
from (select dlk.dimobj#, dlk.levelid#, dlk.detailobj#,
COUNT(*) as num_col
from sys.dimlevelkey$ dlk
group by dlk.dimobj#, dlk.levelid#, dlk.detailobj#) temp,
sys.dimlevel$ dl, sys.obj$ o, sys.user$ u,
sys.obj$ o1, sys.user$ u1
where dl.dimobj# = o.obj# and
o.owner# = u.user# and
dl.dimobj# = temp.dimobj# and
dl.levelid# = temp.levelid# and
temp.detailobj# = o1.obj# and
o1.owner# = u1.user#"
SYS DBA_DIM_LEVEL_KEY 315 "select u.name, o.name, dl.levelname,
dlk.keypos#, c.name
from sys.dimlevelkey$ dlk, sys.obj$ o, sys.user$ u, sys.dimlevel$ dl,
sys.col$ c
where dlk.dimobj# = o.obj#
and o.owner# = u.user#
and dlk.dimobj# = dl.dimobj#
and dlk.levelid# = dl.levelid#
and dlk.detailobj# = c.obj#
and dlk.col# = c.intcol#"
SYS DBA_DIRECTORIES 120 "select u.name, o.name, d.os_path
from sys.user$ u, sys.obj$ o, sys.dir$ d
where u.user# = o.owner#
and o.obj# = d.obj#"
SYS DBA_DML_LOCKS 1427 "select
sid session_id,
u.name owner,
o.name,
decode(lmode,
0, 'None', /* Mon Lock equivalent */
1, 'Null', /* N */
2, 'Row-S (SS)', /* L */
3, 'Row-X (SX)', /* R */
4, 'Share', /* S */
5, 'S/Row-X (SSX)', /* C */
6, 'Exclusive', /* X */
'Invalid') mode_held,
decode(request,
0, 'None', /* Mon Lock equivalent */
1, 'Null', /* N */
2, 'Row-S (SS)', /* L */
3, 'Row-X (SX)', /* R */
4, 'Share', /* S */
5, 'S/Row-X (SSX)', /* C */
6, 'Exclusive', /* X */
'Invalid') mode_requested,
l.ctime last_convert,
decode(block,
0, 'Not Blocking', /* Not blocking any other processes */
1, 'Blocking', /* This lock blocks other processes */
2, 'Global', /* This lock is global, so we can't tell */
to_char(block)) blocking_others
from (select l.laddr addr, l.kaddr kaddr, /* 1040651: Defn for v
$lock */
s.ksusenum sid, r.ksqrsidt type, r.ksqrsid1 id1,
r.ksqrsid2 id2, l.lmode lmode, l.request request,
l.ctime ctime, l.block block
from v$_lock l, x$ksuse s, x$ksqrs r
where l.saddr = s.addr and l.raddr = r.addr and
s.inst_id = USERENV('Instance')) l, obj$ o, user$
u
where l.id1 = o.obj#
and o.owner# = u.user#
and l.type = 'TM'"
SYS DBA_DMT_FREE_SPACE 47 "select ts#, file#, block#, length
from fet$"
SYS DBA_DMT_USED_EXTENTS 86 "select segfile#, segblock#, ts#,
ext#, file#, block#, length
from sys.uet$"
SYS DBA_ERRORS 479 "select u.name, o.name,
decode(o.type#, 4, 'VIEW', 7, 'PROCEDURE', 8, 'FUNCTION', 9,
'PACKAGE',
11, 'PACKAGE BODY', 12, 'TRIGGER', 13, 'TYPE', 14,
'TYPE BODY',
22, 'LIBRARY', 28, 'JAVA SOURCE', 29, 'JAVA CLASS',
43, 'DIMENSION', 'UNDEFINED'),
e.sequence#, e.line, e.position#, e.text
from sys.obj$ o, sys.error$ e, sys.user$ u
where o.obj# = e.obj#
and o.owner# = u.user#
and o.type# in (4, 7, 8, 9, 11, 12, 13, 14, 22, 28, 29, 43)"
SYS DBA_EVALUATION_CONTEXTS 155 "SELECT /*+ ordered */
u.name, o.name, ec.eval_func, ec.ec_comment
FROM rule_ec$ ec, obj$ o, user$ u
WHERE ec.obj# = o.obj# and o.owner# = u.user#"
SYS DBA_EVALUATION_CONTEXT_TABLES 160 "SELECT /*+ ordered */
u.name, o.name, ect.tab_alias, ect.tab_name
FROM rec_tab$ ect, obj$ o, user$ u
WHERE ect.ec_obj# = o.obj# and o.owner# = u.user#"
SYS DBA_EVALUATION_CONTEXT_VARS 203 "SELECT /*+ ordered */
u.name, o.name, ecv.var_name, ecv.var_type, ecv.var_val_func,
ecv.var_mthd_func
FROM rec_var$ ecv, obj$ o, user$ u
WHERE ecv.ec_obj# = o.obj# and o.owner# = u.user#"
SYS DBA_EXP_FILES 194 "select o.expid, decode(o.exptype, 'X',
'COMPLETE', 'C', 'CUMULATIVE',
'I', 'INCREMENTAL', 'UNDEFINED'),
o.expfile, o.expuser, o.expdate
from sys.incfil o"
SYS DBA_EXP_OBJECTS 518 "select u.name, o.name,
decode(o.type#, 1, 'INDEX', 2, 'TABLE', 3, 'CLUSTER',
4, 'VIEW', 5, 'SYNONYM', 6, 'SEQUENCE', 7,
'PROCEDURE',
8, 'FUNCTION', 9, 'PACKAGE', 11, 'PACKAGE BODY',
12, 'TRIGGER', 13, 'TYPE', 14, 'TYPE BODY',
22, 'LIBRARY', 28, 'JAVA SOURCE', 29, 'JAVA
CLASS',
30, 'JAVA RESOURCE', 'UNDEFINED'),
o.ctime, o.itime, o.expid
from sys.incexp o, sys.user$ u
where o.owner# = u.user#"
SYS DBA_EXP_VERSION 32 "select o.expid
from sys.incvid o"
SYS DBA_EXTENTS 950 "select ds.owner, ds.segment_name,
ds.partition_name, ds.segment_type,
ds.tablespace_name,
e.ext#, f.file#, e.block#, e.length * ds.blocksize, e.length,
e.file#
from sys.uet$ e, sys.sys_dba_segs ds, sys.file$ f
where e.segfile# = ds.relative_fno
and e.segblock# = ds.header_block
and e.ts# = ds.tablespace_id
and e.ts# = f.ts#
and e.file# = f.relfile#
and bitand(NVL(ds.segment_flags,0), 1) = 0
union all
select /*+ ordered use_nl(e) use_nl(f) */
ds.owner, ds.segment_name, ds.partition_name, ds.segment_type,
ds.tablespace_name,
e.ktfbueextno, f.file#, e.ktfbuebno,
e.ktfbueblks * ds.blocksize, e.ktfbueblks, e.ktfbuefno
from sys.sys_dba_segs ds, sys.x$ktfbue e, sys.file$ f
where e.ktfbuesegfno = ds.relative_fno
and e.ktfbuesegbno = ds.header_block
and e.ktfbuesegtsn = ds.tablespace_id
and e.ktfbuesegtsn = f.ts#
and e.ktfbuefno = f.relfile#
and bitand(NVL(ds.segment_flags, 0), 1) = 1"
SYS DBA_EXTERNAL_LOCATIONS 215 "select u.name, o.name, xl.name, 'SYS',
nvl(xl.dir, xt.default_dir)
from sys.external_location$ xl, sys.user$ u, sys.obj$ o,
sys.external_tab$ xt
where o.owner# = u.user#
and o.obj# = xl.obj#
and o.obj# = xt.obj#"
SYS DBA_EXTERNAL_TABLES 364 "select u.name, o.name, 'SYS', xt.type$,
'SYS', xt.default_dir,
decode(xt.reject_limit, 2147483647, 'UNLIMITED',
xt.reject_limit),
decode(xt.par_type, 1, 'BLOB', 2, 'CLOB', 'UNKNOWN'),
decode(xt.par_type, 1, NULL, 2, xt.param_clob, NULL)
from sys.external_tab$ xt, sys.obj$ o, sys.user$ u
where o.owner# = u.user#
and o.obj# = xt.obj#"
SYS DBA_FGA_AUDIT_TRAIL 154 "select
sessionid,timestamp#,dbuid,osuid,oshst,clientid,extid,obj$schema,
obj$name,policyname,scn,to_nchar(lsqltext),sqlbind,comment$text
from sys.fga_log$"
SYS DBA_FREE_SPACE 575 "select ts.name, fi.file#, f.block#,
f.length * ts.blocksize, f.length, f.file#
from sys.ts$ ts, sys.fet$ f, sys.file$ fi
where ts.ts# = f.ts#
and f.ts# = fi.ts#
and f.file# = fi.relfile#
and ts.bitmapped = 0
union all
select /*+ ordered use_nl(f) use_nl(fi) */
ts.name, fi.file#, f.ktfbfebno,
f.ktfbfeblks * ts.blocksize, f.ktfbfeblks, f.ktfbfefno
from sys.ts$ ts, sys.x$ktfbfe f, sys.file$ fi
where ts.ts# = f.ktfbfetsn
and f.ktfbfetsn = fi.ts#
and f.ktfbfefno = fi.relfile#
and ts.bitmapped <> 0 and ts.online$ in (1,4) and ts.contents$ = 0"
SYS DBA_FREE_SPACE_COALESCED 562 "select name,total_extents,
extents_coalesced,
extents_coalesced/total_extents*100,total_blocks*c.blocksize,
blocks_coalesced*c.blocksize, total_blocks, blocks_coalesced,
blocks_coalesced/total_blocks*100
from DBA_FREE_SPACE_COALESCED_TMP1 a, DBA_FREE_SPACE_COALESCED_TMP2 b,
sys.ts$ c
where a.ts#=b.ts# and a.ts#=c.ts#
union all
select name, total_extents, total_extents, 100,
total_blocks*c.blocksize,
total_blocks*c.blocksize, total_blocks, total_blocks, 100
from DBA_FREE_SPACE_COALESCED_TMP3 b, sys.ts$ c
where b.ts# = c.ts#"
SYS DBA_FREE_SPACE_COALESCED_TMP1 217 "select ts#, count(*)
extents_coalesced, sum(length) blocks_coalesced
from sys.fet$ a
where not exists (
select * from sys.fet$ b
where b.ts#=a.ts# and
b.file#=a.file# and
a.block#=b.block#+b.length)
group by ts#"
SYS DBA_FREE_SPACE_COALESCED_TMP2 66 "select ts#, count(*),
sum(length)
from sys.fet$
group by ts#"
SYS DBA_FREE_SPACE_COALESCED_TMP3 86 "select ktfbfetsn, count(*),
sum(ktfbfeblks)
from sys.x$ktfbfe
group by ktfbfetsn"
SYS DBA_GLOBAL_CONTEXT 112 "select o.name, c.schema,c.package
from context$ c, obj$ o
where c.obj# = o.obj#
and o.type# = 44
and c.flags= 2"
SYS DBA_IAS_CONSTRAINT_EXP 63 "select 1 pkexists, cd.obj# from sys.cdef
$ cd
where cd.type# = 2"
SYS DBA_IAS_GEN_STMTS 459 "select rt.refresh_template_name
ias_template_name,
decode(ro.object_type, -1017, to_number(ro.object_name), 0) lineno,
ddl_text
from system.repcat$_refresh_templates rt,
system.repcat$_template_objects ro,
system.repcat$_template_types tt
where rt.template_type_id = tt.template_type_id
and bitand(rawtohex(tt.flags),2) = 2
and rt.refresh_template_id = ro.refresh_template_id
and ro.object_type = -1017 -- object_type =
dbms_ias_template.generated_ddl"
SYS DBA_IAS_GEN_STMTS_EXP 194 "select ro.refresh_template_id
ias_template_id,
decode(ro.object_type, -1017, to_number(ro.object_name), 0) lineno,
ddl_text
from system.repcat$_template_objects ro
where ro.object_type = -1017"
SYS DBA_IAS_OBJECTS 164 "select ro.ias_template_name,
ro.schema_name,
ro.object_name,
ro.object_type,
ro.derived_from_sname,
ro.derived_from_oname
from sys.dba_ias_objects_base ro"
SYS DBA_IAS_OBJECTS_BASE 528 "select rt.refresh_template_name
ias_template_name,
ro.schema_name,
ro.object_name,
ro.object_type object_type_id,
ot.object_type_name object_type,
ro.derived_from_sname,
ro.derived_from_oname
from system.repcat$_refresh_templates rt,
system.repcat$_template_objects ro,
system.repcat$_object_types ot,
system.repcat$_template_types tt
where rt.refresh_template_id = ro.refresh_template_id
and ro.object_type = ot.object_type_id
and rt.template_type_id = tt.template_type_id
and bitand(rawtohex(tt.flags),2) = 2"
SYS DBA_IAS_OBJECTS_EXP 452 "select ro.refresh_template_id
template_id,
ro.object_name,
ro.schema_name,
ot.object_type_name object_type
from system.repcat$_template_objects ro,
system.repcat$_refresh_templates rt,
system.repcat$_template_types tt,
system.repcat$_object_types ot
where ro.refresh_template_id = rt.refresh_template_id
and ro.object_type = ot.object_type_id
and rt.template_type_id = tt.template_type_id
and bitand(rawtohex(tt.flags),2) = 2"
SYS DBA_IAS_POSTGEN_STMTS 268 "select
""IAS_TEMPLATE_ID"",""LINENO"",""DDL_TEXT"" from
sys.dba_ias_gen_stmts_exp gs
where gs.lineno > (select lineno from sys.dba_ias_gen_stmts_exp f
where to_char(f.ddl_text)='0'
and f.ias_template_id = gs.ias_template_id)"
SYS DBA_IAS_PREGEN_STMTS 268 "select
""IAS_TEMPLATE_ID"",""LINENO"",""DDL_TEXT"" from
sys.dba_ias_gen_stmts_exp gs
where gs.lineno < (select lineno from sys.dba_ias_gen_stmts_exp f
where to_char(f.ddl_text)='0'
and f.ias_template_id = gs.ias_template_id)"
SYS DBA_IAS_SITES 146 "select refresh_template_name, user_name,
site_name
from system.repcat$_template_sites
where status = -100 /*secret code for IAS template sites? */"
SYS DBA_IAS_TEMPLATES 298 "select owner, refresh_group_name,
refresh_template_name ias_template_name,
refresh_template_id ias_template_id,
template_comment
from system.repcat$_refresh_templates rt,
system.repcat$_template_types tt
where rt.template_type_id = tt.template_type_id
and bitand(rawtohex(tt.flags),2) = 2"
SYS DBA_INDEXES 3921 "select u.name, o.name,
decode(bitand(i.property, 16), 0, '', 'FUNCTION-BASED ') ||
decode(i.type#, 1, 'NORMAL'||
decode(bitand(i.property, 4), 0, '', 4, '/
REV'),
2, 'BITMAP', 3, 'CLUSTER', 4, 'IOT - TOP',
5, 'IOT - NESTED', 6, 'SECONDARY', 7, 'ANSI', 8,
'LOB',
9, 'DOMAIN'),
iu.name, io.name,
decode(io.type#, 0, 'NEXT OBJECT', 1, 'INDEX', 2, 'TABLE', 3,
'CLUSTER',
4, 'VIEW', 5, 'SYNONYM', 6, 'SEQUENCE',
'UNDEFINED'),
decode(bitand(i.property, 1), 0, 'NONUNIQUE', 1, 'UNIQUE',
'UNDEFINED'),
decode(bitand(i.flags, 32), 0, 'DISABLED', 32, 'ENABLED',
null),
i.spare2,
decode(bitand(i.property, 34), 0,
decode(i.type#, 9, null, ts.name), null),
decode(bitand(i.property, 2),0, i.initrans, null),
decode(bitand(i.property, 2),0, i.maxtrans, null),
s.iniexts * ts.blocksize,
decode(bitand(ts.flags, 3), 1, to_number(NULL),
s.extsize * ts.blocksize),
s.minexts, s.maxexts,
decode(bitand(ts.flags, 3), 1, to_number(NULL),
s.extpct),
decode(i.type#, 4, mod(i.pctthres$,256), NULL), i.trunccnt,
decode(bitand(ts.flags, 32), 32, to_number(NULL),
decode(bitand(o.flags, 2), 2, 1, decode(s.lists, 0, 1,
s.lists))),
decode(bitand(ts.flags, 32), 32, to_number(NULL),
decode(bitand(o.flags, 2), 2, 1, decode(s.groups, 0, 1,
s.groups))),
decode(bitand(i.property, 2),0,i.pctfree$,null),
decode(bitand(i.property, 2), 2, NULL,
decode(bitand(i.flags, 4), 0, 'YES', 'NO')),
i.blevel, i.leafcnt, i.distkey, i.lblkkey, i.dblkkey, i.clufac,
decode(bitand(i.property, 2), 2,
decode(i.type#, 9, decode(bitand(i.flags, 8),
8, 'INPROGRS', 'VALID'), 'N/
A'),
decode(bitand(i.flags, 1), 1, 'UNUSABLE',
decode(bitand(i.flags, 8), 8, 'INPROGRS',

'VALID'))),
rowcnt, samplesize, analyzetime,
decode(i.degree, 32767, 'DEFAULT', nvl(i.degree,1)),
decode(i.instances, 32767, 'DEFAULT', nvl(i.instances,1)),
decode(bitand(i.property, 2), 2, 'YES', 'NO'),
decode(bitand(o.flags, 2), 0, 'N', 2, 'Y', 'N'),
decode(bitand(o.flags, 4), 0, 'N', 4, 'Y', 'N'),
decode(bitand(o.flags, 16), 0, 'N', 16, 'Y', 'N'),
decode(bitand(o.flags, 2), 2, 'DEFAULT',
decode(s.cachehint, 0, 'DEFAULT', 1, 'KEEP', 2,
'RECYCLE', NULL)),
decode(bitand(i.flags, 64), 0, 'NO', 'YES'),
decode(bitand(o.flags, 2), 0, NULL,
decode(bitand(i.property, 64), 64, 'SYS$SESSION', 'SYS
$TRANSACTION')),
decode(bitand(i.flags, 128), 128, mod(trunc(i.pctthres$/256),
256),
decode(i.type#, 4, mod(trunc(i.pctthres$/256),256),
NULL)),
itu.name, ito.name, i.spare4,
decode(bitand(i.flags, 2048), 0, 'NO', 'YES'),
decode(i.type#, 9, decode(o.status, 5, 'IDXTYP_INVLD',
1, 'VALID'), ''),
decode(i.type#, 9, decode(bitand(i.flags, 16), 16, 'FAILED',
'VALID'), ''),
decode(bitand(i.property, 16), 0, '',
decode(bitand(i.flags, 1024), 0, 'ENABLED',
'DISABLED')),
decode(bitand(i.property, 1024), 1024, 'YES', 'NO')
from sys.ts$ ts, sys.seg$ s,
sys.user$ iu, sys.obj$ io, sys.user$ u, sys.ind$ i, sys.obj$ o,
sys.user$ itu, sys.obj$ ito
where u.user# = o.owner#
and o.obj# = i.obj#
and i.bo# = io.obj#
and io.owner# = iu.user#
and bitand(i.flags, 4096) = 0
and i.ts# = ts.ts# (+)
and i.file# = s.file# (+)
and i.block# = s.block# (+)
and i.ts# = s.ts# (+)
and i.indmethod# = ito.obj# (+)
and ito.owner# = itu.user# (+)"
SYS DBA_INDEXTYPES 545 "select u.name, o.name, u1.name, o1.name,
i.interface_version#, t.version#,
io.opcount, decode(bitand(i.property, 48), 0, 'NONE', 16, 'RANGE', 32,
'HASH', 48, 'HASH,RANGE')
from sys.indtypes$ i, sys.user$ u, sys.obj$ o,
sys.user$ u1, (select it.obj#, count(*) opcount from
sys.indop$ io1, sys.indtypes$ it where
io1.obj# = it.obj# and bitand(io1.property, 4) != 4
group by it.obj#) io, sys.obj$ o1,
sys.type$ t
where i.obj# = o.obj# and o.owner# = u.user# and
u1.user# = o.owner# and io.obj# = i.obj# and
o1.obj# = i.implobj# and o1.oid$ = t.toid"
SYS DBA_INDEXTYPE_COMMENTS 162 "select u.name, o.name, c.comment$
from sys.obj$ o, sys.user$ u, sys.indtypes$ i, sys.com$ c
where o.obj# = i.obj# and u.user# = o.owner# and c.obj# = i.obj#"
SYS DBA_INDEXTYPE_OPERATORS 251 "select u.name, o.name, u1.name,
op.name, i.bind#
from sys.user$ u, sys.indop$ i, sys.obj$ o,
sys.obj$ op, sys.user$ u1
where i.obj# = o.obj# and i.oper# = op.obj# and
u.user# = o.owner# and bitand(i.property, 4) != 4 and
u1.user#=op.owner#"
SYS DBA_IND_COLUMNS 637 "select io.name, idx.name, bo.name, base.name,
decode(ac.name, null, c.name, ac.name),
ic.pos#, c.length, c.spare3,
decode(bitand(c.property, 131072), 131072, 'DESC', 'ASC')
from sys.col$ c, sys.obj$ idx, sys.obj$ base, sys.icol$ ic,
sys.user$ io, sys.user$ bo, sys.ind$ i, sys.attrcol$ ac
where ic.bo# = c.obj#
and decode(bitand(i.property,1024),0,ic.intcol#,ic.spare2) =
c.intcol#
and ic.bo# = base.obj#
and io.user# = idx.owner#
and bo.user# = base.owner#
and ic.obj# = idx.obj#
and idx.obj# = i.obj#
and i.type# in (1, 2, 3, 4, 6, 7, 9)
and c.obj# = ac.obj#(+)
and c.intcol# = ac.intcol#(+)"
SYS DBA_IND_EXPRESSIONS 497 "select io.name, idx.name, bo.name,
base.name, c.default$, ic.pos#
from sys.col$ c, sys.obj$ idx, sys.obj$ base, sys.icol$ ic,
sys.user$ io, sys.user$ bo, sys.ind$ i
where bitand(ic.spare1,1) = 1 /* an expression */
and (bitand(i.property,1024) = 0) /* not bmji */
and ic.bo# = c.obj#
and ic.intcol# = c.intcol#
and ic.bo# = base.obj#
and io.user# = idx.owner#
and bo.user# = base.owner#
and ic.obj# = idx.obj#
and idx.obj# = i.obj#
and i.type# in (1, 2, 3, 4, 6, 7, 9)"
SYS DBA_IND_PARTITIONS 3214 "select u.name, io.name, 'NO', io.subname,
0,
ip.hiboundval, ip.hiboundlen, ip.part#,
decode(bitand(ip.flags, 1), 1, 'UNUSABLE', 'USABLE'), ts.name,
ip.pctfree$,ip.initrans, ip.maxtrans, s.iniexts * ts.blocksize,
decode(bitand(ts.flags, 3), 1, to_number(NULL),
s.extsize * ts.blocksize),
s.minexts, s.maxexts,
decode(bitand(ts.flags, 3), 1, to_number(NULL),
s.extpct),
decode(bitand(ts.flags, 32), 32, to_number(NULL),
decode(s.lists, 0, 1, s.lists)),
decode(bitand(ts.flags, 32), 32, to_number(NULL),
decode(s.groups, 0, 1, s.groups)),
decode(mod(trunc(ip.flags / 4), 2), 0, 'YES', 'NO'),
decode(bitand(ip.flags, 1024), 0, 'DISABLED', 1024, 'ENABLED',
null),
ip.blevel, ip.leafcnt, ip.distkey, ip.lblkkey, ip.dblkkey,
ip.clufac, ip.rowcnt, ip.samplesize, ip.analyzetime,
decode(s.cachehint, 0, 'DEFAULT', 1, 'KEEP', 2, 'RECYCLE',
NULL),
decode(bitand(ip.flags, 8), 0, 'NO', 'YES'), ip.pctthres$,
decode(bitand(ip.flags, 16), 0, 'NO', 'YES'),'',''
from obj$ io, indpart$ ip, ts$ ts, sys.seg$ s, user$ u
where io.obj# = ip.obj# and ts.ts# = ip.ts# and ip.file#=s.file# and
ip.block#=s.block# and ip.ts#=s.ts# and io.owner# = u.user#
union all
select u.name, io.name, 'YES', io.subname, icp.subpartcnt,
icp.hiboundval, icp.hiboundlen, icp.part#, 'N/A', ts.name,
icp.defpctfree, icp.definitrans, icp.defmaxtrans,
icp.definiexts, icp.defextsize, icp.defminexts, icp.defmaxexts,
icp.defextpct, icp.deflists, icp.defgroups,
decode(icp.deflogging, 0, 'NONE', 1, 'YES', 2, 'NO',
'UNKNOWN'),
'N/A', icp.blevel, icp.leafcnt, icp.distkey, icp.lblkkey,
icp.dblkkey,
icp.clufac, icp.rowcnt, icp.samplesize, icp.analyzetime,
decode(icp.defbufpool, 0, 'DEFAULT', 1, 'KEEP', 2, 'RECYCLE',
NULL),
decode(bitand(icp.flags, 8), 0, 'NO', 'YES'), TO_NUMBER(NULL),
decode(bitand(icp.flags, 16), 0, 'NO', 'YES'),'',''
from obj$ io, indcompart$ icp, ts$ ts, user$ u
where io.obj# = icp.obj# and icp.defts# = ts.ts# (+) and u.user# =
io.owner#
union all
select u.name, io.name, 'NO', io.subname, 0,
ip.hiboundval, ip.hiboundlen, ip.part#,
decode(bitand(ip.flags, 1), 1, 'UNUSABLE',
decode(bitand(ip.flags, 4096), 4096, 'INPROGRS',
'USABLE')),
null, ip.pctfree$, ip.initrans, ip.maxtrans,
0, 0, 0, 0, 0, 0, 0,
decode(mod(trunc(ip.flags / 4), 2), 0, 'YES', 'NO'),
decode(bitand(ip.flags, 1024), 0, 'DISABLED', 1024, 'ENABLED',
null),
ip.blevel, ip.leafcnt, ip.distkey, ip.lblkkey, ip.dblkkey,
ip.clufac, ip.rowcnt, ip.samplesize, ip.analyzetime,
'DEFAULT',
decode(bitand(ip.flags, 8), 0, 'NO', 'YES'), ip.pctthres$,
decode(bitand(ip.flags, 16), 0, 'NO', 'YES'),
decode(i.type#,
9, decode(bitand(ip.flags, 8192), 8192, 'FAILED',
'VALID'),
''),
ipp.parameters
from obj$ io, indpart$ ip, user$ u, ind$ i, indpart_param$ ipp
where io.obj# = ip.obj# and io.owner# = u.user# and
ip.bo# = i.obj# and ip.obj# = ipp.obj#"
SYS DBA_IND_SUBPARTITIONS 1357 "select u.name, po.name, po.subname,
so.subname,
isp.hiboundval, isp.hiboundlen, isp.subpart#,
decode(bitand(isp.flags, 1), 1, 'UNUSABLE', 'USABLE'), ts.name,
isp.pctfree$, isp.initrans, isp.maxtrans,
s.iniexts * ts.blocksize,
decode(bitand(ts.flags, 3), 1, to_number(NULL),
s.extsize * ts.blocksize),
s.minexts, s.maxexts,
decode(bitand(ts.flags, 3), 1, to_number(NULL),
s.extpct),
decode(bitand(ts.flags, 32), 32, to_number(NULL),
decode(s.lists, 0, 1, s.lists)),
decode(bitand(ts.flags, 32), 32, to_number(NULL),
decode(s.groups, 0, 1, s.groups)),
decode(mod(trunc(isp.flags / 4), 2), 0, 'YES', 'NO'),
isp.blevel, isp.leafcnt, isp.distkey, isp.lblkkey, isp.dblkkey,
isp.clufac, isp.rowcnt, isp.samplesize, isp.analyzetime,
decode(s.cachehint, 0, 'DEFAULT', 1, 'KEEP', 2, 'RECYCLE',
NULL),
decode(bitand(isp.flags, 8), 0, 'NO', 'YES'),
decode(bitand(isp.flags, 16), 0, 'NO', 'YES')
from sys.obj$ so, sys.obj$ po, sys.indsubpart$ isp, sys.ts$ ts,
sys.seg$ s, sys.user$ u
where so.obj# = isp.obj# and po.obj# = isp.pobj# and isp.ts# = ts.ts#
and
u.user# = po.owner# and isp.file# = s.file# and isp.block# =
s.block# and
isp.ts# = s.ts#"
SYS DBA_INTERNAL_TRIGGERS 682 "select o.name, u.name, 'DEFERRED RPC
QUEUE'
from sys.tab$ t, sys.obj$ o, sys.user$ u
where t.obj# = o.obj#
and u.user# = o.owner#
and bitand(t.trigflag,1) = 1
union
select o.name, u.name, 'MVIEW LOG'
from sys.tab$ t, sys.obj$ o, sys.user$ u
where t.obj# = o.obj#
and u.user# = o.owner#
and bitand(t.trigflag,2) = 2
union
select o.name, u.name, 'UPDATABLE MVIEW LOG'
from sys.tab$ t, sys.obj$ o, sys.user$ u
where t.obj# = o.obj#
and u.user# = o.owner#
and bitand(t.trigflag,4) = 4
union
select o.name, u.name, 'CONTEXT'
from sys.tab$ t, sys.obj$ o, sys.user$ u
where t.obj# = o.obj#
and u.user# = o.owner#
and bitand(t.trigflag,8) = 8"
SYS DBA_JAVA_ARGUMENTS 503 "select u.name, m.kln, m.mix, m.mnm, m.aix,
m.aad,
decode(m.abt, 10, 'int',
11, 'long',
6, 'float',
7, 'double',
4, 'boolean',
8, 'byte',
5, 'char',
9, 'short',
2, 'class',
NULL),
m.aln
from sys.obj$ o, sys.x$joxfm m, sys.user$ u
where o.obj# = m.obn
and o.type# = 29
and o.owner# = u.user#"
SYS DBA_JAVA_CLASSES 698 "select u.name, m.kln, m.maj, m.min,
decode(BITAND(m.acc, 512), 512, 'CLASS',
0, 'INTERFACE'),
decode(BITAND(m.acc, 1), 1, 'PUBLIC',
0, NULL),
decode(BITAND(m.acc, 131072), 131072, 'YES',
0, 'NO'),
decode(BITAND(m.acc, 1024), 1024, 'YES',
0, 'NO'),
decode(BITAND(m.acc, 16), 16, 'YES',
0, 'NO'),
decode(m.dbg, 1, 'YES',
0, 'NO'),
m.src, m.spl, m.oln
from sys.obj$ o, sys.x$joxfm m, sys.user$ u
where o.obj# = m.obn
and o.type# = 29
and o.owner# = u.user#"
SYS DBA_JAVA_DERIVATIONS 389 "select u.name,
dbms_java.longname(t.joxftderivedfrom),
t.joxftderivedclassnumber,
dbms_java.longname(t.joxftderivedclassname),
t.joxftderivedresourcenumber,
dbms_java.longname(t.joxftderivedresourcename)
from sys.obj$ o, sys.x$joxft t, sys.user$ u
where o.obj# = t.joxftobn
and o.type# = 29
and t.joxftderivedfrom IS NOT NULL
and o.owner# = u.user#"
SYS DBA_JAVA_FIELDS 1022 "select u.name, m.kln, m.fix, m.fnm,
decode(BITAND(m.fac, 7), 1, 'PUBLIC',
2, 'PRIVATE',
4, 'PROTECTED',
NULL),
decode(BITAND(m.fac, 8), 8, 'YES',
0, 'NO'),
decode(BITAND(m.fac, 16), 16, 'YES',
0, 'NO'),
decode(BITAND(m.fac, 64), 64, 'YES',
0, 'NO'),
decode(BITAND(m.fac, 128), 128, 'YES',
0, 'NO'),
m.fad,
decode(m.fbt, 10, 'int',
11, 'long',
6, 'float',
7, 'double',
4, 'boolean',
8, 'byte',
5, 'char',
9, 'short',
2, 'class',
NULL),
m.fln
from sys.obj$ o, sys.x$joxfm m, sys.user$ u
where o.obj# = m.obn
and o.type# = 29
and o.owner# = u.user#"
SYS DBA_JAVA_IMPLEMENTS 143 "select u.name, m.kln, m.ifx, m.iln
from sys.obj$ o, sys.x$joxfm m, sys.user$ u
where o.obj# = m.obn
and o.type# = 29
and o.owner# = u.user#"
SYS DBA_JAVA_INNERS 682 "select u.name, m.kln, m.nix, m.nsm, m.nln,
decode(BITAND(m.oac, 7), 1, 'PUBLIC',
2, 'PRIVATE',
4, 'PROTECTED',
NULL),
decode(BITAND(m.acc, 8), 8, 'YES',
0, 'NO'),
decode(BITAND(m.acc, 16), 16, 'YES',
0, 'NO'),
decode(BITAND(m.acc, 1024), 1024, 'YES',
0, 'NO'),
decode(BITAND(m.acc, 512), 512, 'YES',
0, 'NO')
from sys.obj$ o, sys.x$joxfm m, sys.user$ u
where o.obj# = m.obn
and o.type# = 29
and o.owner# = u.user#"
SYS DBA_JAVA_LAYOUTS 206 "select u.name, m.kln, m.lic, m.lnc,
m.lfc, m.lsf,
m.lmc, m.lsm, m.jnc
from sys.obj$ o, sys.x$joxfm m, sys.user$ u
where o.obj# = m.obn
and o.type# = 29
and o.owner# = u.user#"
SYS DBA_JAVA_METHODS 1262 "select u.name, m.kln, m.mix, m.mnm,
decode(BITAND(m.mac, 7), 1, 'PUBLIC',
2, 'PRIVATE',
4, 'PROTECTED',
NULL),
decode(BITAND(m.mac, 8), 8, 'YES',
0, 'NO'),
decode(BITAND(m.mac, 16), 16, 'YES',
0, 'NO'),
decode(BITAND(m.mac, 32), 32, 'YES',
0, 'NO'),
decode(BITAND(m.mac, 256), 256, 'YES',
0, 'NO'),
decode(BITAND(m.mac, 1024), 1024, 'YES',
0, 'NO'),
decode(BITAND(m.mac, 2048), 2048, 'YES',
0, 'NO'),
m.agc, m.exc, m.rad,
decode(m.rbt, 10, 'int',
11, 'long',
6, 'float',
7, 'double',
4, 'boolean',
8, 'byte',
5, 'char',
9, 'short',
2, 'class',
12, 'void',
NULL),
m.rln
from sys.obj$ o, sys.x$joxfm m, sys.user$ u
where o.obj# = m.obn
and o.type# = 29
and o.owner# = u.user#"
SYS DBA_JAVA_NCOMPS 281 "select u.name,
dbms_java.longname(o.name),
t.joxftncompsource,
t.joxftncompinitializer,
t.joxftncomplibraryfile,
t.joxftncomplibrary
from sys.obj$ o, sys.x$joxft t, sys.user$ u
where o.obj# = t.joxftobn
and o.type# = 29
and o.owner# = u.user#"
SYS DBA_JAVA_POLICY 352 "select
decode(jp.kind#, 0, 'GRANT', 1, 'RESTRICT'),
u.name,
ut.name,
jp.type_name,
jp.name,
jp.action,
decode(jp.status#, 2, 'ENABLED', 3, 'DISABLED'),
jp.key
from
java$policy$ jp, sys.user$ u, sys.user$ ut
where
jp.grantee# = u.user# and jp.type_schema# = ut.user#
order by u.name, ut.name, jp.type_name, jp.name, jp.action"
SYS DBA_JAVA_RESOLVERS 265 "select u.name,
dbms_java.longname(o.name),
t.joxftresolvertermnumber,
t.joxftresolvertermpattern,
t.joxftresolvertermschema
from sys.obj$ o, sys.x$joxft t, sys.user$ u
where o.obj# = t.joxftobn
and o.type# = 29
and o.owner# = u.user#"
SYS DBA_JAVA_THROWS 157 "select u.name, m.kln, m.mix, m.mnm, m.xix,
m.xln
from sys.obj$ o, sys.x$joxfm m, sys.user$ u
where o.obj# = m.obn
and o.type# = 29
and o.owner# = u.user#"
SYS DBA_JOBS 494 "select JOB, lowner LOG_USER, powner PRIV_USER,
cowner SCHEMA_USER,
LAST_DATE, substr(to_char(last_date,'HH24:MI:SS'),1,8) LAST_SEC,
THIS_DATE, substr(to_char(this_date,'HH24:MI:SS'),1,8) THIS_SEC,
NEXT_DATE, substr(to_char(next_date,'HH24:MI:SS'),1,8) NEXT_SEC,
(total+(sysdate-nvl(this_date,sysdate)))*86400 TOTAL_TIME,
decode(mod(FLAG,2),1,'Y',0,'N','?') BROKEN,
INTERVAL# interval, FAILURES, WHAT,
nlsenv NLS_ENV, env MISC_ENV, j.field1 INSTANCE
from sys.job$ j"
SYS DBA_JOBS_RUNNING 267 "select v.SID, v.id2 JOB, j.FAILURES,
LAST_DATE, substr(to_char(last_date,'HH24:MI:SS'),1,8) LAST_SEC,
THIS_DATE, substr(to_char(this_date,'HH24:MI:SS'),1,8) THIS_SEC,
j.field1 INSTANCE
from sys.job$ j, v$lock v
where v.type = 'JQ' and j.job (+)= v.id2"
SYS DBA_JOIN_IND_COLUMNS 505 "select
ui.name, oi.name,
uti.name, oti.name, ci.name,
uto.name, oto.name, co.name
from
sys.user$ ui, sys.user$ uti, sys.user$ uto,
sys.obj$ oi, sys.obj$ oti, sys.obj$ oto,
sys.col$ ci, sys.col$ co,
sys.jijoin$ ji
where ji.obj# = oi.obj#
and oi.owner# = ui.user#
and ji.tab1obj# = oti.obj#
and oti.owner# = uti.user#
and ci.obj# = oti.obj#
and ji.tab1col# = ci.intcol#
and ji.tab2obj# = oto.obj#
and oto.owner# = uto.user#
and co.obj# = oto.obj#
and ji.tab2col# = co.intcol#"
SYS DBA_KGLLOCK 166 "select kgllkuse, kgllkhdl, kgllkmod, kgllkreq,
'Lock' kgllktype from x$kgllk
union all
select kglpnuse, kglpnhdl, kglpnmod, kglpnreq, 'Pin' kgllktype from
x$kglpn"
SYS DBA_LIBRARIES 257 "select u.name,
o.name,
l.filespec,
decode(bitand(l.property, 1), 0, 'Y', 1, 'N', NULL),
decode(o.status, 0, 'N/A', 1, 'VALID', 'INVALID')
from sys.obj$ o, sys.library$ l, sys.user$ u
where o.owner# = u.user#
and o.obj# = l.obj#"
SYS DBA_LMT_FREE_SPACE 66 "select ktfbfetsn, ktfbfefno, ktfbfebno,
ktfbfeblks
from x$ktfbfe"
SYS DBA_LMT_USED_EXTENTS 118 "select ktfbuesegfno, ktfbuesegbno,
ktfbuesegtsn,
ktfbueextno, ktfbuefno, ktfbuebno,
ktfbueblks
from sys.x$ktfbue"
SYS DBA_LOBS 2664 "select u.name, o.name,
decode(bitand(c.property, 1), 1, ac.name, c.name), lo.name,
io.name,
l.chunk * ts.blocksize,
decode(l.pctversion$, 101, to_number(NULL), 102,
to_number(NULL),
l.pctversion$),
decode(l.retention, -1, to_number(NULL), l.retention),
decode(l.freepools, 0, to_number(NULL), 65534, to_number(NULL),
65535, to_number(NULL), l.freepools),
decode(bitand(l.flags, 27), 1, 'NO', 2, 'NO', 8, 'CACHEREADS',
16, 'CACHEREADS', 'YES'),
decode(bitand(l.flags, 18), 2, 'NO', 16, 'NO', 'YES'),
decode(bitand(l.property, 2), 2, 'YES', 'NO')
from sys.obj$ o, sys.col$ c, sys.attrcol$ ac, sys.tab$ ta,
sys.lob$ l, sys.obj$ lo, sys.obj$ io, sys.user$ u, sys.ts$ ts
where o.owner# = u.user#
and o.obj# = c.obj#
and c.obj# = l.obj#
and c.intcol# = l.intcol#
and l.lobj# = lo.obj#
and l.ind# = io.obj#
and l.ts# = ts.ts#
and c.obj# = ac.obj#(+)
and c.intcol# = ac.intcol#(+)
and bitand(c.property,32768) != 32768 /* not unused column
*/
and o.obj# = ta.obj#
and bitand(ta.property, 32) != 32 /* not partitioned table
*/
union all
select u.name, o.name,
decode(bitand(c.property, 1), 1, ac.name, c.name),
lo.name, io.name,
plob.defchunk * (decode(null, plob.defts#,
ts2.blocksize, ts1.blocksize)),
decode(plob.defpctver$, 101, to_number(NULL), 102,
to_number(NULL),
plob.defpctver$),
decode(l.retention, -1, to_number(NULL), l.retention),
decode(l.freepools, 0, to_number(NULL), 65534, to_number(NULL),
65535, to_number(NULL), l.freepools),
decode(bitand(plob.defflags, 27), 1, 'NO', 2, 'NO', 8,
'CACHEREADS',
16, 'CACHEREADS', 'YES'),
decode(bitand(plob.defflags,22), 0,'NONE', 4,'YES', 2,'NO',
16,'NO', 'UNKNOWN'),
decode(bitand(plob.defpro, 2), 2, 'YES', 'NO')
from sys.obj$ o, sys.col$ c, sys.attrcol$ ac, sys.partlob$ plob,
sys.lob$ l, sys.obj$ lo, sys.obj$ io, sys.ts$ ts1, sys.tab$ ta,
sys.partobj$ po, sys.ts$ ts2, sys.user$ u
where o.owner# = u.user#
and o.obj# = c.obj#
and c.obj# = l.obj#
and c.intcol# = l.intcol#
and l.lobj# = lo.obj#
and l.ind# = io.obj#
and l.lobj# = plob.lobj#
and plob.defts# = ts1.ts# (+)
and c.obj# = ac.obj#(+)
and c.intcol# = ac.intcol#(+)
and bitand(c.property,32768) != 32768 /* not unused column
*/
and o.obj# = ta.obj#
and bitand(ta.property, 32) = 32 /* partitioned table
*/
and o.obj# = po.obj#
and po.defts# = ts2.ts#"
SYS DBA_LOB_PARTITIONS 3387 "select u.name,
o.name,
decode(bitand(c.property, 1), 1, a.name, c.name),
lo.name,
po.subname,
lpo.subname,
lipo.subname,
lf.frag#,
'NO',
lf.chunk * ts.blocksize,
lf.pctversion$,
decode(bitand(lf.fragflags,27), 1, 'NO', 2, 'NO', 8,
'CACHEREADS',
16, 'CACHEREADS', 'YES'),
decode(lf.fragpro, 0, 'NO', 'YES'),
ts.name,
to_char(s.iniexts * ts.blocksize),
to_char(decode(bitand(ts.flags, 3), 1, to_number(NULL),
s.extsize * ts.blocksize)),
to_char(s.minexts),
to_char(s.maxexts),
to_char(decode(bitand(ts.flags, 3), 1,
to_number(NULL),s.extpct)),
to_char(decode(s.lists, 0, 1, s.lists)),
to_char(decode(s.groups, 0, 1, s.groups)),
decode(bitand(lf.fragflags, 18), 2, 'NO', 16, 'NO', 'YES'),
decode(s.cachehint, 0, 'DEFAULT', 1, 'KEEP', 2, 'RECYCLE',
NULL)
from sys.obj$ o, sys.col$ c,
sys.lob$ l, sys.obj$ lo,
sys.lobfrag$ lf, sys.obj$ lpo,
sys.obj$ po, sys.obj$ lipo,
sys.partobj$ pobj,
sys.ts$ ts, sys.seg$ s, sys.user$ u, attrcol$ a
where o.owner# = u.user#
and pobj.obj# = o.obj#
and mod(pobj.spare2, 256) = 0
and o.obj# = c.obj#
and c.obj# = l.obj#
and c.intcol# = l.intcol#
and l.lobj# = lo.obj#
and l.lobj# = lf.parentobj#
and lf.tabfragobj# = po.obj#
and lf.fragobj# = lpo.obj#
and lf.indfragobj# = lipo.obj#
and lf.file# = s.file#
and lf.block# = s.block#
and lf.ts# = ts.ts#
and bitand(c.property,32768) != 32768 /* not unused column
*/
and c.obj# = a.obj#(+) and c.intcol# = a.intcol#(+)
union all
select u.name,
o.name,
decode(bitand(c.property, 1), 1, a.name, c.name),
lo.name,
po.subname,
lpo.subname,
lipo.subname,
lcp.part#,
'YES',
lcp.defchunk,
lcp.defpctver$,
decode(bitand(lcp.defflags, 27), 1, 'NO', 2, 'NO', 8,
'CACHEREADS',
16, 'CACHEREADS', 'YES'),
decode(lcp.defpro, 0, 'NO', 'YES'),
ts.name,
decode(lcp.definiexts, NULL, 'DEFAULT', lcp.definiexts),
decode(lcp.defextsize, NULL, 'DEFAULT', lcp.defextsize),
decode(lcp.defminexts, NULL, 'DEFAULT', lcp.defminexts),
decode(lcp.defmaxexts, NULL, 'DEFAULT', lcp.defmaxexts),
decode(lcp.defextpct, NULL, 'DEFAULT', lcp.defextpct),
decode(lcp.deflists, NULL, 'DEFAULT', lcp.deflists),
decode(lcp.defgroups, NULL, 'DEFAULT', lcp.defgroups),
decode(bitand(lcp.defflags,22), 0,'NONE', 4,'YES', 2,'NO',
16,'NO', 'UNKNOWN'),
decode(lcp.defbufpool, 0, 'DEFAULT', 1, 'KEEP', 2, 'RECYCLE',
NULL)
from sys.obj$ o, sys.col$ c,
sys.lob$ l, sys.obj$ lo,
sys.lobcomppart$ lcp, sys.obj$ lpo,
sys.obj$ po, sys.obj$ lipo,
sys.ts$ ts, partobj$ pobj, sys.user$ u, attrcol$ a
where o.owner# = u.user#
and pobj.obj# = o.obj#
and mod(pobj.spare2, 256) != 0
and o.obj# = c.obj#
and c.obj# = l.obj#
and c.intcol# = l.intcol#
and l.lobj# = lo.obj#
and l.lobj# = lcp.lobj#
and lcp.tabpartobj# = po.obj#
and lcp.partobj# = lpo.obj#
and lcp.indpartobj# = lipo.obj#
and lcp.defts# = ts.ts# (+)
and bitand(c.property,32768) != 32768 /* not unused column
*/
and c.obj# = a.obj#(+) and c.intcol# = a.intcol#(+)"
SYS DBA_LOB_SUBPARTITIONS 1733 "select u.name,
o.name,
decode(bitand(c.property, 1), 1, a.name, c.name),
lo.name,
lpo.subname,
spo.subname,
lspo.subname,
lispo.subname,
lf.frag#,
lf.chunk * ts.blocksize,
lf.pctversion$,
decode(bitand(lf.fragflags,27), 1, 'NO', 2, 'NO', 8,
'CACHEREADS',
16, 'CACHEREADS', 'YES'),
decode(lf.fragpro, 0, 'NO', 'YES'),
ts.name,
s.iniexts * ts.blocksize,
decode(bitand(ts.flags, 3), 1, to_number(NULL),
s.extsize * ts.blocksize),
s.minexts,
s.maxexts,
decode(bitand(ts.flags, 3), 1, to_number(NULL),s.extpct),
decode(s.lists, 0, 1, s.lists),
decode(s.groups, 0, 1, s.groups),
decode(bitand(lf.fragflags, 18), 2, 'NO', 16, 'NO', 'YES'),
decode(s.cachehint, 0, 'DEFAULT', 1, 'KEEP', 2, 'RECYCLE',
NULL)
from sys.obj$ o, sys.col$ c,
sys.lob$ l, sys.obj$ lo,
sys.lobcomppart$ lcp, sys.obj$ lpo,
sys.lobfrag$ lf, sys.obj$ lspo,
sys.obj$ spo, sys.obj$ lispo,
sys.partobj$ pobj,
sys.ts$ ts, sys.seg$ s, sys.user$ u, attrcol$ a
where o.owner# = u.user#
and pobj.obj# = o.obj#
and mod(pobj.spare2, 256) != 0
and o.obj# = c.obj#
and c.obj# = l.obj#
and c.intcol# = l.intcol#
and l.lobj# = lo.obj#
and l.lobj# = lcp.lobj#
and lcp.partobj# = lpo.obj#
and lf.parentobj# = lcp.partobj#
and lf.tabfragobj# = spo.obj#
and lf.fragobj# = lspo.obj#
and lf.indfragobj# = lispo.obj#
and lf.file# = s.file#
and lf.block# = s.block#
and lf.ts# = ts.ts#
and bitand(c.property,32768) != 32768 /* not unused column
*/
and c.obj# = a.obj#(+) and c.intcol# = a.intcol#(+)"
SYS DBA_LOB_TEMPLATES 492 "select u.name, o.name,
decode(bitand(c.property, 1), 1, ac.name, c.name),
st.spart_name, lst.lob_spart_name, ts.name
from sys.obj$ o, sys.defsubpart$ st, sys.defsubpartlob$ lst, sys.ts$
ts,
sys.col$ c, sys.attrcol$ ac, sys.user$ u
where o.obj# = lst.bo# and st.bo# = lst.bo# and
st.spart_position = lst.spart_position and
lst.lob_spart_ts# = ts.ts#(+) and c.obj# = lst.bo# and
c.intcol# = lst.intcol# and lst.intcol# = ac.intcol#(+) and
o.owner# = u.user#"
SYS DBA_LOCK 1457 "select
sid session_id,
decode(type,
'MR', 'Media Recovery',
'RT', 'Redo Thread',
'UN', 'User Name',
'TX', 'Transaction',
'TM', 'DML',
'UL', 'PL/SQL User Lock',
'DX', 'Distributed Xaction',
'CF', 'Control File',
'IS', 'Instance State',
'FS', 'File Set',
'IR', 'Instance Recovery',
'ST', 'Disk Space Transaction',
'TS', 'Temp Segment',
'IV', 'Library Cache Invalidation',
'LS', 'Log Start or Switch',
'RW', 'Row Wait',
'SQ', 'Sequence Number',
'TE', 'Extend Table',
'TT', 'Temp Table',
type) lock_type,
decode(lmode,
0, 'None', /* Mon Lock equivalent */
1, 'Null', /* N */
2, 'Row-S (SS)', /* L */
3, 'Row-X (SX)', /* R */
4, 'Share', /* S */
5, 'S/Row-X (SSX)', /* C */
6, 'Exclusive', /* X */
to_char(lmode)) mode_held,
decode(request,
0, 'None', /* Mon Lock equivalent */
1, 'Null', /* N */
2, 'Row-S (SS)', /* L */
3, 'Row-X (SX)', /* R */
4, 'Share', /* S */
5, 'S/Row-X (SSX)', /* C */
6, 'Exclusive', /* X */
to_char(request)) mode_requested,
to_char(id1) lock_id1, to_char(id2) lock_id2,
ctime last_convert,
decode(block,
0, 'Not Blocking', /* Not blocking any other processes */
1, 'Blocking', /* This lock blocks other processes */
2, 'Global', /* This lock is global, so we can't tell */
to_char(block)) blocking_others
from v$lock"
SYS DBA_LOCK_INTERNAL 2620 "select
sid session_id,
decode(type,
'MR', 'Media Recovery',
'RT', 'Redo Thread',
'UN', 'User Name',
'TX', 'Transaction',
'TM', 'DML',
'UL', 'PL/SQL User Lock',
'DX', 'Distributed Xaction',
'CF', 'Control File',
'IS', 'Instance State',
'FS', 'File Set',
'IR', 'Instance Recovery',
'ST', 'Disk Space Transaction',
'TS', 'Temp Segment',
'IV', 'Library Cache Invalidation',
'LS', 'Log Start or Switch',
'RW', 'Row Wait',
'SQ', 'Sequence Number',
'TE', 'Extend Table',
'TT', 'Temp Table',
type) lock_type,
decode(lmode,
0, 'None', /* Mon Lock equivalent */
1, 'Null', /* N */
2, 'Row-S (SS)', /* L */
3, 'Row-X (SX)', /* R */
4, 'Share', /* S */
5, 'S/Row-X (SSX)', /* C */
6, 'Exclusive', /* X */
to_char(lmode)) mode_held,
decode(request,
0, 'None', /* Mon Lock equivalent */
1, 'Null', /* N */
2, 'Row-S (SS)', /* L */
3, 'Row-X (SX)', /* R */
4, 'Share', /* S */
5, 'S/Row-X (SSX)', /* C */
6, 'Exclusive', /* X */
to_char(request)) mode_requested,
to_char(id1) lock_id1, to_char(id2) lock_id2
from v$lock /* processes waiting on or holding
enqueues */
union all /* procs holding
latches */
select s.sid, 'LATCH', 'Exclusive', 'None', rawtohex(laddr), ' '
from v$process p, v$session s, v$latchholder h
where h.pid = p.pid /* 6 = exclusive, 0 =
not held */
and p.addr = s.paddr
union all /* procs waiting on
latch */
select sid, 'LATCH', 'None', 'Exclusive', rawtohex(latchwait), ' '
from v$session s, v$process p
where latchwait is not null
and p.addr = s.paddr
union all /* library cache
locks */
select s.sid,
decode(ob.kglhdnsp, 0, 'Cursor', 1, 'Table/Procedure/Type', 2,
'Body',
3, 'trigger', 4, 'Index', 5, 'Cluster', 13, 'Java Source',
14, 'Java Resource', 32, 'Java Data',
to_char(ob.kglhdnsp))
|| ' Definition ' || lk.kgllktype,
decode(lk.kgllkmod, 0, 'None', 1, 'Null', 2, 'Share', 3,
'Exclusive',
to_char(lk.kgllkmod)),
decode(lk.kgllkreq, 0, 'None', 1, 'Null', 2, 'Share', 3,
'Exclusive',
to_char(lk.kgllkreq)),
decode(ob.kglnaown, null, '', ob.kglnaown || '.') || ob.kglnaobj
||
decode(ob.kglnadlk, null, '', '@' || ob.kglnadlk),
rawtohex(lk.kgllkhdl)
from v$session s, x$kglob ob, dba_kgllock lk
where lk.kgllkhdl = ob.kglhdadr
and lk.kgllkuse = s.saddr"
SYS DBA_LOGSTDBY_EVENTS 159 "select event_time, current_scn,
commit_scn,
xidusn, xidslt, xidsqn, full_event event,
errval status_code, error status
from system.logstdby$events"
SYS DBA_LOGSTDBY_LOG 254 "select thread#, sequence#, first_change#,
next_change#,
first_time, next_time, file_name, timestamp, dict_begin,
dict_end
from system.logmnr_log$
where session# =
(select value from system.logstdby$parameters where name =
'LMNR_SID')"
SYS DBA_LOGSTDBY_NOT_UNIQUE 3911 "select u.name owner, o.name
table_name,
decode((select count(c.obj#)
from sys.col$ c
where c.obj# = o.obj#
and c.type# in (8, /
* LONG */
24, /*
LONG RAW */
112, /
* CLOB */
113)), /
* BLOB */
0, 'N', 'Y') bad_column
from sys.user$ u, sys.obj$ o
where o.owner# = u.user#
and o.type# = 2 /*
tables */
and bitand(o.flags, 16) != 16 /* not a secondary
object */
and u.name != 'SYS'
and not exists
(select null
from sys.tab$ t
where t.obj# = o.obj#
and
(bitand(t.property, 512) = 512 or /* IOT overflow
segment */
bitand(t.property, 4194304) = 4194304 or /* global temp
table */
bitand(t.property, 8388608) = 8388608 or /* session temp
table */
bitand(t.property, 33554432) = 33554432 or /* Read only
MV */
bitand(t.property, 67108864) = 67108864 or /* MV Table
*/
bitand(t.property, 8192) = 8192)) /* nested tab */
and not exists
(select null
from sys.mlog$ ml where ml.mowner = u.name and ml.log =
o.name)
and (u.name != 'SYSTEM' or u.name = 'SYSTEM'
and (o.name not like 'LOGMNR%' and o.name not like 'LOGSTDBY
%'))
and not exists /* not null
unique key */
(select null
from ind$ i, icol$ ic, col$ c
where i.bo# = o.obj#
and ic.obj# = i.obj#
and c.col# = ic.col#
and c.obj# = i.bo#
and c.null$ > 0
and i.type# = 1
and bitand(i.property, 1) = 1)
and not exists /*
primary key */
(select null
from cdef$ cd
where cd.obj# = o.obj#
and cd.type# = 2
and (enabled is not null or bitand(cd.defer, 32) = 32))
and not exists
(select null
from sys.col$ c, sys.coltype$ ac, sys.obj$ ot, sys.type$ t
where c.obj# = o.obj#
and c.obj# = ac.obj#(+) and c.intcol# = ac.intcol#(+)
and ac.toid = ot.oid$(+)
and ot.type#(+) = 13
and ot.oid$ = t.tvoid(+)
and c.type# not in
(1, /*
VARCHAR2 */
2, /*
NUMBER */
8, /
* LONG */
9, /*
VARCHAR */
12, /
* DATE */
24, /*
LONG RAW */
96, /
* CHAR */
105, /*
MLSLABEL */
106, /*
MLSLABEL */
112, /
* CLOB */
113, /
* BLOB */
178, /
* TIME */
179, /* TIME WITH
TIME ZONE */
180, /*
TIMESTAMP */
182, /*
INTERVAL YEAR */
183) /*
INTERVAL DAY */
and (c.type# != 23 /
* RAW */
or (c.type# = 23 and bitand(c.property, 2) = 2)))"
SYS DBA_LOGSTDBY_PARAMETERS 146 "select name, value from
system.logstdby$parameters
where name != 'SHUTDOWN'
and name != 'SEED_PRIMARY_DBID'
and name != 'SEED_FIRST_SCN'"
SYS DBA_LOGSTDBY_PROGRESS 1109 "select
greatest(
(select max(a.processed_scn) - 1
from system.logstdby$apply_milestone a),
(select max(a.commit_scn)
from system.logstdby$apply_milestone a) ) applied_scn,
(select l.first_time
from system.logstdby$apply_milestone a, system.logmnr_log$ l
where a.commit_scn >= l.first_change#
and a.commit_scn < l.next_change#
and s.session# = l.session#) applied_time,
spill_scn read_scn,
(select l.first_time from system.logmnr_log$ l
where s.spill_scn >= l.FIRST_CHANGE#
and s.spill_scn < l.NEXT_CHANGE#
and s.session# = l.session#) read_time,
(select min(next_change#)-1 from system.logmnr_log$ l
where l.next_change# not in
(select first_change# from system.logmnr_log$))
newest_scn,
(select min(next_time) from system.logmnr_log$ l
where l.next_change# not in
(select first_change# from system.logmnr_log$))
newest_time
from system.logmnr_session$ s
where s.session# =
(select value from system.logstdby$parameters where name =
'LMNR_SID')"
SYS DBA_LOGSTDBY_SKIP 110 "select decode(error, 1, 'Y', 'N') error,
statement_opt, schema owner, name, proc
from system.logstdby$skip"
SYS DBA_LOGSTDBY_SKIP_TRANSACTION 69 "select xidusn, xidslt, xidsqn
from system.logstdby$skip_transaction"
SYS DBA_LOGSTDBY_UNSUPPORTED 4486 "select u.name owner, o.name
table_name, c.name column_name,
decode(c.type#, 1, decode(c.charsetform, 2, 'NVARCHAR2',
'VARCHAR2'),
2, decode(c.scale, null,
decode(c.precision#, null, 'NUMBER',
'FLOAT'),
'NUMBER'),
8, 'LONG',
9, decode(c.charsetform, 2, 'NCHAR VARYING',
'VARCHAR'),
12, 'DATE', 23, 'RAW', 24, 'LONG RAW',
58, ot.name,
69, 'ROWID',
96, decode(c.charsetform, 2, 'NCHAR', 'CHAR'),
105, 'MLSLABEL',
106, 'MLSLABEL',
111, ot.name,
112, decode(c.charsetform, 2, 'NCLOB', 'CLOB'),
113, 'BLOB', 114, 'BFILE', 115, 'CFILE',
121, ot.name,
122, ot.name,
123, ot.name,
178, 'TIME(' ||c.scale|| ')',
179, 'TIME(' ||c.scale|| ')' || ' WITH TIME
ZONE',
180, 'TIMESTAMP(' ||c.scale|| ')',
181, 'TIMESTAMP(' ||c.scale|| ')' || ' WITH
TIME ZONE',
231, 'TIMESTAMP(' ||c.scale|| ')' || ' WITH
LOCAL TIME ZONE',
182, 'INTERVAL YEAR(' ||c.precision#||') TO
MONTH',
183, 'INTERVAL DAY(' ||c.precision#||') TO
SECOND(' ||
c.scale || ')',
208, 'UROWID',
'UNDEFINED') data_type
from sys.col$ c, sys.obj$ o, sys.hist_head$ h, sys.user$ u,
sys.coltype$ ac, sys.obj$ ot, sys.type$ t
where o.owner# = u.user#
and o.type# = 2 /*
tables */
and bitand(o.flags, 16) != 16 /* not a secondary
object */
and u.name != 'SYS'
and not exists
(select null
from sys.tab$ t
where t.obj# = o.obj#
and
(bitand(t.property, 512) = 512 or /* IOT overflow
segment */
bitand(t.property, 4194304) = 4194304 or /* global temp
table */
bitand(t.property, 8388608) = 8388608 or /* session temp
table */
bitand(t.property, 33554432) = 33554432 or /* Read only
MV */
bitand(t.property, 67108864) = 67108864 or /* MV Table
*/
bitand(t.property, 8192) = 8192)) /* nested tab */
and not exists
(select null
from sys.mlog$ ml where ml.mowner = u.name and ml.log =
o.name)
and o.obj# = c.obj#
/* not hidden or OID */
and (bitand(c.property, 32) != 32 or bitand(c.property, 2) = 2)
and c.obj# = h.obj#(+) and c.intcol# = h.intcol#(+)
and c.obj# = ac.obj#(+) and c.intcol# = ac.intcol#(+)
and ac.toid = ot.oid$(+)
and ot.type#(+) = 13
and ot.oid$ = t.tvoid(+)
and (exists (select null from sys.tab$ t
where t.obj# = o.obj#
and (bitand(t.property, 64) = 64
or bitand(t.spare1, 131072) = 131072)) or
(c.type# = 112 and c.charsetform = 2) or
(c.type# not in (
1, /*
VARCHAR2 */
2, /*
NUMBER */
9, /*
VARCHAR */
12, /
* DATE */
96, /
* CHAR */
105, /*
MLSLABEL */
106, /*
MLSLABEL */
112, /
* CLOB */
113, /
* BLOB */
178, /
* TIME */
179, /* TIME WITH
TIME ZONE */
180, /*
TIMESTAMP */
182, /*
INTERVAL YEAR */
183) /*
INTERVAL DAY */
and (c.type# != 23 /
* RAW */
or (c.type# = 23 and bitand(c.property, 2) = 2))))"
SYS DBA_LOG_GROUPS 407 "select ou.name, oc.name, o.name,
decode(bitand(c.defer,64),64, 'ALWAYS', null)
from sys.con$ oc, sys.con$ rc, sys.user$ ou, sys.user$ ru,
sys.obj$ o, sys.cdef$ c, sys.obj$ oi, sys.user$ ui
where oc.owner# = ou.user#
and oc.con# = c.con#
and c.obj# = o.obj#
and c.type# = 12
and c.rcon# = rc.con#(+)
and c.enabled = oi.obj#(+)
and oi.owner# = ui.user#(+)
and rc.owner# = ru.user#(+)"
SYS DBA_LOG_GROUP_COLUMNS 425 "select u.name, c.name, o.name,
decode(ac.name, null, col.name, ac.name), cc.pos#
from sys.user$ u, sys.con$ c, sys.col$ col, sys.ccol$ cc, sys.cdef$
cd,
sys.obj$ o, sys.attrcol$ ac
where c.owner# = u.user#
and c.con# = cd.con#
and cd.type# = 12
and cd.con# = cc.con#
and cc.obj# = col.obj#
and cc.intcol# = col.intcol#
and cc.obj# = o.obj#
and col.obj# = ac.obj#(+)
and col.intcol# = ac.intcol#(+)"
SYS DBA_METHOD_PARAMS 1357 "select u.name, o.name, m.name, m.method#,
p.name, p.parameter#,
decode(bitand(p.properties, 768), 768, 'IN OUT',
decode(bitand(p.properties, 256), 256, 'IN',
decode(bitand(p.properties, 512), 512, 'OUT'))),
decode(bitand(p.properties, 32768), 32768, 'REF',
decode(bitand(p.properties, 16384), 16384, 'POINTER')),
decode(bitand(pt.properties, 64), 64, null, pu.name),
decode(pt.typecode,
52, decode(p.charsetform, 2, 'NVARCHAR2', po.name),
53, decode(p.charsetform, 2, 'NCHAR', po.name),
54, decode(p.charsetform, 2, 'NCHAR VARYING', po.name),
61, decode(p.charsetform, 2, 'NCLOB', po.name),
po.name),
decode(p.charsetform, 1, 'CHAR_CS',
2, 'NCHAR_CS',
3, NLS_CHARSET_NAME(p.charsetid),
4, 'ARG:'||p.charsetid)
from sys.user$ u, sys.obj$ o, sys.method$ m, sys.parameter$ p,
sys.obj$ po, sys.user$ pu, sys.type$ pt
where o.owner# = u.user#
and o.type# <> 10 -- must not be invalid
and o.oid$ = m.toid
and m.toid = p.toid
and m.version# = p.version#
and m.method# = p.method#
and p.param_toid = po.oid$
and po.owner# = pu.user#
and p.param_toid = pt.toid
and p.param_version# = pt.version#"
SYS DBA_METHOD_RESULTS 1143 "select u.name, o.name, m.name, m.method#,
decode(bitand(r.properties, 32768), 32768, 'REF',
decode(bitand(r.properties, 16384), 16384, 'POINTER')),
decode(bitand(rt.properties, 64), 64, null, ru.name),
decode(rt.typecode,
52, decode(r.charsetform, 2, 'NVARCHAR2', ro.name),
53, decode(r.charsetform, 2, 'NCHAR', ro.name),
54, decode(r.charsetform, 2, 'NCHAR VARYING', ro.name),
61, decode(r.charsetform, 2, 'NCLOB', ro.name),
ro.name),
decode(r.charsetform, 1, 'CHAR_CS',
2, 'NCHAR_CS',
3, NLS_CHARSET_NAME(r.charsetid),
4, 'ARG:'||r.charsetid)
from sys.user$ u, sys.obj$ o, sys.method$ m, sys.result$ r,
sys.obj$ ro, sys.user$ ru, sys.type$ rt
where o.owner# = u.user#
and o.type# <> 10 -- must not be invalid
and o.oid$ = m.toid
and m.toid = r.toid
and m.version# = r.version#
and m.method# = r.method#
and r.result_toid = ro.oid$
and ro.owner# = ru.user#
and r.result_toid = rt.toid
and r.result_version# = rt.version#"
SYS DBA_MVIEWS 11428 "select s.sowner, s.vname, s.tname, s.query_txt,
s.query_len,
decode(bitand(s.flag,2), 0, 'N', 'Y'), /* updatable */
s.uslog, s.mas_roll_seg, s.mlink,
decode(w.mflags,
'', '', /* missing summary */
decode(bitand(w.mflags, 4), 4, 'N', 'Y')),
/* rewrite capability
* KKQS_NOGR_PFLAGS:
* QSMG_SUM_PART_EXT_NAME + QSMG_SUM_CONNECT_BY +
* QSMG_SUM_RAW_OUTPUT + QSMG_SUM_SUBQUERY_HAVING +
* QSMG_SUM_SUBQUERY_WHERE + QSMG_SUM_SET_OPERATOR +
* QSMG_SUM_NESTED_CURSOR + QSMG_SUM_OUT_MISSING_GRPCOL +
* QSMG_SUM_AGGREGATE_NOT_TOP
*
* KKQS_NOGR_XPFLAGS:
* QSMG_SUM_WCLS
*
* QSMG_SUM_DATA_IGNORE - 2nd-class summary
*/
decode(w.pflags,
'', '', /* missing summary */
decode(bitand(w.pflags, 1073741824), /* 2nd-class
summary */
1073741824, 'NONE',
/* 2152929292 = 2147483648 + 2048 + 4096 + 65536
+ 131072 +
* 1048576 + 4194304 + 8 + 4
*/
decode(bitand(w.pflags, 2152929292),
0, decode(bitand(w.xpflags, 8192),
8192, 'TEXTMATCH',
'GENERAL'),
'TEXTMATCH'))),
decode(s.auto_fast,
'N', 'NEVER',
decode(bitand(s.flag, 32768), 0, 'DEMAND', 'COMMIT')),
decode(s.auto_fast, /* refresh method */
'C', 'COMPLETE',
'F', 'FAST',
'?', 'FORCE',
'N', 'NEVER',
NULL, 'FORCE', 'ERROR'),
decode(bitand(s.flag, 131072), /* build mode */
131072, 'PREBUILT',
decode(bitand(s.flag, 524288), 0, 'IMMEDIATE',
'DEFERRED')),
/* fast refreshable
* rowid+primary key+object id+subquery+complex+MAV+MJV
+MAV1
* 536900016 = 16+32+536870912+128+256+4096+8192+16384
*/
decode(bitand(s.flag, 536900016),
16, 'DML', /* rowid */
32, 'DML', /* primary key */
536870912, 'DML', /* object id */
160, 'DML', /* subquery - has both the primary
key */
/* bit and the subquery bit
(32+128) */
536871040, 'DML', /* subquery - has both the object id
bit */
/* and the subquery bit
(536870912+128) */
256, 'NO', /* complex */
4096, decode(bitand(s.flag2,23), /*
KKZFAGG_INSO */
0,
'DIRLOAD_DML', /*
regular MAV */
'DIRLOAD_LIMITEDDML'), /* insert
only MAV */
8192, 'DIRLOAD_DML', /* MJV */
16384, 'DIRLOAD_DML', /* MAV1 */
decode(bitand(s.flag2, 16384),
16384, 'DIRLOAD_DML', /* UNION_ALL MV */
'ERROR')),
/* fixing bug 923186 */
decode(w.mflags, /*last refresh type */
'','', /*missing summary */
decode(bitand(w.mflags,16384+32768+4194304),
0, 'NA',
16384, 'COMPLETE',
32768, 'FAST',
4194304, 'FAST_PCT',
'ERROR')),
/* end fixing bug 923186 */
/* the last refresh date should be of date type and not
varchar,
** SO BE CAREFUL WITH CHANGES IN THE FOLLOWING DECODE
*/
decode(w.lastrefreshdate, /* last refresh date */
NULL, to_date(NULL, 'DD-MON-YYYY'), /* missing summary
*/
decode(to_char(w.lastrefreshdate,'DD-MON-YYYY'),'01-
JAN-1950',
to_date(NULL, 'DD-MON-YYYY'), w.lastrefreshdate)),
/* staleness */
decode(NVL(s.mlink,'null'), /* not null implies remote */
'null', decode(bitand(s.status, 4), /* snapshot-invalid
*/
4, 'UNUSABLE',
decode(o.status,
1, decode(w.mflags,
'', '', /* missing summary
*/
decode(bitand(w.mflags,
8388608),
8388608,
'IMPORT', /* mv imported */

decode(bitand(w.mflags, 64), /* wh-unusable */
64, 'UNUSABLE',

decode(bitand(w.mflags, 32),/* unknown */
32,
'UNKNOWN',
/* known stale */
decode(bitand(w.mflags, 1),
0,
'FRESH',

'STALE'))))),
2, 'AUTHORIZATION_ERROR',
3, 'COMPILATION_ERROR',
5, 'NEEDS_COMPILE',
'ERROR')),
'UNDEFINED'), /* remote MV */
/* after fast refresh */
/* in the decode for after fast refresh, we only have to check
* whether w.mflags is null once. all of the other occurences
* fall under the first check. if the summary information is
not
* null, we need to check for the warehouse unusable condition
* before we check to see if the MV is complex. if the summary
* information is null, we still need to check whether the MV
* is complex.
*/
decode(NVL(s.mlink,'null'), /* remote */
'null', decode(s.auto_fast, /* never refresh */
'N', 'NA',
decode(bitand(s.flag, 32768), /* on commit
*/
32768, 'NA',
decode(bitand(s.status, 4), /* snap-
invalid */
4, 'NA',
decode(w.mflags, /* missing summary
*/
'', decode(bitand(s.flag, 256), /*
complex */
256, 'NA',
''),
decode(o.status,
1, decode(bitand(w.mflags,
8388608),
8388608,
'UNKNOWN', /* imported */
/* warehouse unusable */ decode(bitand(w.mflags,
64),
64, 'NA',
decode(bitand(s.flag,
256), /*complex*/
256, 'NA',
/* unknown */
decode(bitand(w.mflags,32),
32, 'UNKNOWN',
/* known stale */
decode(bitand(w.mflags, 1),
0, 'FRESH',
/* stale states (on-demand only)
* (This decode is the default clause for the known-
stale
* decode statement. It should be indented there,
but there
* isn't enough room.)
*/
decode(bitand(s.flag, 176), /* ri+pk+sq */
/* 16+32+128 */
0, decode(bitand(s.flag, 28672), /* mjv
+mav1+mav */
/*
8192+16384+4096 */
0, 'ERROR', /* no mv type */
/* mjv/mav/mav1 MV */ decode(bitand(w.mflags,
1576832),
/* 1576832 =
128+256+512+1024+2048+524288+1048576*/
/*si + su + lsi + lsu + sf + sp
+ spu */
128, 'FRESH', /* si
*/
256, 'UNKNOWN', /* su
*/
512, 'STALE', /* sf
*/
1024, 'FRESH', /* lsi
*/
2048, 'UNKNOWN', /* lsu
*/
524288, 'FRESH', /* sp
*/
1048576, 'UNKNOWN', /*
spu */
/* 128+1024 */ 1152, 'FRESH', /* si
+lsi*/
/* 256+2048 */ 2304, 'UNKNOWN', /* su
+lsu*/
'ERROR')),
/* ri or pk or sq MV */ decode(bitand(w.mflags, 1576832),
/* 1576832 =
128+256+512+1024+2048+524288+1048576 */
128, 'STALE', /* si */
256, 'STALE', /* su */
512, 'STALE', /* sf */
1024, 'FRESH', /* lsi */
2048, 'UNKNOWN', /* lsu */
524288, 'FRESH', /* sp */
1048576, 'UNKNOWN', /* spu */
/* 128+1024 */ 1152, 'STALE', /* si+lsi*/
/* 256+2048 */ 2304, 'STALE', /* su+lsu*/
'ERROR'))))))),
2, 'AUTHORIZATION_ERROR',
3, 'COMPILATION_ERROR',
5, 'NEEDS_COMPILE',
'ERROR'))))),
'UNDEFINED'), /* remote mv */
/* UNKNOWN_PREBUILT */
decode(w.pflags,
'','', /* missing summary */
decode(bitand(s.flag, 131072),
131072, 'Y', 'N')),
/* UNKNOWN_PLSQL_FUNC */
decode(w.pflags,
'','', /* missing summary */
decode(bitand(w.pflags, 268435456),
268435456, 'Y', 'N')),
/* UNKNOWN_EXTERNAL_TABLE */
decode(w.xpflags,
'','', /* missing summary */
decode(bitand(w.xpflags, 32768),
32768, 'Y', 'N')),
/* UNKNOWN_CONSIDER_FRESH */
decode(w.mflags,
'','', /* missing summary */
decode(bitand(w.mflags, 8192),
8192, 'Y', 'N')),
/* UNKNOWN_IMPORT */
decode(w.mflags,
'','', /* missing summary */
decode(bitand(w.mflags, 8388608),
8388608, 'Y', 'N')),
decode(o.status,
1, 'VALID',
2, 'AUTHORIZATION_ERROR',
3, 'COMPILATION_ERROR',
5, 'NEEDS_COMPILE', 'ERROR'),/* compile st*/
decode(bitand(s.flag2,1024), 0, 'N', 'Y') /* USE NO INDEX ? */
from sys.user$ u, sys.sum$ w, sys.obj$ o, sys.snap$ s
where w.containernam(+) = s.vname
and o.obj#(+) = w.obj#
and o.owner# = u.user#(+)
and ((u.name = s.sowner) or (u.name IS NULL))
and s.instsite = 0
and not (bitand(s.flag, 268435456) > 0 /* MV with user-defined
types */
and bitand(s.objflag, 32) > 0) /*
secondary MV */"
SYS DBA_MVIEW_AGGREGATES 567 "select u.name, o.name, sa.sumcolpos#,
c.name,
decode(sa.aggfunction, 15, 'AVG', 16, 'SUM', 17, 'COUNT',
18, 'MIN', 19, 'MAX',
97, 'VARIANCE', 98, 'STDDEV',
440, 'USER'),
decode(sa.flags, 0, 'N', 'Y'),
sa.aggtext
from sys.sumagg$ sa, sys.obj$ o, sys.user$ u, sys.sum$ s, sys.col$ c
where sa.sumobj# = o.obj#
AND o.owner# = u.user#
AND sa.sumobj# = s.obj#
AND c.obj# = s.containerobj#
AND c.col# = sa.containercol#
AND bitand(s.pflags, 1048576) = 0"
SYS DBA_MVIEW_ANALYSIS 862 "select u.name, o.name, u.name,
s.containernam,
s.lastrefreshscn, s.lastrefreshdate,
decode (s.refreshmode, 0, 'NEVER', 1, 'FORCE', 2, 'FAST',
3,'COMPLETE'),
decode(bitand(s.pflags, 25165824), 25165824, 'N', 'Y'),
s.fullrefreshtim, s.increfreshtim,
decode(bitand(s.pflags, 48), 0, 'N', 'Y'),
decode(bitand(s.mflags, 64), 0, 'N', 'Y'), /* QSMQSUM_UNUSABLE
*/
decode(bitand(s.pflags, 1294319), 0, 'Y', 'N'),
decode(bitand(s.pflags, 236879743), 0, 'Y', 'N'),
decode(bitand(s.mflags, 1), 0, 'N', 'Y'), /* QSMQSUM_KNOWNSTL
*/
decode(o.status, 5, 'Y', 'N'),
decode(bitand(s.mflags, 4), 0, 'Y', 'N'), /* QSMQSUM_DISABLED
*/
s.sumtextlen,s.sumtext,
s.metaversion/* Metadata revision number */
from sys.user$ u, sys.sum$ s, sys.obj$ o
where o.owner# = u.user#
and o.obj# = s.obj#"
SYS DBA_MVIEW_DETAIL_RELATIONS 458 "select u.name, o.name, du.name,
do.name,
decode (sd.detailobjtype, 1, 'TABLE', 2, 'VIEW',
3, 'SNAPSHOT', 4, 'CONTAINER',
'UNDEFINED'),
sd.detailalias
from sys.user$ u, sys.sumdetail$ sd, sys.obj$ o, sys.obj$ do,
sys.user$ du, sys.sum$ s
where o.owner# = u.user#
and o.obj# = sd.sumobj#
and do.obj# = sd.detailobj#
and do.owner# = du.user#
and s.obj# = sd.sumobj#
and bitand(s.pflags, 1048576) = 0"
SYS DBA_MVIEW_JOINS 637 "select u.name, o.name,
u1.name, o1.name, c1.name, '=',
decode(sj.flags, 0, 'I', 1, 'L', 2, 'R'),
u2.name, o2.name, c2.name
from sys.sumjoin$ sj, sys.obj$ o, sys.user$ u,
sys.obj$ o1, sys.user$ u1, sys.col$ c1,
sys.obj$ o2, sys.user$ u2, sys.col$ c2,
sys.sum$ s
where sj.sumobj# = o.obj#
AND o.owner# = u.user#
AND sj.tab1obj# = o1.obj#
AND o1.owner# = u1.user#
AND sj.tab1obj# = c1.obj#
AND sj.tab1col# = c1.intcol#
AND sj.tab2obj# = o2.obj#
AND o2.owner# = u2.user#
AND sj.tab2obj# = c2.obj#
AND sj.tab2col# = c2.intcol#
AND s.obj# = sj.sumobj#
AND bitand(s.pflags, 1048576) = 0"
SYS DBA_MVIEW_KEYS 656 "select u1.name, o1.name, sk.sumcolpos#,
c1.name,
u2.name, o2.name, sd.detailalias,
decode(sk.detailobjtype, 1, 'TABLE', 2, 'VIEW'), c2.name
from sys.sumkey$ sk, sys.obj$ o1, sys.user$ u1, sys.col$ c1, sys.sum$
s,
sys.sumdetail$ sd, sys.obj$ o2, sys.user$ u2, sys.col$ c2
where sk.sumobj# = o1.obj#
AND o1.owner# = u1.user#
AND sk.sumobj# = s.obj#
AND s.containerobj# = c1.obj#
AND c1.col# = sk.containercol#
AND sk.detailobj# = o2.obj#
AND o2.owner# = u2.user#
AND sk.sumobj# = sd.sumobj#
AND sk.detailobj# = sd.detailobj#
AND sk.detailobj# = c2.obj#
AND sk.detailcol# = c2.intcol#
AND bitand(s.pflags, 1048576) = 0"
SYS DBA_MVIEW_LOGS 859 "select m.mowner, m.master, m.log, m.trig,
decode(bitand(m.flag,1), 0, 'NO', 'YES'),
decode(bitand(m.flag,2), 0, 'NO', 'YES'),
decode(bitand(m.flag,512), 0, 'NO', 'YES'),
decode(bitand(m.flag,4), 0, 'NO', 'YES'),
decode(bitand(m.flag,1024), 0, 'NO', 'YES'),
decode(bitand(m.flag,16), 0, 'NO', 'YES')
from sys.mlog$ m
union
select ct.source_schema_name, ct.source_table_name,
ct.change_table_name,
ct.mvl_v7trigger,
decode(bitand(ct.mvl_flag,1), 0, 'NO', 'YES'),
decode(bitand(ct.mvl_flag,2), 0, 'NO', 'YES'),
decode(bitand(ct.mvl_flag,512), 0, 'NO', 'YES'),
decode(bitand(ct.mvl_flag,4), 0, 'NO', 'YES'),
decode(bitand(ct.mvl_flag,1024), 0, 'NO', 'YES'),
decode(bitand(ct.mvl_flag,16), 0, 'NO', 'YES')
from sys.cdc_change_tables$ ct
where bitand(ct.mvl_flag, 128) = 128"
SYS DBA_MVIEW_LOG_FILTER_COLS 468 "select mowner, master, colname from
sys.mlog_refcol$
union
select ct.source_schema_name, ct.source_table_name, cc.column_name
from sys.cdc_change_tables$ ct, sys.cdc_change_columns$ cc
where cc.change_table_obj# = ct.obj#
and bitand(ct.mvl_flag, 128) = 128
and cc.column_name not in
('RSID$','XIDUSN$','XIDSLT$','XIDSEQ$','OPERATION$',
'CSCN$','COMMIT_TIMESTAMP$','SOURCE_COLMAP$','TARGET_COLMAP$',
'USERNAME$', 'TIMESTAMP$', 'ROW_ID$','SYS_NC_OID$')"
SYS DBA_MVIEW_REFRESH_TIMES 92 "select sowner, vname, mowner, master,
snaptime
from sys.snap_reftime$ t
where t.instsite = 0"
SYS DBA_NESTED_TABLES 2282 "select u.name, o.name,
nvl2(ct.synobj#, (select u.name from user$ u, obj$ o
where o.owner#=u.user# and o.obj#=ct.synobj#), ut.name),
nvl2(ct.synobj#, (select o.name from obj$ o
where o.obj#=ct.synobj#), ot.name),
op.name, ac.name,
lpad(decode(bitand(ct.flags, 64), 64, 'USER_SPECIFIED',
'DEFAULT'), 30),
lpad(decode(bitand(ct.flags, 32), 32, 'LOCATOR', 'VALUE'), 20),
lpad((case when bitand(ct.flags, 5120)=0 and
bitand(t.properties, 8)= 8
then 'Y' else 'N' end), 25)
from sys.ntab$ n, sys.obj$ o, sys.obj$ op, sys.obj$ ot,
sys.col$ c, sys.coltype$ ct, sys.user$ u, sys.user$ ut, sys.attrcol$
ac,
sys.type$ t, sys.collection$ cl
where o.owner# = u.user#
and op.owner# = u.user#
and n.obj# = op.obj#
and n.ntab# = o.obj#
and c.obj# = op.obj#
and n.intcol# = c.intcol#
and c.obj# = ac.obj#
and c.intcol# = ac.intcol#
and op.obj# = ct.obj#
and ct.toid = ot.oid$
and ct.intcol#=n.intcol#
and ot.owner# = ut.user#
and ct.toid=cl.toid
and cl.elem_toid=t.tvoid
and bitand(ct.flags,4)=4
and bitand(c.property,32768) != 32768 /* not unused column
*/
union all
select u.name, o.name,
nvl2(ct.synobj#, (select u.name from user$ u, obj$ o
where o.owner#=u.user# and o.obj#=ct.synobj#), ut.name),
nvl2(ct.synobj#, (select o.name from obj$ o
where o.obj#=ct.synobj#), ot.name),
op.name, c.name,
lpad(decode(bitand(ct.flags, 64), 64, 'USER_SPECIFIED',
'DEFAULT'), 30),
lpad(decode(bitand(ct.flags, 32), 32, 'LOCATOR', 'VALUE'), 20),
lpad((case when bitand(ct.flags, 5120)=0 and
bitand(t.properties, 8)= 8
then 'Y' else 'N' end), 25)
from sys.ntab$ n, sys.obj$ o, sys.obj$ op, sys.obj$ ot, sys.col$ c,
sys.coltype$ ct, sys.user$ u, sys.user$ ut, sys.type$ t,
sys.collection$ cl
where o.owner# = u.user#
and op.owner# = u.user#
and n.obj# = op.obj#
and n.ntab# = o.obj#
and c.obj# = op.obj#
and n.intcol# = c.intcol#
and bitand(c.property,1)=0
and op.obj# = ct.obj#
and ct.toid = ot.oid$
and ct.intcol#=n.intcol#
and ot.owner# = ut.user#
and ct.toid=cl.toid
and cl.elem_toid=t.tvoid
and bitand(ct.flags,4)=4
and bitand(c.property,32768) != 32768 /* not unused column
*/"
SYS DBA_OBJECTS 2234 "select u.name, o.name, o.subname, o.obj#,
o.dataobj#,
decode(o.type#, 0, 'NEXT OBJECT', 1, 'INDEX', 2, 'TABLE', 3,
'CLUSTER',
4, 'VIEW', 5, 'SYNONYM', 6, 'SEQUENCE',
7, 'PROCEDURE', 8, 'FUNCTION', 9, 'PACKAGE',
11, 'PACKAGE BODY', 12, 'TRIGGER',
13, 'TYPE', 14, 'TYPE BODY',
19, 'TABLE PARTITION', 20, 'INDEX PARTITION',
21, 'LOB',
22, 'LIBRARY', 23, 'DIRECTORY', 24, 'QUEUE',
28, 'JAVA SOURCE', 29, 'JAVA CLASS', 30, 'JAVA
RESOURCE',
32, 'INDEXTYPE', 33, 'OPERATOR',
34, 'TABLE SUBPARTITION', 35, 'INDEX
SUBPARTITION',
40, 'LOB PARTITION', 41, 'LOB SUBPARTITION',
42, 'MATERIALIZED VIEW',
43, 'DIMENSION',
44, 'CONTEXT', 46, 'RULE SET', 47, 'RESOURCE
PLAN',
48, 'CONSUMER GROUP',
51, 'SUBSCRIPTION', 52, 'LOCATION',
55, 'XML SCHEMA', 56, 'JAVA DATA',
57, 'SECURITY PROFILE', 59, 'RULE',
62, 'EVALUATION CONTEXT',
'UNDEFINED'),
o.ctime, o.mtime,
to_char(o.stime, 'YYYY-MM-DD:HH24:MI:SS'),
decode(o.status, 0, 'N/A', 1, 'VALID', 'INVALID'),
decode(bitand(o.flags, 2), 0, 'N', 2, 'Y', 'N'),
decode(bitand(o.flags, 4), 0, 'N', 4, 'Y', 'N'),
decode(bitand(o.flags, 16), 0, 'N', 16, 'Y', 'N')
from sys.obj$ o, sys.user$ u
where o.owner# = u.user#
and o.linkname is null
and (o.type# not in (1 /* INDEX - handled below */,
10 /* NON-EXISTENT */)
or
(o.type# = 1 and 1 = (select 1
from sys.ind$ i
where i.obj# = o.obj#
and i.type# in (1, 2, 3, 4, 6, 7, 9))))
and o.name != '_NEXT_OBJECT'
and o.name != '_default_auditing_options_'
union all
select u.name, l.name, NULL, to_number(null), to_number(null),
'DATABASE LINK',
l.ctime, to_date(null), NULL, 'VALID','N','N', 'N'
from sys.link$ l, sys.user$ u
where l.owner# = u.user#"
SYS DBA_OBJECT_SIZE 769 "select u.name, o.name,
decode(o.type#, 2, 'TABLE', 4, 'VIEW', 5, 'SYNONYM', 6, 'SEQUENCE',
7, 'PROCEDURE', 8, 'FUNCTION', 9, 'PACKAGE', 11, 'PACKAGE BODY',
12, 'TRIGGER', 13, 'TYPE', 14, 'TYPE BODY',
28, 'JAVA SOURCE', 29, 'JAVA CLASS', 30, 'JAVA RESOURCE', 56,
'JAVA DATA',
'UNDEFINED'),
nvl(s.bytes,0), nvl(p.bytes,0), nvl(c.bytes,0), nvl(e.bytes,0)
from sys.obj$ o, sys.user$ u,
sys.source_size s, sys.parsed_size p, sys.code_size c,
sys.error_size e
where o.type# in (2, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 28, 29, 30,
56)
and o.owner# = u.user#
and o.obj# = s.obj# (+)
and o.obj# = p.obj# (+)
and o.obj# = c.obj# (+)
and o.obj# = e.obj# (+)
and nvl(s.bytes,0) + nvl(p.bytes,0) + nvl(c.bytes,0) + nvl(e.bytes,
0) > 0"
SYS DBA_OBJECT_TABLES 3906 "select u.name, o.name,
decode(bitand(t.property, 4194400), 0, ts.name, null),
decode(bitand(t.property, 1024), 0, null, co.name),
decode((bitand(t.property, 512)+bitand(t.flags, 536870912)),
0, null, co.name),
decode(bitand(t.property, 32+64), 0, mod(t.pctfree$, 100), 64,
0, null),
decode(bitand(ts.flags, 32), 32, to_number(NULL),
decode(bitand(t.property, 32+64), 0, t.pctused$, 64, 0,
null)),
decode(bitand(t.property, 32), 0, t.initrans, null),
decode(bitand(t.property, 32), 0, t.maxtrans, null),
s.iniexts * ts.blocksize,
decode(bitand(ts.flags, 3), 1, to_number(NULL),
s.extsize * ts.blocksize),
s.minexts, s.maxexts,
decode(bitand(ts.flags, 3), 1, to_number(NULL),
s.extpct),
decode(bitand(ts.flags, 32), 32, to_number(NULL),
decode(bitand(o.flags, 2), 2, 1, decode(s.lists, 0, 1,
s.lists))),
decode(bitand(ts.flags, 32), 32, to_number(NULL),
decode(bitand(o.flags, 2), 2, 1, decode(s.groups, 0, 1,
s.groups))),
decode(bitand(t.property, 32), 32, null,
decode(bitand(t.flags, 32), 0, 'YES', 'NO')),
decode(bitand(t.flags,1), 0, 'Y', 1, 'N', '?'),
t.rowcnt,
decode(bitand(t.property, 64), 0, t.blkcnt, null),
decode(bitand(t.property, 64), 0, t.empcnt, null),
t.avgspc, t.chncnt, t.avgrln, t.avgspc_flb,
decode(bitand(t.property, 64), 0, t.flbcnt, null),
lpad(decode(t.degree, 32767, 'DEFAULT', nvl(t.degree,1)),10),
lpad(decode(t.instances, 32767, 'DEFAULT', nvl(t.instances,1)),
10),
lpad(decode(bitand(t.flags, 8), 8, 'Y', 'N'),5),
decode(bitand(t.flags, 6), 0, 'ENABLED', 'DISABLED'),
t.samplesize, t.analyzetime,
decode(bitand(t.property, 32), 32, 'YES', 'NO'),
decode(bitand(t.property, 64), 64, 'IOT',
decode(bitand(t.property, 512), 512, 'IOT_OVERFLOW',
decode(bitand(t.flags, 536870912), 536870912,
'IOT_MAPPING', null))),
decode(bitand(t.property, 4096), 4096, 'USER-DEFINED',
'SYSTEM GENERATED'),
nvl2(ac.synobj#, su.name, tu.name),
nvl2(ac.synobj#, so.name, ty.name),
decode(bitand(o.flags, 2), 0, 'N', 2, 'Y', 'N'),
decode(bitand(o.flags, 16), 0, 'N', 16, 'Y', 'N'),
decode(bitand(t.property, 8192), 8192, 'YES', 'NO'),
decode(bitand(o.flags, 2), 2, 'DEFAULT',
decode(s.cachehint, 0, 'DEFAULT', 1, 'KEEP', 2,
'RECYCLE', NULL)),
decode(bitand(t.flags, 131072), 131072, 'ENABLED', 'DISABLED'),
decode(bitand(t.flags, 512), 0, 'NO', 'YES'),
decode(bitand(t.flags, 256), 0, 'NO', 'YES'),
decode(bitand(o.flags, 2), 0, NULL,
decode(bitand(t.property, 8388608), 8388608,
'SYS$SESSION', 'SYS$TRANSACTION')),
decode(bitand(t.flags, 1024), 1024, 'ENABLED', 'DISABLED'),
decode(bitand(t.flags, 2097152), 2097152, 'YES', 'NO'),
decode(bitand(t.property, 1024), 0, null, cu.name),
decode(bitand(t.flags, 8388608), 8388608, 'ENABLED',
'DISABLED')
from sys.user$ u, sys.ts$ ts, sys.seg$ s, sys.obj$ co, sys.tab$ t,
sys.obj$ o,
sys.coltype$ ac, sys.obj$ ty, sys.user$ tu, sys.col$ tc,
sys.obj$ cx, sys.user$ cu, sys.obj$ so, sys.user$ su
where o.owner# = u.user#
and o.obj# = t.obj#
and bitand(t.property, 1) = 1
and t.obj# = tc.obj#
and tc.name = 'SYS_NC_ROWINFO$'
and tc.obj# = ac.obj#
and tc.intcol# = ac.intcol#
and ac.toid = ty.oid$
and ty.owner# = tu.user#
and ty.type# <> 10
and t.bobj# = co.obj# (+)
and t.ts# = ts.ts#
and t.file# = s.file# (+)
and t.block# = s.block# (+)
and t.ts# = s.ts# (+)
and t.dataobj# = cx.obj# (+)
and cx.owner# = cu.user# (+)
and ac.synobj# = so.obj# (+)
and so.owner# = su.user# (+)"
SYS DBA_OBJ_AUDIT_OPTS 8465 "select u.name, o.name, 'TABLE',
substr(t.audit$, 1, 1) || '/' || substr(t.audit$, 2, 1),
substr(t.audit$, 3, 1) || '/' || substr(t.audit$, 4, 1),
substr(t.audit$, 5, 1) || '/' || substr(t.audit$, 6, 1),
substr(t.audit$, 7, 1) || '/' || substr(t.audit$, 8, 1),
substr(t.audit$, 9, 1) || '/' || substr(t.audit$, 10, 1),
substr(t.audit$, 11, 1) || '/' || substr(t.audit$, 12, 1),
substr(t.audit$, 13, 1) || '/' || substr(t.audit$, 14, 1),
substr(t.audit$, 15, 1) || '/' || substr(t.audit$, 16, 1),
substr(t.audit$, 17, 1) || '/' || substr(t.audit$, 18, 1),
substr(t.audit$, 19, 1) || '/' || substr(t.audit$, 20, 1),
substr(t.audit$, 21, 1) || '/' || substr(t.audit$, 22, 1),
substr(t.audit$, 23, 1) || '/' || substr(t.audit$, 24, 1),
substr(t.audit$, 25, 1) || '/' || substr(t.audit$, 26, 1),
substr(t.audit$, 27, 1) || '/' || substr(t.audit$, 28, 1),
substr(t.audit$, 29, 1) || '/' || substr(t.audit$, 30, 1),
substr(t.audit$, 31, 1) || '/' || substr(t.audit$, 32, 1)
from sys.obj$ o, sys.user$ u, sys.tab$ t
where o.type# = 2
and not (o.owner# = 0 and o.name = '_default_auditing_options_')
and o.owner# = u.user#
and o.obj# = t.obj#
union all
select u.name, o.name, 'VIEW',
substr(v.audit$, 1, 1) || '/' || substr(v.audit$, 2, 1),
substr(v.audit$, 3, 1) || '/' || substr(v.audit$, 4, 1),
substr(v.audit$, 5, 1) || '/' || substr(v.audit$, 6, 1),
substr(v.audit$, 7, 1) || '/' || substr(v.audit$, 8, 1),
substr(v.audit$, 9, 1) || '/' || substr(v.audit$, 10, 1),
substr(v.audit$, 11, 1) || '/' || substr(v.audit$, 12, 1),
substr(v.audit$, 13, 1) || '/' || substr(v.audit$, 14, 1),
substr(v.audit$, 15, 1) || '/' || substr(v.audit$, 16, 1),
substr(v.audit$, 17, 1) || '/' || substr(v.audit$, 18, 1),
substr(v.audit$, 19, 1) || '/' || substr(v.audit$, 20, 1),
substr(v.audit$, 21, 1) || '/' || substr(v.audit$, 22, 1),
substr(v.audit$, 23, 1) || '/' || substr(v.audit$, 24, 1),
substr(v.audit$, 25, 1) || '/' || substr(v.audit$, 26, 1),
substr(v.audit$, 27, 1) || '/' || substr(v.audit$, 28, 1),
substr(v.audit$, 29, 1) || '/' || substr(v.audit$, 30, 1),
substr(v.audit$, 31, 1) || '/' || substr(v.audit$, 32, 1)
from sys.obj$ o, sys.user$ u, sys.view$ v
where o.type# = 4
and o.owner# = u.user#
and o.obj# = v.obj#
union all
select u.name, o.name, 'SEQUENCE',
substr(s.audit$, 1, 1) || '/' || substr(s.audit$, 2, 1),
substr(s.audit$, 3, 1) || '/' || substr(s.audit$, 4, 1),
substr(s.audit$, 5, 1) || '/' || substr(s.audit$, 6, 1),
substr(s.audit$, 7, 1) || '/' || substr(s.audit$, 8, 1),
substr(s.audit$, 9, 1) || '/' || substr(s.audit$, 10, 1),
substr(s.audit$, 11, 1) || '/' || substr(s.audit$, 12, 1),
substr(s.audit$, 13, 1) || '/' || substr(s.audit$, 14, 1),
substr(s.audit$, 15, 1) || '/' || substr(s.audit$, 16, 1),
substr(s.audit$, 17, 1) || '/' || substr(s.audit$, 18, 1),
substr(s.audit$, 19, 1) || '/' || substr(s.audit$, 20, 1),
substr(s.audit$, 21, 1) || '/' || substr(s.audit$, 22, 1),
substr(s.audit$, 23, 1) || '/' || substr(s.audit$, 24, 1),
substr(s.audit$, 25, 1) || '/' || substr(s.audit$, 26, 1),
substr(s.audit$, 27, 1) || '/' || substr(s.audit$, 28, 1),
substr(s.audit$, 29, 1) || '/' || substr(s.audit$, 30, 1),
substr(s.audit$, 31, 1) || '/' || substr(s.audit$, 32, 1)
from sys.obj$ o, sys.user$ u, sys.seq$ s
where o.type# = 6
and o.owner# = u.user#
and o.obj# = s.obj#
union all
select u.name, o.name, 'PROCEDURE',
substr(p.audit$, 1, 1) || '/' || substr(p.audit$, 2, 1),
substr(p.audit$, 3, 1) || '/' || substr(p.audit$, 4, 1),
substr(p.audit$, 5, 1) || '/' || substr(p.audit$, 6, 1),
substr(p.audit$, 7, 1) || '/' || substr(p.audit$, 8, 1),
substr(p.audit$, 9, 1) || '/' || substr(p.audit$, 10, 1),
substr(p.audit$, 11, 1) || '/' || substr(p.audit$, 12, 1),
substr(p.audit$, 13, 1) || '/' || substr(p.audit$, 14, 1),
substr(p.audit$, 15, 1) || '/' || substr(p.audit$, 16, 1),
substr(p.audit$, 17, 1) || '/' || substr(p.audit$, 18, 1),
substr(p.audit$, 19, 1) || '/' || substr(p.audit$, 20, 1),
substr(p.audit$, 21, 1) || '/' || substr(p.audit$, 22, 1),
substr(p.audit$, 23, 1) || '/' || substr(p.audit$, 24, 1),
substr(p.audit$, 25, 1) || '/' || substr(p.audit$, 26, 1),
substr(p.audit$, 27, 1) || '/' || substr(p.audit$, 28, 1),
substr(p.audit$, 29, 1) || '/' || substr(p.audit$, 30, 1),
substr(p.audit$, 31, 1) || '/' || substr(p.audit$, 32, 1)
from sys.obj$ o, sys.user$ u, sys.library$ p
where o.type# = 22
and o.owner# = u.user#
and o.obj# = p.obj#
union all
select u.name, o.name, 'PROCEDURE',
substr(p.audit$, 1, 1) || '/' || substr(p.audit$, 2, 1),
substr(p.audit$, 3, 1) || '/' || substr(p.audit$, 4, 1),
substr(p.audit$, 5, 1) || '/' || substr(p.audit$, 6, 1),
substr(p.audit$, 7, 1) || '/' || substr(p.audit$, 8, 1),
substr(p.audit$, 9, 1) || '/' || substr(p.audit$, 10, 1),
substr(p.audit$, 11, 1) || '/' || substr(p.audit$, 12, 1),
substr(p.audit$, 13, 1) || '/' || substr(p.audit$, 14, 1),
substr(p.audit$, 15, 1) || '/' || substr(p.audit$, 16, 1),
substr(p.audit$, 17, 1) || '/' || substr(p.audit$, 18, 1),
substr(p.audit$, 19, 1) || '/' || substr(p.audit$, 20, 1),
substr(p.audit$, 21, 1) || '/' || substr(p.audit$, 22, 1),
substr(p.audit$, 23, 1) || '/' || substr(p.audit$, 24, 1),
substr(p.audit$, 25, 1) || '/' || substr(p.audit$, 26, 1),
substr(p.audit$, 27, 1) || '/' || substr(p.audit$, 28, 1),
substr(p.audit$, 29, 1) || '/' || substr(p.audit$, 30, 1),
substr(p.audit$, 31, 1) || '/' || substr(p.audit$, 32, 1)
from sys.obj$ o, sys.user$ u, sys.procedure$ p
where o.type# >= 7 and o.type# <= 9
and o.owner# = u.user#
and o.obj# = p.obj#
union all
select u.name, o.name, 'TYPE',
substr(t.audit$, 1, 1) || '/' || substr(t.audit$, 2, 1),
substr(t.audit$, 3, 1) || '/' || substr(t.audit$, 4, 1),
substr(t.audit$, 5, 1) || '/' || substr(t.audit$, 6, 1),
substr(t.audit$, 7, 1) || '/' || substr(t.audit$, 8, 1),
substr(t.audit$, 9, 1) || '/' || substr(t.audit$, 10, 1),
substr(t.audit$, 11, 1) || '/' || substr(t.audit$, 12, 1),
substr(t.audit$, 13, 1) || '/' || substr(t.audit$, 14, 1),
substr(t.audit$, 15, 1) || '/' || substr(t.audit$, 16, 1),
substr(t.audit$, 17, 1) || '/' || substr(t.audit$, 18, 1),
substr(t.audit$, 19, 1) || '/' || substr(t.audit$, 20, 1),
substr(t.audit$, 21, 1) || '/' || substr(t.audit$, 22, 1),
substr(t.audit$, 23, 1) || '/' || substr(t.audit$, 24, 1),
substr(t.audit$, 25, 1) || '/' || substr(t.audit$, 26, 1),
substr(t.audit$, 27, 1) || '/' || substr(t.audit$, 28, 1),
substr(t.audit$, 29, 1) || '/' || substr(t.audit$, 30, 1),
substr(t.audit$, 31, 1) || '/' || substr(t.audit$, 32, 1)
from sys.obj$ o, sys.user$ u, sys.type_misc$ t
where o.type# = 13
and o.owner# = u.user#
and o.obj# = t.obj#
union all
select u.name, o.name, 'DIRECTORY',
substr(t.audit$, 1, 1) || '/' || substr(t.audit$, 2, 1),
substr(t.audit$, 3, 1) || '/' || substr(t.audit$, 4, 1),
substr(t.audit$, 5, 1) || '/' || substr(t.audit$, 6, 1),
substr(t.audit$, 7, 1) || '/' || substr(t.audit$, 8, 1),
substr(t.audit$, 9, 1) || '/' || substr(t.audit$, 10, 1),
substr(t.audit$, 11, 1) || '/' || substr(t.audit$, 12, 1),
substr(t.audit$, 13, 1) || '/' || substr(t.audit$, 14, 1),
substr(t.audit$, 15, 1) || '/' || substr(t.audit$, 16, 1),
substr(t.audit$, 17, 1) || '/' || substr(t.audit$, 18, 1),
substr(t.audit$, 19, 1) || '/' || substr(t.audit$, 20, 1),
substr(t.audit$, 21, 1) || '/' || substr(t.audit$, 22, 1),
substr(t.audit$, 23, 1) || '/' || substr(t.audit$, 24, 1),
substr(t.audit$, 25, 1) || '/' || substr(t.audit$, 26, 1),
substr(t.audit$, 27, 1) || '/' || substr(t.audit$, 28, 1),
substr(t.audit$, 29, 1) || '/' || substr(t.audit$, 30, 1),
substr(t.audit$, 31, 1) || '/' || substr(t.audit$, 32, 1)
from sys.obj$ o, sys.user$ u, sys.dir$ t
where o.type# = 23
and o.owner# = u.user#
and o.obj# = t.obj#"
SYS DBA_OBJ_COLATTRS 1076 "select u.name, o.name, c.name,
lpad(decode(bitand(ct.flags, 512), 512, 'Y', 'N'), 15)
from sys.coltype$ ct, sys.obj$ o, sys.col$ c, sys.user$ u
where o.owner# = u.user#
and bitand(ct.flags, 2) = 2 /* ADT
column */
and o.obj#=ct.obj#
and o.obj#=c.obj#
and c.intcol#=ct.intcol#
and bitand(c.property,32768) != 32768 /* not unused
column */
and not exists (select null /* Doesn't exist in
attrcol$ */
from sys.attrcol$ ac
where ac.intcol#=ct.intcol#
and ac.obj#=ct.obj#)
union all
select u.name, o.name, ac.name,
lpad(decode(bitand(ct.flags, 512), 512, 'Y', 'N'), 15)
from sys.coltype$ ct, sys.obj$ o, sys.attrcol$ ac, sys.user$ u, col$ c
where o.owner# = u.user#
and bitand(ct.flags, 2) = 2 /* ADT
column */
and o.obj#=ct.obj#
and o.obj#=c.obj#
and o.obj#=ac.obj#
and c.intcol#=ct.intcol#
and c.intcol#=ac.intcol#
and bitand(c.property,32768) != 32768 /* not unused
column */"
SYS DBA_OPANCILLARY 292 "select distinct u.name, o.name, a.bind#,
u1.name, o1.name, a1.primbind#
from sys.user$ u, sys.obj$ o, sys.opancillary$ a, sys.user$ u1,
sys.obj$ o1,
sys.opancillary$ a1
where a.obj#=o.obj# and o.owner#=u.user# AND
a1.primop#=o1.obj# and o1.owner#=u1.user# and a.obj#=a1.obj#"
SYS DBA_OPARGUMENTS 144 "select c.name, b.name, a.bind#, a.position,
a.type
from sys.oparg$ a, sys.obj$ b, sys.user$ c
where a.obj# = b.obj# and b.owner# = c.user#"
SYS DBA_OPBINDINGS 360 "select c.name, b.name, a.bind#,
a.functionname, a.returnschema,
a.returntype, a.impschema, a.imptype,
decode(bitand(a.property,15), 1, 'WITH INDEX CONTEXT', 3 ,
'COMPUTE ANCILLARY DATA', 4 ,
'ANCILLARY TO')
from sys.opbinding$ a, sys.obj$ b, sys.user$ c
where a.obj# = b.obj# and b.owner# = c.user#"
SYS DBA_OPERATORS 127 "select c.name, b.name, a.numbind from
sys.operator$ a, sys.obj$ b, sys.user$ c where
a.obj# = b.obj# and b.owner# = c.user#"
SYS DBA_OPERATOR_COMMENTS 162 "select u.name, o.name, c.comment$
from sys.obj$ o, sys.operator$ op, sys.com$ c, sys.user$ u
where o.obj# = op.obj# and c.obj# = op.obj# and u.user# = o.owner#"
SYS DBA_OUTLINES 145 "select ol_name, creator, category,
decode(flags, 0, 'UNUSED', 1, 'USED', 'UNDEFINED'),
timestamp, version, sql_text, signature
from outln.ol$"
SYS DBA_OUTLINE_HINTS 135 "select o.ol_name, o.creator, h.node#,
h.stage#, h.table_pos, h.hint_text
from outln.ol$ o, outln.ol$hints h
where o.ol_name = h.ol_name"
SYS DBA_PARTIAL_DROP_TABS 183 "select u.name, o.name
from sys.user$ u, sys.obj$ o, sys.tab$ t
where t.obj# = o.obj#
and bitand(t.flags,32768) = 32768
and u.user# = o.owner#
group by u.name, o.name"
SYS DBA_PART_COL_STATISTICS 498 "select u.name, o.name, o.subname,
tp.cname, h.distcnt, h.lowval, h.hival,
h.density, h.null_cnt, decode(h.row_cnt, 0, 1, 1, 1,
h.row_cnt-1),
h.sample_size, h.timestamp#,
decode(bitand(h.spare2, 2), 2, 'YES', 'NO'),
decode(bitand(h.spare2, 1), 1, 'YES', 'NO'),
h.avgcln
from sys.obj$ o, sys.hist_head$ h, tp$ tp, user$ u
where o.obj# = tp.obj# and o.owner# = u.user#
and tp.obj# = h.obj#(+) and tp.intcol# = h.intcol#(+)
and o.type# = 19 /* TABLE PARTITION */"
SYS DBA_PART_HISTOGRAMS 944 "select u.name,
o.name, o.subname,
tp.cname,
h.bucket,
h.endpoint,
h.epvalue
from sys.obj$ o, sys.histgrm$ h, sys.user$ u, tp$ tp
where o.obj# = tp.obj# and tp.obj# = h.obj#
and tp.intcol# = h.intcol#
and o.type# = 19 /* TABLE PARTITION */
and o.owner# = u.user#
union
select u.name,
o.name, o.subname,
tp.cname,
0,
h.minimum,
null
from sys.obj$ o, sys.hist_head$ h, sys.user$ u, tp$ tp
where o.obj# = tp.obj# and tp.obj# = h.obj#
and tp.intcol# = h.intcol#
and o.type# = 19 /* TABLE PARTITION */
and h.bucket_cnt = 1
and o.owner# = u.user#
union
select u.name,
o.name, o.subname,
tp.cname,
1,
h.maximum,
null
from sys.obj$ o, sys.hist_head$ h, sys.user$ u, tp$ tp
where o.obj# = tp.obj# and tp.obj# = h.obj#
and tp.intcol# = h.intcol#
and o.type# = 19 /* TABLE PARTITION */
and h.bucket_cnt = 1
and o.owner# = u.user#"
SYS DBA_PART_INDEXES 1312 "select u.name, io.name, o.name,
decode(po.parttype, 1, 'RANGE', 2, 'HASH', 3, 'SYSTEM', 4,
'LIST',
'UNKNOWN'),
decode(mod(po.spare2, 256), 0, 'NONE', 2, 'HASH', 3, 'SYSTEM',
4, 'LIST', 'UNKNOWN'),
po.partcnt, mod(trunc(po.spare2/65536), 65536), po.partkeycols,
mod(trunc(po.spare2/256), 256), decode(bitand(po.flags, 1), 1,
'LOCAL', 'GLOBAL'),
decode(po.partkeycols, 0, 'NONE', decode(bitand(po.flags,2), 2,
'PREFIXED', 'NON_PREFIXED')),
ts.name, po.defpctfree, po.definitrans,
po.defmaxtrans,
decode(po.deftiniexts, NULL, 'DEFAULT', po.deftiniexts),
decode(po.defextsize, NULL, 'DEFAULT', po.defextsize),
decode(po.defminexts, NULL, 'DEFAULT', po.defminexts),
decode(po.defmaxexts, NULL, 'DEFAULT', po.defmaxexts),
decode(po.defextpct, NULL, 'DEFAULT', po.defextpct),
po.deflists, po.defgroups,
decode(po.deflogging, 0, 'NONE', 1, 'YES', 2, 'NO', 'UNKNOWN'),
decode(po.spare1, 0, 'DEFAULT', 1, 'KEEP', 2, 'RECYCLE', NULL),
po.parameters
from sys.obj$ io, sys.obj$ o, sys.partobj$ po, sys.ts$ ts, sys.ind$
i,
sys.user$ u
where io.obj# = po.obj# and po.defts# = ts.ts# (+) and
i.obj# = io.obj# and o.obj# = i.bo# and u.user# = io.owner#"
SYS DBA_PART_KEY_COLUMNS 641 "select u.name, o.name, 'TABLE',
decode(bitand(c.property, 1), 1, a.name, c.name), pc.pos#
from partcol$ pc, obj$ o, col$ c, user$ u, attrcol$ a
where pc.obj# = o.obj# and pc.obj# = c.obj# and c.intcol# = pc.intcol#
and
u.user# = o.owner# and c.obj# = a.obj#(+) and c.intcol# =
a.intcol#(+)
union
select u.name, io.name, 'INDEX',
decode(bitand(c.property, 1), 1, a.name, c.name), pc.pos#
from partcol$ pc, obj$ io, col$ c, user$ u, ind$ i, attrcol$ a
where pc.obj# = i.obj# and i.obj# = io.obj# and i.bo# = c.obj# and
c.intcol# = pc.intcol# and u.user# = io.owner#
and c.obj# = a.obj#(+) and c.intcol# = a.intcol#(+)"
SYS DBA_PART_LOBS 1490 "select u.name,
o.name,
decode(bitand(c.property, 1), 1, a.name, c.name),
lo.name,
io.name,
plob.defchunk,
plob.defpctver$,
decode(bitand(plob.defflags, 27), 1, 'NO', 2, 'NO', 8,
'CACHEREADS',
16, 'CACHEREADS', 'YES'),
decode(plob.defpro, 0, 'NO', 'YES'),
ts.name,
decode(plob.definiexts, NULL, 'DEFAULT', plob.definiexts),
decode(plob.defextsize, NULL, 'DEFAULT', plob.defextsize),
decode(plob.defminexts, NULL, 'DEFAULT', plob.defminexts),
decode(plob.defmaxexts, NULL, 'DEFAULT', plob.defmaxexts),
decode(plob.defextpct, NULL, 'DEFAULT', plob.defextpct),
decode(plob.deflists, NULL, 'DEFAULT', plob.deflists),
decode(plob.defgroups, NULL, 'DEFAULT', plob.defgroups),
decode(bitand(plob.defflags,22), 0,'NONE', 4,'YES', 2,'NO',
16,'NO', 'UNKNOWN'),
decode(plob.defbufpool, 0, 'DEFAULT', 1, 'KEEP', 2, 'RECYCLE',
NULL)
from sys.obj$ o, sys.col$ c, sys.lob$ l, sys.partlob$ plob,
sys.obj$ lo, sys.obj$ io, sys.ts$ ts, sys.user$ u, attrcol$ a
where o.owner# = u.user#
and o.obj# = c.obj#
and c.obj# = l.obj#
and c.intcol# = l.intcol#
and l.lobj# = lo.obj#
and l.ind# = io.obj#
and l.lobj# = plob.lobj#
and plob.defts# = ts.ts# (+)
and bitand(c.property,32768) != 32768 /* not unused column
*/
and c.obj# = a.obj#(+) and c.intcol# = a.intcol#(+)"
SYS DBA_PART_TABLES 2647 "select u.name, o.name,
decode(po.parttype, 1, 'RANGE', 2, 'HASH', 3, 'SYSTEM', 4,
'LIST',
'UNKNOWN'),
decode(mod(po.spare2, 256), 0, 'NONE', 2, 'HASH', 3, 'SYSTEM',
4, 'LIST', 'UNKNOWN'),
po.partcnt, mod(trunc(po.spare2/65536), 65536), po.partkeycols,
mod(trunc(po.spare2/256), 256),
ts.name, po.defpctfree,
decode(bitand(ts.flags, 32), 32,
to_number(NULL),po.defpctused),
po.definitrans,
po.defmaxtrans,
decode(po.deftiniexts, NULL, 'DEFAULT', po.deftiniexts),
decode(po.defextsize, NULL, 'DEFAULT', po.defextsize),
decode(po.defminexts, NULL, 'DEFAULT', po.defminexts),
decode(po.defmaxexts, NULL, 'DEFAULT', po.defmaxexts),
decode(po.defextpct, NULL, 'DEFAULT', po.defextpct),
decode(bitand(ts.flags, 32), 32, to_number(NULL),po.deflists),
decode(bitand(ts.flags, 32), 32, to_number(NULL),
po.defgroups),
decode(po.deflogging, 0, 'NONE', 1, 'YES', 2, 'NO', 'UNKNOWN'),
decode(mod(trunc(po.spare2/4294967296),256), 0, 'NONE', 1,
'ENABLED',
2, 'DISABLED', 'UNKNOWN'),
decode(po.spare1, 0, 'DEFAULT', 1, 'KEEP', 2, 'RECYCLE', NULL)
from sys.obj$ o, sys.partobj$ po, sys.ts$ ts, sys.tab$ t, sys.user$
u
where o.obj# = po.obj# and po.defts# = ts.ts# and t.obj# = o.obj# and
o.owner# = u.user# and
bitand(t.property, 64 + 128) = 0
union all -- NON-IOT and IOT
select u.name, o.name,
decode(po.parttype, 1, 'RANGE', 2, 'HASH', 3, 'SYSTEM', 4,
'LIST',
'UNKNOWN'),
decode(mod(po.spare2, 256), 0, 'NONE', 2, 'HASH', 3, 'SYSTEM',
4, 'LIST', 'UNKNOWN'),
po.partcnt, mod(trunc(po.spare2/65536), 65536), po.partkeycols,
mod(trunc(po.spare2/256), 256),
NULL,
TO_NUMBER(NULL),TO_NUMBER(NULL),TO_NUMBER(NULL),TO_NUMBER(NULL),
NULL,--decode(po.deftiniexts, NULL, 'DEFAULT', po.deftiniexts),
NULL,--decode(po.defextsize, NULL, 'DEFAULT', po.defextsize),
NULL,--decode(po.defminexts, NULL, 'DEFAULT', po.defminexts),
NULL,--decode(po.defmaxexts, NULL, 'DEFAULT', po.defmaxexts),
NULL,--decode(po.defextpct, NULL, 'DEFAULT', po.defextpct),
TO_NUMBER(NULL),TO_NUMBER(NULL),--po.deflists, po.defgroups,
decode(po.deflogging, 0, 'NONE', 1, 'YES', 2, 'NO', 'UNKNOWN'),
'N/A',
decode(po.spare1, 0, 'DEFAULT', 1, 'KEEP', 2, 'RECYCLE', NULL)
from sys.obj$ o, sys.partobj$ po, sys.tab$ t, sys.user$ u
where o.obj# = po.obj# and t.obj# = o.obj# and
o.owner# = u.user# and
bitand(t.property, 64 + 128) != 0"
SYS DBA_PENDING_CONV_TABLES 167 "select u.name, o.name
from sys.obj$ o, user$ u
where o.type# = 2 and o.status = 5
and bitand(o.flags, 4096) = 4096 /* type evolved flg */
and o.owner# = u.user#"
SYS DBA_PENDING_TRANSACTIONS 705 "(((select formatid, globalid,
branchid
from gv$global_transaction
where preparecount > 0 and refcount = preparecount)
minus
(select global_tran_fmt, global_foreign_id, branch_id
from sys.pending_trans$ tran, sys.pending_sessions$ sess
where tran.local_tran_id = sess.local_tran_id
and tran.state != 'collecting'
and dbms_utility.is_bit_set(tran.session_vector,
sess.session_id)=1)
)
union
(select global_tran_fmt, global_foreign_id, branch_id
from sys.pending_trans$ tran, sys.pending_sessions$ sess
where tran.local_tran_id = sess.local_tran_id
and tran.state != 'collecting'
and dbms_utility.is_bit_set(tran.session_vector,
sess.session_id)=1)
)"
SYS DBA_POLICIES 1062 "select u.name, o.name, r.gname, r.pname,
r.pfschma, r.ppname, r.pfname,
decode(bitand(r.stmt_type,1), 0, 'NO', 'YES'),
decode(bitand(r.stmt_type,2), 0, 'NO', 'YES'),
decode(bitand(r.stmt_type,4), 0, 'NO', 'YES'),
decode(bitand(r.stmt_type,8), 0, 'NO', 'YES'),
decode(r.check_opt, 0, 'NO', 'YES'),
decode(r.enable_flag, 0, 'NO', 'YES'),
decode(bitand(r.stmt_type,16), 0, 'NO', 'YES')
from user$ u, obj$ o, rls$ r
where u.user# = o.owner#
and r.obj# = o.obj# and r.ptype is null
union
select u.name, o.name, r.gname, r.pname, r.pfschma, r.ppname,
r.pfname,
decode(bitand(r.stmt_type,1), 0, 'NO', 'YES'),
decode(bitand(r.stmt_type,2), 0, 'NO', 'YES'),
decode(bitand(r.stmt_type,4), 0, 'NO', 'YES'),
decode(bitand(r.stmt_type,8), 0, 'NO', 'YES'),
decode(r.check_opt, 0, 'NO', 'YES'),
decode(r.enable_flag, 0, 'NO', 'YES'),
decode(bitand(r.stmt_type,16), 0, 'NO', 'YES')
from user$ u, obj$ o, rls$ r
where u.user# = o.owner#
and r.ptype = o.obj# and r.ptype is not null"
SYS DBA_POLICY_CONTEXTS 278 "select u.name, o.name, c.ns, c.attr
from user$ u, obj$ o, rls_ctx$ c
where u.user# = o.owner#
and c.obj# = o.obj# and c.synid is null
union
select u.name, o.name, c.ns, c.attr
from user$ u, obj$ o, rls_ctx$ c
where u.user# = o.owner#
and c.synid = o.obj# and c.synid is not null"
SYS DBA_POLICY_GROUPS 268 "select u.name, o.name, g.gname
from user$ u, obj$ o, rls_grp$ g
where u.user# = o.owner#
and g.obj# = o.obj# and g.synid is null
union
select u.name, o.name, g.gname
from user$ u, obj$ o, rls_grp$ g
where u.user# = o.owner#
and g.synid = o.obj# and g.synid is not null"
SYS DBA_PRIV_AUDIT_OPTS 654 "select decode(aud.user#, 0 /* client
operations through proxy */, 'ANY CLIENT',
1 /* System wide auditing*/, null,
client.name) /* USER_NAME */,
proxy.name /* PROXY_NAME */,
prv.name /* PRIVILEGE */,
decode(aud.success, 1, 'BY SESSION', 2, 'BY ACCESS', 'NOT SET')
/* SUCCESS */,
decode(aud.failure, 1, 'BY SESSION', 2, 'BY ACCESS', 'NOT SET')
/* FAILURE */
from sys.user$ client, sys.user$ proxy, system_privilege_map prv,
sys.audit$ aud
where aud.option# = -prv.privilege
and aud.user# = client.user#
and aud.proxy# = proxy.user#(+)"
SYS DBA_PROCEDURES 535 "select u.name, o.name, pi.procedurename,
decode(bitand(pi.properties,8),8,'YES','NO'),
decode(bitand(pi.properties,16),16,'YES','NO'),
u2.name, o2.name,
decode(bitand(pi.properties,32),32,'YES','NO'),
decode(bitand(pi.properties,512),512,'YES','NO'),
decode(bitand(pi.properties,256),256,'YES','NO'),
decode(bitand(pi.properties,1024),1024,'CURRENT_USER','DEFINER')
from obj$ o, user$ u, procedureinfo$ pi, obj$ o2, user$ u2
where u.user# = o.owner# and o.obj# = pi.obj#
and pi.itypeobj# = o2.obj# (+) and o2.owner# = u2.user# (+)"
SYS DBA_PROFILES 996 "select
n.name, m.name,
decode(u.type#, 0, 'KERNEL', 1, 'PASSWORD', 'INVALID'),
decode(u.limit#,
0, 'DEFAULT',
2147483647, decode(u.resource#,
4, decode(u.type#,
1, 'NULL', 'UNLIMITED'),
'UNLIMITED'),
decode(u.resource#,
4, decode(u.type#, 1, o.name, u.limit#),
decode(u.type#,
0, u.limit#,
decode(u.resource#,
1, trunc(u.limit#/86400, 4),
2, trunc(u.limit#/86400, 4),
5, trunc(u.limit#/86400, 4),
6, trunc(u.limit#/86400, 4),
u.limit#))))
from sys.profile$ u, sys.profname$ n, sys.resource_map m, sys.obj$ o
where u.resource# = m.resource#
and u.type#=m.type#
and o.obj# (+) = u.limit#
and n.profile# = u.profile#"
SYS DBA_PROPAGATION 220 "SELECT p.propagation_name,
p.source_queue_schema, p.source_queue,
p.destination_queue_schema, p.destination_queue,
p.destination_dblink,
p.ruleset_schema, p.ruleset
FROM sys.streams$_propagation_process p"
SYS DBA_PROXIES 1561 "select u1.name,
u2.name,
decode(p.credential_type#, 0, 'NONE',
1, 'CERTIFICATE',
2, 'DISTINGUISHED NAME',
4, 'DATABASE PASSWORD'),
decode(p.credential_type#, 0, null,
1, decode(p.credential_version#, 0,
'X.509',
1,
'X.509',

null),
2, null,
4, null),
decode(p.credential_type#, 0, null,
1, decode(p.credential_version#, 0,
'3',
1,
'3',

null),
2, null,
4, null),
decode(p.flags, 0, null,
1, 'PROXY MAY ACTIVATE ALL CLIENT ROLES',
2, 'NO CLIENT ROLES MAY BE ACTIVATED',
4, 'PROXY MAY ACTIVATE ROLE',
5, 'PROXY MAY ACTIVATE ALL CLIENT ROLES',
8, 'PROXY MAY NOT ACTIVATE ROLE'),
(select u.name from sys.user$ u where pr.role# = u.user#)
from sys.user$ u1, sys.user$ u2,
sys.proxy_data$ p, sys.proxy_role_data$ pr
where u1.user# = p.proxy#
and u2.user# = p.client#
and p.proxy# = pr.proxy#(+)
and p.client# = pr.client#(+)"
SYS DBA_PUBLISHED_COLUMNS 479 "SELECT
s.change_set_name, s.change_table_schema, s.change_table_name,
s.obj#,
s.source_schema_name, s.source_table_name, c.column_name,
c.data_type, c.data_length, c.data_precision, c.data_scale,
c.nullable
FROM sys.cdc_change_tables$ s, all_tables t, all_tab_columns c
WHERE s.change_table_schema=t.owner
AND s.change_table_name=t.table_name
AND c.owner=s.change_table_schema
AND c.table_name=s.change_table_name
AND c.column_name NOT LIKE '%$'"
SYS DBA_QUEUES 641 "select u.name OWNER, q.name NAME, t.name
QUEUE_TABLE, q.eventid QID,
decode(q.usage, 1, 'EXCEPTION_QUEUE', 2,
'NON_PERSISTENT_QUEUE',
'NORMAL_QUEUE') QUEUE_TYPE,
q.max_retries MAX_RETRIES, q.retry_delay RETRY_DELAY,
decode(bitand(q.enable_flag, 1), 1 , ' YES ', ' NO
')ENQUEUE_ENABLED,
decode(bitand(q.enable_flag, 2), 2 , ' YES ', ' NO
')DEQUEUE_ENABLED,
decode(q.ret_time, -1, ' FOREVER', q.ret_time) RETENTION,
substr(q.queue_comment, 1, 50) USER_COMMENT
from system.aq$_queues q, system.aq$_queue_tables t, sys.user$ u
where u.name = t.schema
and q.table_objno = t.objno"
SYS DBA_QUEUE_PUBLISHERS 453 "select t.schema QUEUE_OWNER, q.name
QUEUE_NAME,
p.p_name PUBLISHER_NAME, p.p_address PUBLISHER_ADDRESS,
p.p_protocol PUBLISHER_PROTOCOL, p.p_rule PUBLISHER_RULE,
p.p_rule_name PUBLISHER_RULE_NAME, p.p_ruleset PUBLISHER_RULESET,
p.p_transformation PUBLISHER_TRANSFORMATION
from
system.aq$_queue_tables t, system.aq$_queues q,
sys.aq$_publisher p, sys.user$ u
where
q.table_objno = t.objno and q.eventid = p.queue_id
and u.name = t.schema"
SYS DBA_QUEUE_SCHEDULES 1461 "select t.schema SCHEMA, q.name QNAME,
s.destination DESTINATION, s.start_time START_DATE,
substr(to_char(s.start_time,'HH24:MI:SS'),1,8) START_TIME,
to_number(s.duration) PROPAGATION_WINDOW,
s.next_time NEXT_TIME, to_number(s.latency) LATENCY,
s.disabled SCHEDULE_DISABLED, s.process_name PROCESS_NAME,
decode(s.sid, NULL, NULL,
concat(to_char(s.sid), concat(', ',to_char(s.serial))))
SESSION_ID,
s.instance INSTANCE, s.last_run LAST_RUN_DATE,
substr(to_char(s.last_run,'HH24:MI:SS'),1,8) LAST_RUN_TIME,
s.cur_start_time CURRENT_START_DATE,
substr(to_char(s.cur_start_time,'HH24:MI:SS'),1,8)
CURRENT_START_TIME,
s.next_run NEXT_RUN_DATE,
substr(to_char(s.next_run,'HH24:MI:SS'),1,8) NEXT_RUN_TIME,
s.total_time TOTAL_TIME, s.total_msgs TOTAL_NUMBER,
s.total_bytes TOTAL_BYTES,
s.max_num_per_win MAX_NUMBER, s.max_size MAX_BYTES,
s.total_msgs/decode(s.total_windows, 0, 1, s.total_windows)
AVG_NUMBER,
s.total_bytes/decode(s.total_msgs, 0, 1, s.total_msgs)
AVG_SIZE,
s.total_time/decode(s.total_msgs, 0, 1, s.total_msgs) AVG_TIME,
s.failures FAILURES, s.error_time LAST_ERROR_DATE,
substr(to_char(s.error_time,'HH24:MI:SS'),1,8) LAST_ERROR_TIME,
s.last_error_msg LAST_ERROR_MSG
from system.aq$_queues q, system.aq$_queue_tables t,
sys.aq$_schedules s
where s.oid = q.oid
and q.table_objno = t.objno"
SYS DBA_QUEUE_TABLES 1996 "select t.schema OWNER, t.name QUEUE_TABLE,
decode(t.udata_type, 1 , 'OBJECT', 2, 'VARIANT', 3, 'RAW') TYPE,
u.name || '.' || o.name OBJECT_TYPE,
decode(t.sort_cols, 0, 'NONE', 1, 'PRIORITY', 2, 'ENQUEUE_TIME',
3, 'PRIORITY, ENQUEUE_TIME',
7, 'ENQUEUE_TIME, PRIORITY') SORT_ORDER,
decode(bitand(t.flags, 1), 1, 'MULTIPLE', 0, 'SINGLE')
RECIPIENTS,
decode(bitand(t.flags, 2), 2, 'TRANSACTIONAL', 0,
'NONE')MESSAGE_GROUPING,
decode(bitand(t.flags, 8), 8, '8.1.3', 0, '8.0.3')COMPATIBLE,
aft.primary_instance PRIMARY_INSTANCE,
aft.secondary_instance SECONDARY_INSTANCE,
aft.owner_instance OWNER_INSTANCE,
substr(t.table_comment, 1, 50) USER_COMMENT,
decode(bitand(t.flags, 4096), 4096, 'YES', 0, 'NO') SECURE
from system.aq$_queue_tables t, sys.col$ c, sys.coltype$ ct, sys.obj$
o,
sys.user$ u, sys.aq$_queue_table_affinities aft
where c.intcol# = ct.intcol#
and c.obj# = ct.obj#
and c.name = 'USER_DATA'
and t.objno = c.obj#
and o.oid$ = ct.toid
and o.type# = 13
and o.owner# = u.user#
and t.objno = aft.table_objno
union
select t.schema OWNER, t.name QUEUE_TABLE,
decode(t.udata_type, 1 , 'OBJECT', 2, 'VARIANT', 3, 'RAW') TYPE,
null OBJECT_TYPE,
decode(t.sort_cols, 0, 'NONE', 1, 'PRIORITY', 2, 'ENQUEUE_TIME',
3, 'PRIORITY, ENQUEUE_TIME',
7, 'ENQUEUE_TIME, PRIORITY') SORT_ORDER,
decode(bitand(t.flags, 1), 1, 'MULTIPLE', 0, 'SINGLE')
RECIPIENTS,
decode(bitand(t.flags, 2), 2, 'TRANSACTIONAL', 0,
'NONE')MESSAGE_GROUPING,
decode(bitand(t.flags, 8), 8, '8.1.3', 0, '8.0.3')COMPATIBLE,
aft.primary_instance PRIMARY_INSTANCE,
aft.secondary_instance SECONDARY_INSTANCE,
aft.owner_instance OWNER_INSTANCE,
substr(t.table_comment, 1, 50) USER_COMMENT,
decode(bitand(t.flags, 4096), 4096, 'YES', 0, 'NO') SECURE
from system.aq$_queue_tables t, sys.aq$_queue_table_affinities aft
where (t.udata_type = 2
or t.udata_type = 3)
and t.objno = aft.table_objno"
SYS DBA_RCHILD 75 "select REFGROUP, OWNER, NAME, TYPE# from rgchild$ r
where r.instsite = 0"
SYS DBA_REFRESH 595 "select r.owner ROWNER, r.name RNAME, r.REFGROUP,
decode(bitand(r.flag,1),1,'Y',0,'N','?') IMPLICIT_DESTROY,
decode(bitand(r.flag,2),2,'Y',0,'N','?') PUSH_DEFERRED_RPC,
decode(bitand(r.flag,4),4,'Y',0,'N','?')
REFRESH_AFTER_ERRORS,
r.rollback_seg ROLLBACK_SEG,
j.JOB, j.NEXT_DATE, j.INTERVAL# interval,
decode(bitand(j.flag,1),1,'Y',0,'N','?') BROKEN,
r.purge_opt# PURGE_OPTION,
r.parallelism# PARALLELISM,
r.heap_size# HEAP_SIZE
from rgroup$ r, job$ j
where r.instsite = 0
and r.job = j.job(+)"
SYS DBA_REFRESH_CHILDREN 721 "select rc.owner OWNER, rc.name NAME,
rc.TYPE# TYPE,
r.owner ROWNER, r.name RNAME, r.REFGROUP,
decode(bitand(r.flag,1),1,'Y',0,'N','?') IMPLICIT_DESTROY,
decode(bitand(r.flag,2),2,'Y',0,'N','?') PUSH_DEFERRED_RPC,
decode(bitand(r.flag,4),4,'Y',0,'N','?')
REFRESH_AFTER_ERRORS,
r.rollback_seg ROLLBACK_SEG,
j.job, j.NEXT_DATE, j.INTERVAL# interval,
decode(bitand(j.flag,1),1,'Y',0,'N','?') BROKEN,
r.purge_opt# PURGE_OPTION,
r.parallelism# PARALLELISM,
r.heap_size# HEAP_SIZE
from rgroup$ r, rgchild$ rc, job$ j
where r.refgroup = rc.refgroup
and r.instsite = 0
and rc.instsite = 0
and r.job = j.job (+)"
SYS DBA_REFS 827 "select distinct u.name, o.name,
decode(bitand(c.property, 1), 1, ac.name, c.name),
decode(bitand(rc.reftyp, 2), 2, 'YES', 'NO'),
decode(bitand(rc.reftyp, 1), 1, 'YES', 'NO'),
su.name, so.name,
case
when bitand(reftyp,4) = 4 then 'USER-DEFINED'
when bitand(reftyp, 8) = 8 then 'SYSTEM GENERATED AND USER-
DEFINED'
else 'SYSTEM GENERATED'
end
from sys.obj$ o, sys.col$ c, sys.user$ u, sys.refcon$ rc, sys.obj$ so,
sys.user$ su, sys.attrcol$ ac
where o.owner# = u.user#
and o.obj# = c.obj#
and c.obj# = rc.obj#
and c.col# = rc.col#
and c.intcol# = rc.intcol#
and rc.stabid = so.oid$(+)
and so.owner# = su.user#(+)
and c.obj# = ac.obj#(+)
and c.intcol# = ac.intcol#(+)
and bitand(c.property,32768) != 32768 /* not unused column
*/"
SYS DBA_REGISTERED_MVIEWS 500 "select sowner, snapname, snapsite,
decode(bitand(flag,1), 0 , 'NO', 'YES'),
decode(bitand(flag,2), 0 , 'NO', 'YES'),
decode(bitand(flag, 32), 32, 'PRIMARY KEY',
decode(bitand(flag, 536870912), 536870912, 'OBJECT ID',
'ROWID')),
snapshot_id,
decode(rep_type, 1, 'ORACLE 7 MATERIALIZED VIEW',
2, 'ORACLE 8 MATERIALIZED VIEW',
3, 'REPAPI MATERIALIZED VIEW',
'UNKNOWN'),
query_txt
from sys.reg_snap$"
SYS DBA_REGISTERED_MVIEW_GROUPS 409 "select s.gname, s.dblink,
s.group_comment,
decode(s.rep_type, 1, 'ORACLE 7',
2, 'ORACLE 8',
3, 'REPAPI',
'UNKNOWN'),
f.fname, s.gowner
from system.repcat$_snapgroup s, system.repcat$_flavors f
WHERE s.gname = f.gname (+)
AND s.flavor_id = f.flavor_id (+)
AND s.gowner = f.gowner (+)"
SYS DBA_REGISTERED_SNAPSHOTS 473 "select sowner, snapname, snapsite,
decode(bitand(flag,1), 0 , 'NO', 'YES'),
decode(bitand(flag,2), 0 , 'NO', 'YES'),
decode(bitand(flag, 32), 32, 'PRIMARY KEY',
decode(bitand(flag, 536870912), 536870912, 'OBJECT ID',
'ROWID')),
snapshot_id,
decode(rep_type, 1, 'ORACLE 7 SNAPSHOT',
2, 'ORACLE 8 SNAPSHOT',
3, 'REPAPI SNAPSHOT',
'UNKNOWN'),
query_txt
from sys.reg_snap$"
SYS DBA_REGISTERED_SNAPSHOT_GROUPS 409 "select s.gname, s.dblink,
s.group_comment,
decode(s.rep_type, 1, 'ORACLE 7',
2, 'ORACLE 8',
3, 'REPAPI',
'UNKNOWN'),
f.fname, s.gowner
from system.repcat$_snapgroup s, system.repcat$_flavors f
WHERE s.gname = f.gname (+)
AND s.flavor_id = f.flavor_id (+)
AND s.gowner = f.gowner (+)"
SYS DBA_REGISTRY 680 "SELECT r.cid, r.cname, r.version,
DECODE(r.status, 0, 'INVALID',
1, 'VALID',
2, 'LOADING',
3, 'LOADED',
4, 'UPGRADING',
5, 'UPGRADED',
6, 'DOWNGRADING',
7, 'DOWNGRADED',
8, 'REMOVING',
99, 'REMOVED',
NULL),
TO_CHAR(r.modified,'DD-MON-YYYY HH24:MI:SS'),
i.name, s.name, r.vproc,
DECODE(bitand(r.flags,1),1,'REQUIRED',NULL), r.pid
FROM registry$ r, user$ s, user$ i
WHERE r.schema# = s.user# AND r.invoker#=i.user#"
SYS DBA_REGISTRY_HIERARCHY 574 "SELECT LPAD(' ',2*(LEVEL-1)) || LEVEL
|| ' ' || cid, version,
DECODE(status, 0, 'INVALID',
1, 'VALID',
2, 'LOADING',
3, 'LOADED',
4, 'UPGRADING',
5, 'UPGRADED',
6, 'DOWNGRADING',
7, 'DOWNGRADED',
8, 'REMOVING',
99, 'REMOVED',
NULL),
TO_CHAR(modified,'DD-MON-YYYY HH24:MI:SS')
FROM registry$
START WITH pid IS NULL
CONNECT BY PRIOR cid = pid"
SYS DBA_REPAUDIT_ATTRIBUTE 301 "select
attribute,
decode(data_type_id,
1, 'NUMBER',
2, 'VARCHAR2',
3, 'DATE',
4, 'CHAR',
5, 'RAW',
6, 'NVARCHAR2',
7, 'NCHAR',
'UNDEFINED'),
data_length,
source
from system.repcat$_audit_attribute"
SYS DBA_REPAUDIT_COLUMN 285 "select
sname,
oname,
column_name,
base_sname,
base_oname,
decode(base_conflict_type_id,
1, 'UPDATE',
2, 'UNIQUENESS',
3, 'DELETE',
'UNDEFINED'),
base_reference_name,
attribute
from system.repcat$_audit_column"
SYS DBA_REPCAT 117 select
"SNAME","MASTER","STATUS","SCHEMA_COMMENT","GNAME","FNAME","RPC_PROCESSING_DISABLED","OWNER"
from DBA_REPGROUP
SYS DBA_REPCATLOG 165 "select r.id, r.source, r.status, r.userid,
r.timestamp, r.role, r.master,
r.sname, r.request, r.oname, r.type, r.message, r.errnum, r.gname
from repcat_repcatlog r"
SYS DBA_REPCAT_EXCEPTIONS 155 "select re.exception_id, re.user_name,
re.request, re.job,
re.error_date,re.error_number,re.error_message,re.line_number
from system.repcat$_exceptions re"
SYS DBA_REPCAT_REFRESH_TEMPLATES 273 "select
refresh_template_name,owner,refresh_group_name,template_comment,
nvl(public_template,'N') public_template
from system.repcat$_refresh_templates t,
system.repcat$_template_types tt
where tt.template_type_id = t.template_type_id
and bitand(rawtohex(tt.flags),1) = 1"
SYS DBA_REPCAT_TEMPLATE_OBJECTS 500 "select rt.refresh_template_name,
t.object_name, ot.object_type_name object_type,
t.ddl_num,t.ddl_text,t.master_rollback_seg,
t.derived_from_sname,t.derived_from_oname,t.flavor_id
from system.repcat$_refresh_templates rt,
system.repcat$_template_objects t,
system.repcat$_object_types ot,
system.repcat$_template_types tt
where t.refresh_template_id = rt.refresh_template_id
and ot.object_type_id = t.object_type
and rt.template_type_id = tt.template_type_id
and bitand(rawtohex(tt.flags),1) = 1"
SYS DBA_REPCAT_TEMPLATE_PARMS 445 "select
rt.refresh_template_name,rt.owner,
rt.refresh_group_name,rt.template_comment,
nvl(rt.public_template,'N'),tp.parameter_name,
tp.default_parm_value, tp.prompt_string, tp.user_override
from system.repcat$_refresh_templates rt,
system.repcat$_template_parms tp,
system.repcat$_template_types tt
where tp.refresh_template_id = rt.refresh_template_id
and rt.template_type_id = tt.template_type_id
and bitand(rawtohex(tt.flags),1) = 1"
SYS DBA_REPCAT_TEMPLATE_SITES 331 "select ts.refresh_template_name,
ts.refresh_group_name, ts.template_owner,
ts.user_name,ts.site_name,ss.site_name,
decode(status,-1,'DELETED',0,'INSTALLING',
1,'INSTALLED','UNDEFINED'),
instantiation_date
from system.repcat$_template_sites ts,
sys.snap_site$ ss
where ts.status != -100
and ts.repapi_site_id = ss.site_id (+)"
SYS DBA_REPCAT_USER_AUTHORIZATIONS 415 "select
rt.refresh_template_name,rt.owner,rt.refresh_group_name,
rt.template_comment, nvl(rt.public_template,'N'),
u.username
from system.repcat$_refresh_templates rt,
all_users u,
system.repcat$_user_authorizations ra,
system.repcat$_template_types tt
where u.user_id = ra.user_id
and ra.refresh_template_id = rt.refresh_template_id
and tt.template_type_id = rt.template_type_id
and bitand(rawtohex(tt.flags),1) = 1"
SYS DBA_REPCAT_USER_PARM_VALUES 593 "select
rt.refresh_template_name,rt.owner,
rt.refresh_group_name,rt.template_comment,
nvl(rt.public_template,'N'),tp.parameter_name,
tp.default_parm_value, tp.prompt_string, sp.parm_value,
u.username
from system.repcat$_refresh_templates rt,
system.repcat$_template_parms tp,
system.repcat$_user_parm_values sp,
dba_users u,
system.repcat$_template_types tt
where tp.refresh_template_id = rt.refresh_template_id
and tp.template_parameter_id = sp.template_parameter_id
and sp.user_id = u.user_id
and rt.template_type_id = tt.template_type_id
and bitand(rawtohex(tt.flags),1) = 1"
SYS DBA_REPCOLUMN 364 "select sname, oname, type, cname, id, nvl(pos,
lpos), compare_old_on_delete,
compare_old_on_update, send_old_on_delete,
send_old_on_update,
ctype, ctype_toid, ctype_owner, ctype_hashcode, ctype_mod,
data_length, data_precision, data_scale, nullable,
character_set_name, top, char_length, char_used
from repcat_repcolumn_base"
SYS DBA_REPCOLUMN_GROUP 96 "select
sname,
oname,
group_name,
group_comment
from system.repcat$_column_group"
SYS DBA_REPCONFLICT 207 "select
sname,
oname,
decode(conflict_type_id,
1, 'UPDATE',
2, 'UNIQUENESS',
3, 'DELETE',
'UNDEFINED'),
reference_name
from system.repcat$_conflict"
SYS DBA_REPDDL 96 "select r.log_id, r.source, r.role, r.master,
r.line, r.text, r.ddl_num
from system.repcat$_ddl r"
SYS DBA_REPEXTENSIONS 668 "select
r.extension_id,
DECODE(r.extension_code,
0, 'ADD_NEW_MASTERS') request,
r.masterdef,
DECODE(export_required, 'Y', 'YES', 'N', 'NO') export_required,
r.repcatlog_id,
DECODE(r.extension_status,
0, 'READY',
1, 'STOPPING',
2, 'EXPORTING',
3, 'INSTANTIATING',
4, 'ERROR') extension_status,
r.flashback_scn,
DECODE(r.push_to_mdef, 'Y', 'YES', 'N', 'NO')
break_trans_to_masterdef,
DECODE(r.push_to_new, 'Y', 'YES', 'N', 'NO')
break_trans_to_new_masters,
r.percentage_for_catchup_mdef,
r.cycle_seconds_mdef,
r.percentage_for_catchup_new,
r.cycle_seconds_new
from system.repcat$_extension r"
SYS DBA_REPFLAVORS 163 "select f.flavor_id, f.gname, f.fname,
f.creation_date, u.name, f.published,
f.gowner
from system.repcat$_flavors f, user$ u
where f.created_by = u.user# (+)"
SYS DBA_REPFLAVOR_COLUMNS 152 "SELECT fname, gname, sname, oname,
cname, type, pos, group_owner,
type_toid, type_owner, type_hashcode, type_mod, top
FROM repcat_repflavor_columns"
SYS DBA_REPFLAVOR_OBJECTS 624 "SELECT fl.fname, fo.gname, fo.sname,
fo.oname,
DECODE (fo.type,
-1, 'SNAPSHOT',
1, 'INDEX',
2, 'TABLE',
4, 'VIEW',
5, 'SYNONYM',
6, 'SEQUENCE',
7, 'PROCEDURE',
8, 'FUNCTION',
9, 'PACKAGE',
11, 'PACKAGE BODY',
12, 'TRIGGER',
13, 'TYPE',
14, 'TYPE BODY',
32, 'INDEXTYPE',
33, 'OPERATOR',
'UNDEFINED'),
fo.gowner
from system.repcat$_flavors fl, system.repcat$_flavor_objects fo
where fo.gname = fl.gname
and fo.flavor_id = fl.flavor_id
and fo.gowner = fl.gowner"
SYS DBA_REPGENERATED 293 "select r.sname, r.oname, r.type,
r.base_sname, r.base_oname, r.base_type,
r.package_prefix, r.procedure_prefix, r.distributed, r.reason
from repcat_generated r
where ((r.reason = 'PROCEDURAL REPLICATION WRAPPER' and r.type !=
'SYNONYM')
or r.reason != 'PROCEDURAL REPLICATION WRAPPER')"
SYS DBA_REPGENOBJECTS 161 "select r.sname, r.oname, r.type,
r.base_sname, r.base_oname, r.base_type,
r.package_prefix, r.procedure_prefix, r.distributed, r.reason
from repcat_generated r"
SYS DBA_REPGROUP 135 "select r.sname, r.master, r.status,
r.schema_comment, r.sname, r.fname,
r.rpc_processing_disabled, r.gowner
from repcat_repcat r"
SYS DBA_REPGROUPED_COLUMN 120 "select distinct
gc.sname,
gc.oname,
gc.group_name,
gc.column_name
from system.repcat$_grouped_column gc"
SYS DBA_REPGROUP_PRIVILEGES 245 "select u.username, rp.gname,
rp.created,
decode(bitand(rp.privilege, 1), 1, 'Y', 'N'),
decode(bitand(rp.privilege, 2), 2, 'Y', 'N'),
rp.gowner
from system.repcat$_repgroup_privs rp, dba_users u
where rp.username = u.username"
SYS DBA_REPKEY_COLUMNS 204 "select rk.sname, rk.oname, rc.lcname
from system.repcat$_key_columns rk, system.repcat$_repcolumn rc
where rk.sname = rc.sname
and rk.oname = rc.oname
and rk.col = rc.cname -- SYS column name"
SYS DBA_REPOBJECT 288 "select r.sname, r.oname, r.type, r.status,
r.generation_status, r.id,
r.object_comment, r.gname, r.min_communication,
r.trigflag replication_trigger_exists,
r.internal_package_exists,
r.gowner, r.nested_table
from repcat_repobject r
where r.type != 'INTERNAL PACKAGE'"
SYS DBA_REPPARAMETER_COLUMN 916 "select
p.sname,
p.oname,
decode(p.conflict_type_id,
1, 'UPDATE',
2, 'UNIQUENESS',
3, 'DELETE',
'UNDEFINED'),
p.reference_name,
p.sequence_no,
r.method_name,
r.function_name,
r.priority_group,
p.parameter_table_name,
decode(method_name, 'USER FUNCTION', NVL(rc.top, rc.lcname),
'USER FLAVOR FUNCTION', NVL(rc.top,
rc.lcname),
rc.lcname),
p.parameter_sequence_no
from system.repcat$_parameter_column p,
system.repcat$_resolution r,
system.repcat$_repcolumn rc
where p.sname = r.sname
and p.oname = r.oname
and p.conflict_type_id = r.conflict_type_id
and p.reference_name = r.reference_name
and p.sequence_no = r.sequence_no
and p.oname = p.parameter_table_name
and p.attribute_sequence_no = 1
and p.sname = rc.sname
and p.oname = rc.oname
and p.column_pos = rc.pos"
SYS DBA_REPPRIORITY 609 "select
p.sname,
p.priority_group,
v.priority,
decode(p.data_type_id,
1, 'NUMBER',
2, 'VARCHAR2',
3, 'DATE',
4, 'CHAR',
5, 'RAW',
6, 'NVARCHAR2',
7, 'NCHAR',
'UNDEFINED'),
p.fixed_data_length,
v.char_value,
v.varchar2_value,
v.number_value,
v.date_value,
v.raw_value,
p.sname,
v.nchar_value,
v.nvarchar2_value,
v.large_char_value
from system.repcat$_priority v,
system.repcat$_priority_group p
where v.sname = p.sname
and v.priority_group = p.priority_group"
SYS DBA_REPPRIORITY_GROUP 343 "select
sname,
priority_group,
decode(data_type_id,
1, 'NUMBER',
2, 'VARCHAR2',
3, 'DATE',
4, 'CHAR',
5, 'RAW',
6, 'NVARCHAR2',
7, 'NCHAR',
'UNDEFINED'),
fixed_data_length,
priority_comment,
sname
from system.repcat$_priority_group"
SYS DBA_REPPROP 264 "select r.sname, r.oname, r.type, r.dblink, r.how,
r.propagate_comment
from repcat_repprop r, repcat_repobject ro
where r.sname = ro.sname
and r.oname = ro.oname
and r.type = ro.type
and ro.type in ('PROCEDURE', 'PACKAGE', 'PACKAGE BODY', 'TABLE',
'SNAPSHOT')"
SYS DBA_REPRESOLUTION 306 "select
sname,
oname,
decode(conflict_type_id,
1, 'UPDATE',
2, 'UNIQUENESS',
3, 'DELETE',
'UNDEFINED'),
reference_name,
sequence_no,
method_name,
function_name,
priority_group,
resolution_comment
from system.repcat$_resolution"
SYS DBA_REPRESOLUTION_METHOD 191 "select
decode(conflict_type_id,
1, 'UPDATE',
2, 'UNIQUENESS',
3, 'DELETE',
'UNDEFINED'),
method_name
from system.repcat$_resolution_method"
SYS DBA_REPRESOLUTION_STATISTICS 434 "select
sname,
oname,
decode(conflict_type_id,
1, 'UPDATE',
2, 'UNIQUENESS',
3, 'DELETE',
'UNDEFINED'),
reference_name,
method_name,
decode(method_name,
'USER FUNCTION', function_name,
'USER FLAVOR FUNCTION', function_name,
NULL),
priority_group,
resolved_date,
primary_key_value
from system.repcat$_resolution_statistics"
SYS DBA_REPRESOL_STATS_CONTROL 269 "select
sname,
oname,
created,
decode(status,
1, 'ACTIVE',
2, 'CANCELLED',
'UNDEFINED'),
status_update_date,
purged_date,
last_purge_start_date,
last_purge_end_date
from system.repcat$_resol_stats_control"
SYS DBA_REPSCHEMA 161 "select r.sname, r.dblink, r.masterdef,
r.snapmaster, r.master_comment,
r.master, r.prop_updates, r.my_dblink, r.sname, r.gowner
from system.repcat$_repschema r"
SYS DBA_REPSITES 152 "select r.sname, r.dblink, r.masterdef,
r.snapmaster, r.master_comment,
r.master, r.prop_updates, r.my_dblink, r.gowner
from system.repcat$_repschema r"
SYS DBA_REPSITES_NEW 257 "select
r.extension_id,
r.gowner,
r.gname,
r.dblink,
r.full_instantiation,
DECODE(r.master_status,
0, 'READY',
1, 'INSTANTIATING',
2, 'INSTANTIATED',
3, 'PREPARED') master_status
from system.repcat$_sites_new r"
SYS DBA_RESUMABLE 743 "select distinct S.SCHEMA# as USER_ID, R.SID as
SESSION_ID,
R.INST_ID as INSTANCE_ID, P.QCINST_ID, P.QCSID,
R.STATUS, R.TIMEOUT, NVL(T.START_TIME, R.SUSPEND_TIME) as
START_TIME,
R.SUSPEND_TIME, R.RESUME_TIME, R.NAME, Q.SQL_TEXT,
R.ERROR_NUMBER,
R.ERROR_PARAMETER1, R.ERROR_PARAMETER2, R.ERROR_PARAMETER3,
R.ERROR_PARAMETER4, R.ERROR_PARAMETER5, R.ERROR_MSG
from GV$RESUMABLE R, GV$SESSION S, GV$TRANSACTION T, GV$SQL Q, GV
$PX_SESSION P
where S.SID=R.SID and S.INST_ID=R.INST_ID
and S.SADDR=T.SES_ADDR(+) and S.INST_ID=T.INST_ID(+)
and S.SQL_ADDRESS=Q.ADDRESS(+) and S.INST_ID=Q.INST_ID(+)
and S.SADDR=P.SADDR(+) and S.INST_ID=P.INST_ID(+)
and R.ENABLED='YES' and NVL(T.SPACE,'NO')='NO'"
SYS DBA_RGROUP 421 "select REFGROUP, OWNER, NAME,
decode(bitand(flag,1),1,'Y',0,'N','?') IMPLICIT_DESTROY,
decode(bitand(flag,2),2,'Y',0,'N','?') PUSH_DEFERRED_RPC,
decode(bitand(flag,4),4,'Y',0,'N','?') REFRESH_AFTER_ERRORS,
ROLLBACK_SEG,
JOB,
purge_opt# PURGE_OPTION,
parallelism# PARALLELISM,
heap_size# HEAP_SIZE
from rgroup$ r
where r.instsite = 0"
SYS DBA_ROLES 183 "select name, decode(password, null, 'NO',
'EXTERNAL', 'EXTERNAL',
'GLOBAL', 'GLOBAL', 'YES')
from user$
where type# = 0 and name not in ('PUBLIC', '_NEXT_USER')"
SYS DBA_ROLE_PRIVS 508 "select /*+ ordered */ decode(sa.grantee#, 1,
'PUBLIC', u1.name), u2.name,
decode(min(option$), 1, 'YES', 'NO'),
decode(min(u1.defrole), 0, 'NO', 1, 'YES',
2, decode(min(ud.role#),null,'NO','YES'),
3, decode(min(ud.role#),null,'YES','NO'), 'NO')
from sysauth$ sa, user$ u1, user$ u2, defrole$ ud
where sa.grantee#=ud.user#(+)
and sa.privilege#=ud.role#(+) and u1.user#=sa.grantee#
and u2.user#=sa.privilege#
group by decode(sa.grantee#,1,'PUBLIC',u1.name),u2.name"
SYS DBA_ROLLBACK_SEGS 857 "select un.name, decode(un.user#,
1,'PUBLIC','SYS'),
ts.name, un.us#, f.file#, un.block#,
s.iniexts * ts.blocksize,
decode(bitand(ts.flags, 3), 1, to_number(NULL),
s.extsize * ts.blocksize),
s.minexts, s.maxexts,
decode(bitand(ts.flags, 3), 1, to_number(NULL),
s.extpct),
decode(un.status$, 2, 'OFFLINE', 3, 'ONLINE',
4, 'UNDEFINED', 5, 'NEEDS RECOVERY',
6, 'PARTLY AVAILABLE', 'UNDEFINED'),
decode(un.inst#, 0, NULL, un.inst#), un.file#
from sys.undo$ un, sys.seg$ s, sys.ts$ ts, sys.file$ f
where un.status$ != 1
and un.ts# = s.ts#
and un.file# = s.file#
and un.block# = s.block#
and s.type# in (1, 10)
and s.ts# = ts.ts#
and un.ts# = f.ts#
and un.file# = f.relfile#"
SYS DBA_RSRC_CONSUMER_GROUPS 102 "select
name,cpu_method,description,status,decode(mandatory,1,'YES','NO')
from resource_consumer_group$"
SYS DBA_RSRC_CONSUMER_GROUP_PRIVS 303 "select ue.name, g.name,
decode(min(mod(o.option$,2)),1,'YES','NO'),
decode(ue.defschclass,g.name,'YES','NO')
from sys.user$ ue, sys.resource_consumer_group$ g, sys.objauth$ o
where o.obj# = g.obj# and o.grantee# = ue.user#
group by ue.name, g.name, decode(ue.defschclass,g.name,'YES','NO')"
SYS DBA_RSRC_MANAGER_SYSTEM_PRIVS 232 "select
u.name,spm.name,decode(min(sa.option$),1,'YES','NO')
from sys.user$ u, system_privilege_map spm, sys.sysauth$ sa
where sa.grantee# = u.user# and sa.privilege# = spm.privilege
and sa.privilege# = -227 group by u.name, spm.name"
SYS DBA_RSRC_PLANS 147 "select
name,num_plan_directives,cpu_method,mast_method,pdl_method,que_method,
description,status,decode(mandatory,1,'YES','NO') from resource_plan$"
SYS DBA_RSRC_PLAN_DIRECTIVES 1001 "select plan, group_or_subplan,
decode(is_subplan, 1, 'PLAN', 'CONSUMER_GROUP'),
decode(cpu_p1, 4294967295, 0, cpu_p1),
decode(cpu_p2, 4294967295, 0, cpu_p2),
decode(cpu_p3, 4294967295, 0, cpu_p3),
decode(cpu_p4, 4294967295, 0, cpu_p4),
decode(cpu_p5, 4294967295, 0, cpu_p5),
decode(cpu_p6, 4294967295, 0, cpu_p6),
decode(cpu_p7, 4294967295, 0, cpu_p7),
decode(cpu_p8, 4294967295, 0, cpu_p8),
decode(active_sess_pool_p1, 4294967295, to_number(null),
active_sess_pool_p1),
decode(queueing_p1, 4294967295, to_number(null), queueing_p1),
decode(parallel_degree_limit_p1,
4294967295, to_number(null),
parallel_degree_limit_p1),
switch_group,
decode(switch_time, 4294967295, to_number(null), switch_time),
decode(switch_estimate, 4294967295, 'FALSE', 0, 'FALSE', 1, 'TRUE'),
decode(max_est_exec_time, 4294967295, to_number(null),
max_est_exec_time),
decode(undo_pool, 4294967295, to_number(null), undo_pool),
description, status, decode(mandatory, 1, 'YES', 'NO')
from resource_plan_directive$"
SYS DBA_RULES 256 "SELECT /*+ ordered */
u.name, o.name, r.condition, bu.name, bo.name, r.r_action,
r.r_comment
FROM rule$ r, obj$ o, user$ u, obj$ bo, user$ bu
WHERE r.obj# = o.obj# and o.owner# = u.user# and
r.ectx# = bo.obj#(+) and bo.owner# = bu.user#(+)"
SYS DBA_RULESETS 220 "SELECT rule_set_owner, rule_set_name, NULL,
decode(rule_set_eval_context_owner, NULL, NULL,
rule_set_eval_context_owner||'.'||
rule_set_eval_context_name),
rule_set_comment
FROM dba_rule_sets"
SYS DBA_RULE_SETS 236 "SELECT /*+ ordered */
u.name, o.name, bu.name, bo.name, r.rs_comment
FROM rule_set$ r, obj$ o, user$ u, obj$ bo, user$ bu
WHERE r.obj# = o.obj# and u.user# = o.owner# and
r.ectx# = bo.obj#(+) and bo.owner# = bu.user#(+)"
SYS DBA_RULE_SET_RULES 408 "SELECT /*+ ordered */
u.name, o.name, ru.name, ro.name,
decode(bitand(rm.property, 1), 1, 'DISABLED', 'ENABLED'),
eu.name, eo.name, rm.rm_comment
FROM rule_map$ rm, obj$ o, user$ u, obj$ ro, user$ ru, obj$ eo, user
$ eu
WHERE rm.rs_obj# = o.obj# and o.owner# = u.user# and rm.r_obj# =
ro.obj# and
ro.owner# = ru.user# and rm.ectx# = eo.obj#(+) and
eo.owner# = eu.user#(+)"
SYS DBA_SECONDARY_OBJECTS 216 "select u.name, o.name, u1.name, o1.name
from sys.user$ u, sys.obj$ o, sys.user$ u1, sys.obj$ o1, sys.secobj$
s
where s.obj# = o.obj# and o.owner# = u.user# and
s.secobj# = o1.obj# and o1.owner# = u1.user#"
SYS DBA_SEGMENTS 860 "select owner, segment_name, partition_name,
segment_type, tablespace_name,
header_file, header_block,
dbms_space_admin.segment_number_blocks(tablespace_id,
relative_fno,
header_block, segment_type_id, buffer_pool_id, segment_flags,
segment_objd, blocks)*blocksize,
dbms_space_admin.segment_number_blocks(tablespace_id,
relative_fno,
header_block, segment_type_id, buffer_pool_id, segment_flags,
segment_objd, blocks),
dbms_space_admin.segment_number_extents(tablespace_id,
relative_fno,
header_block, segment_type_id, buffer_pool_id, segment_flags,
segment_objd, extents),
initial_extent, next_extent, min_extents, max_extents,
pct_increase,
freelists, freelist_groups, relative_fno,
decode(buffer_pool_id, 0, 'DEFAULT', 1, 'KEEP', 2, 'RECYCLE',
NULL)
from sys_dba_segs"
SYS DBA_SEQUENCES 263 "select u.name, o.name,
s.minvalue, s.maxvalue, s.increment$,
decode (s.cycle#, 0, 'N', 1, 'Y'),
decode (s.order$, 0, 'N', 1, 'Y'),
s.cache, s.highwater
from sys.seq$ s, sys.obj$ o, sys.user$ u
where u.user# = o.owner#
and o.obj# = s.obj#"
SYS DBA_SNAPSHOTS 1954 "select s.sowner, s.vname, tname, mview,
t.mowner, t.master, mlink,
decode(bitand(s.flag,1), 0, 'NO', 'YES'),
decode(bitand(s.flag,2), 0, 'NO', 'YES'),
decode(bitand(s.flag,16), 16, 'ROWID',
(decode(bitand(s.flag,32), 32, 'PRIMARY KEY',
(decode(bitand(s.flag,8192), 8192, 'JOIN VIEW',
(decode(bitand(s.flag,4096), 4096, 'AGGREGATE',
(decode(bitand(s.flag,256), 256, 'COMPLEX',
(decode(bitand(s.flag,536870912), 536870912, 'OBJECT
ID',
'UNKNOWN'))))))))))),
t.snaptime, s.error#,
decode(bitand(s.status,1), 0, 'REGENERATE', 'VALID'),
decode(bitand(s.status,2), 0, 'REGENERATE', 'VALID'),
decode(s.auto_fast,
'C', 'COMPLETE',
'F', 'FAST',
'?', 'FORCE',
'N', 'NEVER',
NULL, 'FORCE', 'ERROR'),
s.auto_fun, s.auto_date, r.refgroup, s.ustrg, s.uslog,
s.query_txt, s.mas_roll_seg,
decode(bitand(s.status,4), 4, 'INVALID',
(decode(bitand(s.status,8), 8, 'UNKNOWN',
'VALID'))),
decode(NVL(s.auto_fun, 'null'),
'null', decode(s.auto_fast, 'N',
'NEVER',
(decode(bitand(s.flag, 32768), 0,
'DEMAND',

'COMMIT'))),
'PERIODIC'),
decode(bitand(s.flag,131072), 0, 'NO', 'YES')
from sys.snap$ s, sys.rgchild$ r, sys.snap_reftime$ t
where t.sowner = s.sowner
and t.vname = s.vname
and t.instsite = 0
and s.instsite = 0
and not (bitand(s.flag, 268435456) > 0 /* MV with user-defined
types */
and bitand(s.objflag, 32) > 0) /*
secondary MV */
and t.tablenum = 0
and t.sowner = r.owner (+)
and t.vname = r.name (+)
and nvl(r.instsite,0) = 0
and r.type# (+) = 'SNAPSHOT'"
SYS DBA_SNAPSHOT_LOGS 1131 "select m.mowner, m.master, m.log, m.trig,
decode(bitand(m.flag,1), 0, 'NO', 'YES'),
decode(bitand(m.flag,2), 0, 'NO', 'YES'),
decode(bitand(m.flag,512), 0, 'NO', 'YES'),
decode(bitand(m.flag,4), 0, 'NO', 'YES'),
decode(bitand(m.flag,1024), 0, 'NO', 'YES'),
decode(bitand(m.flag,16), 0, 'NO', 'YES'),
s.snaptime, s.snapid
from sys.mlog$ m, sys.slog$ s
where s.mowner (+) = m.mowner
and s.master (+) = m.master
union
select ct.source_schema_name, ct.source_table_name,
ct.change_table_name,
ct.mvl_v7trigger,
decode(bitand(ct.mvl_flag,1), 0, 'NO', 'YES'),
decode(bitand(ct.mvl_flag,2), 0, 'NO', 'YES'),
decode(bitand(ct.mvl_flag,512), 0, 'NO', 'YES'),
decode(bitand(ct.mvl_flag,4), 0, 'NO', 'YES'),
decode(bitand(ct.mvl_flag,1024), 0, 'NO', 'YES'),
decode(bitand(ct.mvl_flag,16), 0, 'NO', 'YES'),
cs.last_extended, cs.handle
from sys.cdc_change_tables$ ct, sys.cdc_subscribers$ cs,
sys.cdc_subscribed_tables$ st
where ct.obj# = st.change_table_obj# (+)
and st.handle = cs.handle (+)
and bitand(ct.mvl_flag, 128) = 128"
SYS DBA_SOURCE 519 "select u.name, o.name,
decode(o.type#, 7, 'PROCEDURE', 8, 'FUNCTION', 9, 'PACKAGE',
11, 'PACKAGE BODY', 12, 'TRIGGER', 13, 'TYPE', 14,
'TYPE BODY',
'UNDEFINED'),
s.line, s.source
from sys.obj$ o, sys.source$ s, sys.user$ u
where o.obj# = s.obj#
and o.owner# = u.user#
and o.type# in (7, 8, 9, 11, 12, 13, 14)
union
select u.name, o.name, 'JAVA SOURCE', s.joxftlno, s.joxftsrc
from sys.obj$ o, x$joxfs s, sys.user$ u
where o.obj# = s.joxftobn
and o.owner# = u.user#
and o.type# = 28"
SYS DBA_SOURCE_TABLES 188 "SELECT
distinct s.source_schema_name, s.source_table_name
FROM sys.cdc_change_tables$ s, all_tables t
WHERE s.change_table_schema=t.owner
AND s.change_table_name=t.table_name"
SYS DBA_SOURCE_TAB_COLUMNS 404 "SELECT
s.source_schema_name, s.source_table_name, c.column_name,
c.data_type, c.data_length, c.data_precision, c.data_scale,
c.nullable
FROM sys.cdc_change_tables$ s, all_tables t, all_tab_columns c
WHERE s.change_table_schema=t.owner
AND s.change_table_name=t.table_name
AND c.owner=s.change_table_schema
AND c.table_name=s.change_table_name
AND c.column_name NOT LIKE '%$'"
SYS DBA_SQLJ_TYPES 1072 "select decode(bitand(t.properties, 64), 64,
null, u.name), o.name, t.toid,
t.externname,
decode(t.externtype, 1, 'SQLData',
2, 'CustomDatum',
3, 'Serializable',
4, 'Serializable Internal',
5, 'ORAData',
'unknown'),
decode(t.typecode, 108, 'OBJECT',
122, 'COLLECTION',
o.name),
t.attributes, t.methods,
decode(bitand(t.properties, 16), 16, 'YES', 0, 'NO'),
decode(bitand(t.properties, 256), 256, 'YES', 0, 'NO'),
decode(bitand(t.properties, 8), 8, 'NO', 'YES'),
decode(bitand(t.properties, 65536), 65536, 'NO', 'YES'),
su.name, so.name, t.local_attrs, t.local_methods
from sys.user$ u, sys.type$ t, sys.obj$ o, sys.obj$ so, sys.user$ su
where o.owner# = u.user#
and o.oid$ = t.tvoid
and o.subname IS NULL -- only the latest version
and o.type# <> 10 -- must not be invalid
and bitand(t.properties, 2048) = 0 -- not system-generated
and t.supertoid = so.oid$ (+) and so.owner# = su.user# (+)
and t.externtype < 5"
SYS DBA_SQLJ_TYPE_ATTRS 1362 "select decode(bitand(t.properties, 64),
64, null, u.name),
o.name, a.name, a.externname,
decode(bitand(a.properties, 32768), 32768, 'REF',
decode(bitand(a.properties, 16384), 16384, 'POINTER')),
decode(bitand(at.properties, 64), 64, null, au.name),
decode(at.typecode,
52, decode(a.charsetform, 2, 'NVARCHAR2', ao.name),
53, decode(a.charsetform, 2, 'NCHAR', ao.name),
54, decode(a.charsetform, 2, 'NCHAR VARYING', ao.name),
61, decode(a.charsetform, 2, 'NCLOB', ao.name),
ao.name),
a.length, a.precision#, a.scale,
decode(a.charsetform, 1, 'CHAR_CS',
2, 'NCHAR_CS',
3, NLS_CHARSET_NAME(a.charsetid),
4, 'ARG:'||a.charsetid),
a.attribute#, decode(bitand(nvl(a.xflags,0), 1), 1, 'YES',
'NO')
from sys.user$ u, sys.obj$ o, sys.type$ t, sys.attribute$ a,
sys.obj$ ao, sys.user$ au, sys.type$ at
where o.owner# = u.user#
and o.oid$ = t.toid
and o.type# <> 10 -- must not be invalid
and bitand(t.properties, 2048) = 0 -- not system-generated
and t.toid = a.toid
and t.version# = a.version#
and a.attr_toid = ao.oid$
and ao.owner# = au.user#
and a.attr_toid = at.tvoid
and a.attr_version# = at.version#
and t.externtype < 5"
SYS DBA_SQLJ_TYPE_METHODS 747 "select u.name, o.name, m.name,
m.externVarName, m.method#,
decode(bitand(m.properties, 512), 512, 'MAP',
decode(bitand(m.properties, 2048), 2048, 'ORDER',
'PUBLIC')),
m.parameters#, m.results,
decode(bitand(m.properties, 8), 8, 'NO', 'YES'),
decode(bitand(m.properties, 65536), 65536, 'NO', 'YES'),
decode(bitand(m.properties, 131072), 131072, 'YES', 'NO'),
decode(bitand(nvl(m.xflags,0), 1), 1, 'YES', 'NO')
from sys.user$ u, sys.obj$ o, sys.type$ t, sys.method$ m
where o.owner# = u.user#
and o.oid$ = m.toid
and o.type# <> 10 -- must not be invalid
and bitand(t.properties, 2048) = 0 -- not system-generated
and t.toid = m.toid
and t.version# = m.version#
and t.externtype < 5"
SYS DBA_STMT_AUDIT_OPTS 658 "select decode(aud.user#, 0 /* client
operations through proxy */, 'ANY CLIENT',
1 /* System wide auditing*/, null,
client.name)
/* USER_NAME */,
proxy.name /* PROXY_NAME */,
aom.name /* AUDIT_OPTION */,
decode(aud.success, 1, 'BY SESSION', 2, 'BY ACCESS', 'NOT SET')
/* SUCCESS */,
decode(aud.failure, 1, 'BY SESSION', 2, 'BY ACCESS', 'NOT SET')
/* FAILURE */
from sys.user$ client, sys.user$ proxy, STMT_AUDIT_OPTION_MAP aom,
sys.audit$ aud
where aud.option# = aom.option#
and aud.user# = client.user#
and aud.proxy# = proxy.user#(+)"
SYS DBA_STORED_SETTINGS 359 "SELECT u.name, o.name, o.obj#,
DECODE(o.type#,
7, 'PROCEDURE',
8, 'FUNCTION',
9, 'PACKAGE',
11, 'PACKAGE BODY',
12, 'TRIGGER',
13, 'TYPE',
14, 'TYPE BODY',
'UNDEFINED'),
p.param, p.value
FROM sys.obj$ o, sys.user$ u, sys.settings$ p
WHERE o.owner# = u.user#
AND o.linkname is null
AND p.obj# = o.obj#"
SYS DBA_STREAMS_GLOBAL_RULES 466 "select streams_name,
decode(streams_type, 1, 'CAPTURE',
2, 'PROPAGATION',
3, 'APPLY', 'UNDEFINED'),
decode(rule_type, 1, 'DML',
2, 'DDL', 'UNKNOWN'),
decode(include_tagged_lcr, 0, 'NO',
1, 'YES'),
source_database, rule_name, rule_owner, rule_condition
from ""_DBA_STREAMS_RULES""
where object_type = 3"
SYS DBA_STREAMS_SCHEMA_RULES 492 "select streams_name,
decode(streams_type, 1, 'CAPTURE',
2, 'PROPAGATION',
3, 'APPLY', 'UNDEFINED'),
schema_name, decode(rule_type, 1, 'DML',
2, 'DDL', 'UNKNOWN'),
decode(include_tagged_lcr, 0, 'NO',
1, 'YES'),
source_database, rule_name, rule_owner, rule_condition
from ""_DBA_STREAMS_RULES""
where object_type = 2"
SYS DBA_STREAMS_TABLE_RULES 711 "select streams_name,
decode(streams_type, 1, 'CAPTURE',
2, 'PROPAGATION',
3, 'APPLY', 'UNDEFINED'),
schema_name, object_name, decode(rule_type, 1, 'DML',
2, 'DDL',
'UNKNOWN'),
dml_condition, decode(subsetting_operation, 1, 'INSERT',
2, 'UPDATE',
3, 'DELETE'),
decode(include_tagged_lcr, 0, 'NO',
1, 'YES'),
source_database, rule_name, rule_owner, rule_condition
from ""_DBA_STREAMS_RULES""
where object_type = 1"
SYS DBA_SUBPARTITION_TEMPLATES 219 "select u.name, o.name,
st.spart_name, st.spart_position + 1, ts.name,
st.hiboundval
from sys.obj$ o, sys.defsubpart$ st, sys.ts$ ts, sys.user$ u
where st.bo# = o.obj# and st.ts# = ts.ts#(+) and o.owner# = u.user#"
SYS DBA_SUBPART_COL_STATISTICS 508 "select u.name, o.name, o.subname,
tsp.cname, h.distcnt, h.lowval, h.hival,
h.density, h.null_cnt, decode(h.row_cnt, 0, 1, 1, 1,
h.row_cnt-1),
h.sample_size, h.timestamp#,
decode(bitand(h.spare2, 2), 2, 'YES', 'NO'),
decode(bitand(h.spare2, 1), 1, 'YES', 'NO'),
h.avgcln
from sys.obj$ o, sys.hist_head$ h, tsp$ tsp, user$ u
where o.obj# = tsp.obj# and tsp.obj# = h.obj#(+)
and tsp.intcol# = h.intcol#(+)
and o.type# = 34 /* TABLE SUBPARTITION */
and o.owner# = u.user#"
SYS DBA_SUBPART_HISTOGRAMS 971 "select u.name,
o.name, o.subname,
tsp.cname,
h.bucket,
h.endpoint,
h.epvalue
from sys.obj$ o, sys.histgrm$ h, sys.user$ u, tsp$ tsp
where o.obj# = tsp.obj# and tsp.obj# = h.obj#
and tsp.intcol# = h.intcol#
and o.type# = 34 /* TABLE SUBPARTITION */
and o.owner# = u.user#
union
select u.name,
o.name, o.subname,
tsp.cname,
0,
h.minimum,
null
from sys.obj$ o, sys.hist_head$ h, sys.user$ u, tsp$ tsp
where o.obj# = tsp.obj# and tsp.obj# = h.obj#
and tsp.intcol# = h.intcol#
and o.type# = 34 /* TABLE SUBPARTITION */
and h.bucket_cnt = 1
and o.owner# = u.user#
union
select u.name,
o.name, o.subname,
tsp.cname,
1,
h.maximum,
null
from sys.obj$ o, sys.hist_head$ h, sys.user$ u, tsp$ tsp
where o.obj# = tsp.obj# and tsp.obj# = h.obj#
and tsp.intcol# = h.intcol#
and o.type# = 34 /* TABLE SUBPARTITION */
and h.bucket_cnt = 1
and o.owner# = u.user#"
SYS DBA_SUBPART_KEY_COLUMNS 678 "select u.name, o.name, 'TABLE',
decode(bitand(c.property, 1), 1, a.name, c.name), spc.pos#
from obj$ o, subpartcol$ spc, col$ c, user$ u, attrcol$ a
where spc.obj# = o.obj# and spc.obj# = c.obj#
and c.intcol# = spc.intcol#
and u.user# = o.owner#
and c.obj# = a.obj#(+) and c.intcol# = a.intcol#(+)
union
select u.name, o.name, 'INDEX',
decode(bitand(c.property, 1), 1, a.name, c.name), spc.pos#
from obj$ o, subpartcol$ spc, col$ c, user$ u, ind$ i, attrcol$ a
where spc.obj# = i.obj# and i.obj# = o.obj# and i.bo# = c.obj#
and c.intcol# = spc.intcol#
and u.user# = o.owner#
and c.obj# = a.obj#(+) and c.intcol# = a.intcol#(+)"
SYS DBA_SUBSCRIBED_COLUMNS 181 "SELECT
s.handle, t.source_schema_name, t.source_table_name,
s.column_name
FROM sys.cdc_subscribed_columns$ s, sys.cdc_change_tables$ t
WHERE s.change_table_obj#=t.obj#"
SYS DBA_SUBSCRIBED_TABLES 197 "SELECT
s.handle, t.source_schema_name, t.source_table_name,
s.view_name, t.change_set_name
FROM sys.cdc_subscribed_tables$ s, sys.cdc_change_tables$ t
WHERE s.change_table_obj#=t.obj#"
SYS DBA_SUBSCRIPTIONS 177 "SELECT s.handle, s.set_name, s.username,
s.created, s.status,
s.earliest_scn,
s.latest_scn, s.description, s.last_purged, s.last_extended
FROM sys.cdc_subscribers$ s"
SYS DBA_SUMMARIES 700 "select u.name, o.name, u.name, s.containernam,
s.lastrefreshscn, s.lastrefreshdate,
decode (s.refreshmode, 0, 'NONE', 1, 'ANY', 2, 'INCREMENTAL',
3,'FULL'),
decode(bitand(s.pflags, 25165824), 25165824, 'N', 'Y'),
s.fullrefreshtim, s.increfreshtim,
decode(bitand(s.pflags, 48), 0, 'N', 'Y'),
decode(bitand(s.mflags, 64), 0, 'N', 'Y'), /* QSMQSUM_UNUSABLE
*/
decode(bitand(s.pflags, 1294319), 0, 'Y', 'N'),
decode(bitand(s.pflags, 236879743), 0, 'Y', 'N'),
decode(bitand(s.mflags, 1), 0, 'N', 'Y'), /* QSMQSUM_KNOWNSTL
*/
s.sumtextlen,s.sumtext
from sys.user$ u, sys.sum$ s, sys.obj$ o
where o.owner# = u.user#
and o.obj# = s.obj#"
SYS DBA_SUMMARY_AGGREGATES 567 "select u.name, o.name, sa.sumcolpos#,
c.name,
decode(sa.aggfunction, 15, 'AVG', 16, 'SUM', 17, 'COUNT',
18, 'MIN', 19, 'MAX',
97, 'VARIANCE', 98, 'STDDEV',
440, 'USER'),
decode(sa.flags, 0, 'N', 'Y'),
sa.aggtext
from sys.sumagg$ sa, sys.obj$ o, sys.user$ u, sys.sum$ s, sys.col$ c
where sa.sumobj# = o.obj#
AND o.owner# = u.user#
AND sa.sumobj# = s.obj#
AND c.obj# = s.containerobj#
AND c.col# = sa.containercol#
AND bitand(s.pflags, 1048576) = 0"
SYS DBA_SUMMARY_DETAIL_TABLES 458 "select u.name, o.name, du.name,
do.name,
decode (sd.detailobjtype, 1, 'TABLE', 2, 'VIEW',
3, 'SNAPSHOT', 4, 'CONTAINER',
'UNDEFINED'),
sd.detailalias
from sys.user$ u, sys.sumdetail$ sd, sys.obj$ o, sys.obj$ do,
sys.user$ du, sys.sum$ s
where o.owner# = u.user#
and o.obj# = sd.sumobj#
and do.obj# = sd.detailobj#
and do.owner# = du.user#
and s.obj# = sd.sumobj#
and bitand(s.pflags, 1048576) = 0"
SYS DBA_SUMMARY_JOINS 588 "select u.name, o.name,
u1.name, o1.name, c1.name, '=',
u2.name, o2.name, c2.name
from sys.sumjoin$ sj, sys.obj$ o, sys.user$ u,
sys.obj$ o1, sys.user$ u1, sys.col$ c1,
sys.obj$ o2, sys.user$ u2, sys.col$ c2,
sys.sum$ s
where sj.sumobj# = o.obj#
AND o.owner# = u.user#
AND sj.tab1obj# = o1.obj#
AND o1.owner# = u1.user#
AND sj.tab1obj# = c1.obj#
AND sj.tab1col# = c1.intcol#
AND sj.tab2obj# = o2.obj#
AND o2.owner# = u2.user#
AND sj.tab2obj# = c2.obj#
AND sj.tab2col# = c2.intcol#
AND s.obj# = sj.sumobj#
AND bitand(s.pflags, 1048576) = 0"
SYS DBA_SUMMARY_KEYS 656 "select u1.name, o1.name, sk.sumcolpos#,
c1.name,
u2.name, o2.name, sd.detailalias,
decode(sk.detailobjtype, 1, 'TABLE', 2, 'VIEW'), c2.name
from sys.sumkey$ sk, sys.obj$ o1, sys.user$ u1, sys.col$ c1, sys.sum$
s,
sys.sumdetail$ sd, sys.obj$ o2, sys.user$ u2, sys.col$ c2
where sk.sumobj# = o1.obj#
AND o1.owner# = u1.user#
AND sk.sumobj# = s.obj#
AND s.containerobj# = c1.obj#
AND c1.col# = sk.containercol#
AND sk.detailobj# = o2.obj#
AND o2.owner# = u2.user#
AND sk.sumobj# = sd.sumobj#
AND sk.detailobj# = sd.detailobj#
AND sk.detailobj# = c2.obj#
AND sk.detailcol# = c2.intcol#
AND bitand(s.pflags, 1048576) = 0"
SYS DBA_SYNONYMS 152 "select u.name, o.name, s.owner, s.name, s.node
from sys.user$ u, sys.syn$ s, sys.obj$ o
where o.obj# = s.obj#
and o.type# = 5
and o.owner# = u.user#"
SYS DBA_SYS_PRIVS 200 "select u.name,spm.name,decode(min(option$),
1,'YES','NO')
from sys.system_privilege_map spm, sys.sysauth$ sa, user$ u
where sa.grantee#=u.user# and sa.privilege#=spm.privilege
group by u.name,spm.name"
SYS DBA_TABLES 3412 "select u.name, o.name, decode(bitand(t.property,
4194400), 0, ts.name, null),
decode(bitand(t.property, 1024), 0, null, co.name),
decode((bitand(t.property, 512)+bitand(t.flags, 536870912)),
0, null, co.name),
decode(bitand(t.property, 32+64), 0, mod(t.pctfree$, 100), 64,
0, null),
decode(bitand(ts.flags, 32), 32, to_number(NULL),
decode(bitand(t.property, 32+64), 0, t.pctused$, 64, 0,
null)),
decode(bitand(t.property, 32), 0, t.initrans, null),
decode(bitand(t.property, 32), 0, t.maxtrans, null),
s.iniexts * ts.blocksize,
decode(bitand(ts.flags, 3), 1, to_number(NULL),
s.extsize * ts.blocksize),
s.minexts, s.maxexts,
decode(bitand(ts.flags, 3), 1, to_number(NULL),
s.extpct),
decode(bitand(ts.flags, 32), 32, to_number(NULL),
decode(bitand(o.flags, 2), 2, 1, decode(s.lists, 0, 1,
s.lists))),
decode(bitand(ts.flags, 32), 32, to_number(NULL),
decode(bitand(o.flags, 2), 2, 1, decode(s.groups, 0, 1,
s.groups))),
decode(bitand(t.property, 32), 32, null,
decode(bitand(t.flags, 32), 0, 'YES', 'NO')),
decode(bitand(t.flags,1), 0, 'Y', 1, 'N', '?'),
t.rowcnt,
decode(bitand(t.property, 64), 0, t.blkcnt, null),
decode(bitand(t.property, 64), 0, t.empcnt, null),
t.avgspc, t.chncnt, t.avgrln, t.avgspc_flb,
decode(bitand(t.property, 64), 0, t.flbcnt, null),
lpad(decode(t.degree, 32767, 'DEFAULT', nvl(t.degree,1)),10),
lpad(decode(t.instances, 32767, 'DEFAULT', nvl(t.instances,1)),
10),
lpad(decode(bitand(t.flags, 8), 8, 'Y', 'N'),5),
decode(bitand(t.flags, 6), 0, 'ENABLED', 'DISABLED'),
t.samplesize, t.analyzetime,
decode(bitand(t.property, 32), 32, 'YES', 'NO'),
decode(bitand(t.property, 64), 64, 'IOT',
decode(bitand(t.property, 512), 512, 'IOT_OVERFLOW',
decode(bitand(t.flags, 536870912), 536870912,
'IOT_MAPPING', null))),
decode(bitand(o.flags, 2), 0, 'N', 2, 'Y', 'N'),
decode(bitand(o.flags, 16), 0, 'N', 16, 'Y', 'N'),
decode(bitand(t.property, 8192), 8192, 'YES',
decode(bitand(t.property, 1), 0, 'NO', 'YES')),
decode(bitand(o.flags, 2), 2, 'DEFAULT',
decode(s.cachehint, 0, 'DEFAULT', 1, 'KEEP', 2,
'RECYCLE', NULL)),
decode(bitand(t.flags, 131072), 131072, 'ENABLED', 'DISABLED'),
decode(bitand(t.flags, 512), 0, 'NO', 'YES'),
decode(bitand(t.flags, 256), 0, 'NO', 'YES'),
decode(bitand(o.flags, 2), 0, NULL,
decode(bitand(t.property, 8388608), 8388608,
'SYS$SESSION', 'SYS$TRANSACTION')),
decode(bitand(t.flags, 1024), 1024, 'ENABLED', 'DISABLED'),
decode(bitand(t.flags, 2097152), 2097152, 'YES', 'NO'),
decode(bitand(t.property, 1024), 0, null, cu.name),
decode(bitand(t.flags, 8388608), 8388608, 'ENABLED',
'DISABLED')
from sys.user$ u, sys.ts$ ts, sys.seg$ s, sys.obj$ co, sys.tab$ t,
sys.obj$ o,
sys.obj$ cx, sys.user$ cu
where o.owner# = u.user#
and o.obj# = t.obj#
and bitand(t.property, 1) = 0
and t.bobj# = co.obj# (+)
and t.ts# = ts.ts#
and t.file# = s.file# (+)
and t.block# = s.block# (+)
and t.ts# = s.ts# (+)
and t.dataobj# = cx.obj# (+)
and cx.owner# = cu.user# (+)"
SYS DBA_TABLESPACES 1025 "select ts.name, ts.blocksize, ts.blocksize *
ts.dflinit,
decode(bitand(ts.flags, 3), 1, to_number(NULL),
ts.blocksize * ts.dflincr),
ts.dflminext,
decode(ts.contents$, 1, to_number(NULL), ts.dflmaxext),
decode(bitand(ts.flags, 3), 1, to_number(NULL),
ts.dflextpct),
ts.blocksize * ts.dflminlen,
decode(ts.online$, 1, 'ONLINE', 2, 'OFFLINE',
4, 'READ ONLY', 'UNDEFINED'),
decode(ts.contents$, 0, (decode(bitand(ts.flags, 16), 16,
'UNDO',
'PERMANENT')), 1, 'TEMPORARY'),
decode(bitand(ts.dflogging, 1), 0, 'NOLOGGING', 1,
'LOGGING'),
decode(bitand(ts.dflogging, 2), 0, 'NO', 2, 'YES'),
decode(ts.bitmapped, 0, 'DICTIONARY', 'LOCAL'),
decode(bitand(ts.flags, 3), 0, 'USER', 1, 'SYSTEM', 2,
'UNIFORM',
'UNDEFINED'),
decode(ts.plugged, 0, 'NO', 'YES'),
decode(bitand(ts.flags,32), 32,'AUTO', 'MANUAL')
from sys.ts$ ts
where ts.online$ != 3"
SYS DBA_TAB_COLS 4700 "select u.name, o.name,
c.name,
decode(c.type#, 1, decode(c.charsetform, 2, 'NVARCHAR2',
'VARCHAR2'),
2, decode(c.scale, null,
decode(c.precision#, null, 'NUMBER',
'FLOAT'),
'NUMBER'),
8, 'LONG',
9, decode(c.charsetform, 2, 'NCHAR VARYING',
'VARCHAR'),
12, 'DATE', 23, 'RAW', 24, 'LONG RAW',
58, nvl2(ac.synobj#, (select o.name from obj$ o
where o.obj#=ac.synobj#), ot.name),
69, 'ROWID',
96, decode(c.charsetform, 2, 'NCHAR', 'CHAR'),
105, 'MLSLABEL',
106, 'MLSLABEL',
111, nvl2(ac.synobj#, (select o.name from obj$
o
where o.obj#=ac.synobj#), ot.name),
112, decode(c.charsetform, 2, 'NCLOB', 'CLOB'),
113, 'BLOB', 114, 'BFILE', 115, 'CFILE',
121, nvl2(ac.synobj#, (select o.name from obj$
o
where o.obj#=ac.synobj#), ot.name),
122, nvl2(ac.synobj#, (select o.name from obj$
o
where o.obj#=ac.synobj#), ot.name),
123, nvl2(ac.synobj#, (select o.name from obj$
o
where o.obj#=ac.synobj#), ot.name),
178, 'TIME(' ||c.scale|| ')',
179, 'TIME(' ||c.scale|| ')' || ' WITH TIME
ZONE',
180, 'TIMESTAMP(' ||c.scale|| ')',
181, 'TIMESTAMP(' ||c.scale|| ')' || ' WITH
TIME ZONE',
231, 'TIMESTAMP(' ||c.scale|| ')' || ' WITH
LOCAL TIME ZONE',
182, 'INTERVAL YEAR(' ||c.precision#||') TO
MONTH',
183, 'INTERVAL DAY(' ||c.precision#||') TO
SECOND(' ||
c.scale || ')',
208, 'UROWID',
'UNDEFINED'),
decode(c.type#, 111, 'REF'),
nvl2(ac.synobj#, (select u.name from user$ u, obj$ o
where o.owner#=u.user# and o.obj#=ac.synobj#), ut.name),
c.length, c.precision#, c.scale,
decode(sign(c.null$),-1,'D', 0, 'Y', 'N'),
decode(c.col#, 0, to_number(null), c.col#), c.deflength,
c.default$, h.distcnt, h.lowval, h.hival, h.density,
h.null_cnt,
decode(h.row_cnt, 0, 1, 1, 1, h.row_cnt-1), h.timestamp#,
h.sample_size,
decode(c.charsetform, 1, 'CHAR_CS',
2, 'NCHAR_CS',
3, NLS_CHARSET_NAME(c.charsetid),
4, 'ARG:'||c.charsetid),
decode(c.charsetid, 0, to_number(NULL),
nls_charset_decl_len(c.length,
c.charsetid)),
decode(bitand(h.spare2, 2), 2, 'YES', 'NO'),
decode(bitand(h.spare2, 1), 1, 'YES', 'NO'),
h.avgcln,
c.spare3,
decode(c.type#, 1, decode(bitand(c.property, 8388608), 0, 'B',
'C'),
96, decode(bitand(c.property, 8388608), 0, 'B',
'C'),
null),
decode(bitand(ac.flags, 128), 128, 'YES', 'NO'),
decode(o.status, 1, decode(bitand(ac.flags, 256), 256, 'NO',
'YES'),
decode(bitand(ac.flags, 2), 2, 'NO',
decode(bitand(ac.flags, 4), 4, 'NO',
decode(bitand(ac.flags, 8), 8,
'NO',
'N/A')))),
decode(c.property, 0, 'NO', decode(bitand(c.property, 32), 32,
'YES',
'NO')),
decode(c.property, 0, 'NO', decode(bitand(c.property, 8), 8,
'YES',
'NO')),
decode(c.segcol#, 0, to_number(null), c.segcol#), c.intcol#
from sys.col$ c, sys.obj$ o, sys.hist_head$ h, sys.user$ u,
sys.coltype$ ac, sys.obj$ ot, sys.user$ ut
where o.obj# = c.obj#
and o.owner# = u.user#
and c.obj# = h.obj#(+) and c.intcol# = h.intcol#(+)
and c.obj# = ac.obj#(+) and c.intcol# = ac.intcol#(+)
and ac.toid = ot.oid$(+)
and ot.type#(+) = 13
and ot.owner# = ut.user#(+)
and (o.type# in (3, 4) /*
cluster, view */
or
(o.type# = 2 /* tables, excluding iot - overflow and nested
tables */
and
not exists (select null
from sys.tab$ t
where t.obj# = o.obj#
and (bitand(t.property, 512) = 512 or
bitand(t.property, 8192) = 8192))))"
SYS DBA_TAB_COLUMNS 502 "select OWNER, TABLE_NAME,
COLUMN_NAME, DATA_TYPE, DATA_TYPE_MOD, DATA_TYPE_OWNER,
DATA_LENGTH, DATA_PRECISION, DATA_SCALE, NULLABLE, COLUMN_ID,
DEFAULT_LENGTH, DATA_DEFAULT, NUM_DISTINCT, LOW_VALUE,
HIGH_VALUE,
DENSITY, NUM_NULLS, NUM_BUCKETS, LAST_ANALYZED, SAMPLE_SIZE,
CHARACTER_SET_NAME, CHAR_COL_DECL_LENGTH,
GLOBAL_STATS, USER_STATS, AVG_COL_LEN, CHAR_LENGTH, CHAR_USED,
V80_FMT_IMAGE, DATA_UPGRADED
from DBA_TAB_COLS
where HIDDEN_COLUMN = 'NO'"
SYS DBA_TAB_COL_STATISTICS 241 "select owner, table_name, column_name,
num_distinct, low_value, high_value,
density, num_nulls, num_buckets, last_analyzed, sample_size,
global_stats, user_stats, avg_col_len
from dba_tab_columns
where last_analyzed is not null"
SYS DBA_TAB_COMMENTS 717 "select u.name, o.name,
decode(o.type#, 0, 'NEXT OBJECT', 1, 'INDEX', 2, 'TABLE', 3,
'CLUSTER',
4, 'VIEW', 5, 'SYNONYM', 'UNDEFINED'),
c.comment$
from sys.obj$ o, sys.user$ u, sys.com$ c
where o.owner# = u.user#
and (o.type# in (4) /
* view */
or
(o.type# = 2 /* tables, excluding iot - overflow and nested
tables */
and
not exists (select null
from sys.tab$ t
where t.obj# = o.obj#
and (bitand(t.property, 512) = 512 or
bitand(t.property, 8192) = 8192))))
and o.obj# = c.obj#(+)
and c.col#(+) is null"
SYS DBA_TAB_HISTOGRAMS 2446 "select /*+ ordered */ u.name,
o.name,
decode(bitand(c.property, 1), 1, a.name, c.name),
h.bucket,
h.endpoint,
h.epvalue
from sys.user$ u, sys.obj$ o, sys.col$ c, sys.histgrm$ h, sys.attrcol$
a
where o.obj# = c.obj#
and o.owner# = u.user#
and c.obj# = h.obj# and c.intcol# = h.intcol#
and (o.type# in (3, 4) /*
cluster, view */
or
(o.type# = 2 /* tables, excluding iot - overflow and nested
tables */
and
not exists (select null
from sys.tab$ t
where t.obj# = o.obj#
and (bitand(t.property, 512) = 512 or
bitand(t.property, 8192) = 8192))))
and c.obj# = a.obj#(+)
and c.intcol# = a.intcol#(+)
union all
select /*+ ordered */ u.name,
o.name,
decode(bitand(c.property, 1), 1, a.name, c.name),
0,
h.minimum,
null
from sys.user$ u, sys.obj$ o, sys.col$ c, sys.hist_head$ h, sys.attrcol
$ a
where o.obj# = c.obj#
and o.owner# = u.user#
and c.obj# = h.obj# and c.intcol# = h.intcol#
and (o.type# in (3, 4) /*
cluster, view */
or
(o.type# = 2 /* tables, excluding iot - overflow and nested
tables */
and
not exists (select null
from sys.tab$ t
where t.obj# = o.obj#
and (bitand(t.property, 512) = 512 or
bitand(t.property, 8192) = 8192))))
and h.bucket_cnt = 1
and c.obj# = a.obj#(+)
and c.intcol# = a.intcol#(+)
union all
select /*+ ordered */ u.name,
o.name,
decode(bitand(c.property, 1), 1, a.name, c.name),
1,
h.maximum,
null
from sys.user$ u, sys.obj$ o, sys.col$ c, sys.hist_head$ h, sys.attrcol
$ a
where o.obj# = c.obj#
and o.owner# = u.user#
and c.obj# = h.obj# and c.intcol# = h.intcol#
and (o.type# in (3, 4) /*
cluster, view */
or
(o.type# = 2 /* tables, excluding iot - overflow and nested
tables */
and
not exists (select null
from sys.tab$ t
where t.obj# = o.obj#
and (bitand(t.property, 512) = 512 or
bitand(t.property, 8192) = 8192))))
and h.bucket_cnt = 1
and c.obj# = a.obj#(+)
and c.intcol# = a.intcol#(+)"
SYS DBA_TAB_MODIFICATIONS 933 "select u.name, o.name, null, null,
m.inserts, m.updates, m.deletes, m.timestamp,
decode(bitand(m.flags,1),1,'YES','NO')
from sys.mon_mods$ m, sys.obj$ o, sys.tab$ t, sys.user$ u
where o.obj# = m.obj# and o.obj# = t.obj# and o.owner# = u.user#
union
select u.name, o.name, o.subname, null,
m.inserts, m.updates, m.deletes, m.timestamp,
decode(bitand(m.flags,1),1,'YES','NO')
from sys.mon_mods$ m, sys.obj$ o, sys.user$ u
where o.obj# = m.obj# and o.owner# = u.user# and
o.obj# in (select obj# from sys.tabpart$
union select obj# from sys.tabsubpart$)
union
select u.name, o.name, o2.subname, o.subname,
m.inserts, m.updates, m.deletes, m.timestamp,
decode(bitand(m.flags,1),1,'YES','NO')
from sys.mon_mods$ m, sys.obj$ o, sys.tabsubpart$ tsp, sys.obj$ o2,
sys.user$ u
where o.obj# = m.obj# and o.owner# = u.user# and
o.obj# = tsp.obj# and o2.obj# = tsp.pobj#"
SYS DBA_TAB_PARTITIONS 3191 "select u.name, o.name, 'NO', o.subname,
0,
tp.hiboundval, tp.hiboundlen, tp.part#, ts.name,
tp.pctfree$,
decode(bitand(ts.flags, 32), 32, to_number(NULL), tp.pctused$),
initrans, maxtrans, s.iniexts * ts.blocksize,
decode(bitand(ts.flags, 3), 1, to_number(NULL),
s.extsize * ts.blocksize),
s.minexts, s.maxexts,
decode(bitand(ts.flags, 3), 1, to_number(NULL),
s.extpct),
decode(bitand(ts.flags, 32), 32, to_number(NULL),
decode(s.lists, 0, 1, s.lists)),
decode(bitand(ts.flags, 32), 32, to_number(NULL),
decode(s.groups, 0, 1, s.groups)),
decode(mod(trunc(tp.flags / 4), 2), 0, 'YES', 'NO'),
decode(bitand(s.spare1, 2048), 2048, 'ENABLED', 'DISABLED'),
tp.rowcnt, tp.blkcnt, tp.empcnt, tp.avgspc, tp.chncnt,
tp.avgrln,
tp.samplesize, tp.analyzetime,
decode(s.cachehint, 0, 'DEFAULT', 1, 'KEEP', 2, 'RECYCLE',
NULL),
decode(bitand(tp.flags, 16), 0, 'NO', 'YES'),
decode(bitand(tp.flags, 8), 0, 'NO', 'YES')
from obj$ o, tabpart$ tp, ts$ ts, sys.seg$ s, user$ u
where o.obj# = tp.obj# and ts.ts# = tp.ts# and u.user# = o.owner# and
tp.file#=s.file# and tp.block#=s.block# and tp.ts#=s.ts#
union all -- IOT Partitions
select u.name, o.name, 'NO', o.subname, 0,
tp.hiboundval, tp.hiboundlen, tp.part#, NULL,

TO_NUMBER(NULL),TO_NUMBER(NULL),TO_NUMBER(NULL),TO_NUMBER(NULL),
TO_NUMBER(NULL),

TO_NUMBER(NULL),TO_NUMBER(NULL),TO_NUMBER(NULL),TO_NUMBER(NULL),
TO_NUMBER(NULL),TO_NUMBER(NULL),
decode(mod(trunc(tp.flags / 4), 2), 0, 'YES', 'NO'),
'N/A',
tp.rowcnt, TO_NUMBER(NULL), TO_NUMBER(NULL), 0, tp.chncnt,
tp.avgrln,
tp.samplesize, tp.analyzetime, NULL,
decode(bitand(tp.flags, 16), 0, 'NO', 'YES'),
decode(bitand(tp.flags, 8), 0, 'NO', 'YES')
from obj$ o, tabpart$ tp, user$ u
where o.obj# = tp.obj# and o.owner# = u.user# and
tp.file#=0 and tp.block#=0
union all -- Composite Partitions
select u.name, o.name, 'YES', o.subname, tcp.subpartcnt,
tcp.hiboundval, tcp.hiboundlen, tcp.part#, ts.name,
tcp.defpctfree, decode(bitand(ts.flags, 32), 32,
to_number(NULL),
tcp.defpctused),
tcp.definitrans, tcp.defmaxtrans,
tcp.definiexts, tcp.defextsize, tcp.defminexts, tcp.defmaxexts,
tcp.defextpct,
decode(bitand(ts.flags, 32), 32, to_number(NULL),
tcp.deflists),
decode(bitand(ts.flags, 32), 32, to_number(NULL),
tcp.defgroups),
decode(tcp.deflogging, 0, 'NONE', 1, 'YES', 2, 'NO',
'UNKNOWN'),
decode(mod(tcp.spare2,256), 0, 'NONE', 1, 'ENABLED', 2,
'DISABLED',
'UNKNOWN'),
tcp.rowcnt, tcp.blkcnt, tcp.empcnt, tcp.avgspc, tcp.chncnt,
tcp.avgrln,
tcp.samplesize, tcp.analyzetime,
decode(tcp.defbufpool, 0, 'DEFAULT', 1, 'KEEP', 2, 'RECYCLE',
NULL),
decode(bitand(tcp.flags, 16), 0, 'NO', 'YES'),
decode(bitand(tcp.flags, 8), 0, 'NO', 'YES')
from obj$ o, tabcompart$ tcp, ts$ ts, user$ u
where o.obj# = tcp.obj# and tcp.defts# = ts.ts# and u.user# =
o.owner#"
SYS DBA_TAB_PRIVS 420 "select ue.name, u.name, o.name, ur.name,
tpm.name,
decode(mod(oa.option$,2), 1, 'YES', 'NO'),
decode(bitand(oa.option$,2), 2, 'YES', 'NO')
from sys.objauth$ oa, sys.obj$ o, sys.user$ u, sys.user$ ur, sys.user$
ue,
table_privilege_map tpm
where oa.obj# = o.obj#
and oa.grantor# = ur.user#
and oa.grantee# = ue.user#
and oa.col# is null
and oa.privilege# = tpm.privilege
and u.user# = o.owner#"
SYS DBA_TAB_SUBPARTITIONS 1422 "select u.name, po.name, po.subname,
so.subname,
tsp.hiboundval, tsp.hiboundlen, tsp.subpart#,
ts.name, tsp.pctfree$,
decode(bitand(ts.flags, 32), 32, to_number(NULL), tsp.pctused
$),
tsp.initrans, tsp.maxtrans,
s.iniexts * ts.blocksize,
decode(bitand(ts.flags, 3), 1, to_number(NULL),
s.extsize * ts.blocksize),
s.minexts, s.maxexts,
decode(bitand(ts.flags, 3), 1, to_number(NULL),
s.extpct),
decode(bitand(ts.flags, 32), 32, to_number(NULL),
decode(s.lists, 0, 1, s.lists)),
decode(bitand(ts.flags, 32), 32, to_number(NULL),
decode(s.groups, 0, 1, s.groups)),
decode(mod(trunc(tsp.flags / 4), 2), 0, 'YES', 'NO'),
decode(bitand(s.spare1, 2048), 2048, 'ENABLED', 'DISABLED'),
tsp.rowcnt, tsp.blkcnt, tsp.empcnt, tsp.avgspc, tsp.chncnt,
tsp.avgrln, tsp.samplesize, tsp.analyzetime,
decode(s.cachehint, 0, 'DEFAULT', 1, 'KEEP', 2, 'RECYCLE',
NULL),
decode(bitand(tsp.flags, 16), 0, 'NO', 'YES'),
decode(bitand(tsp.flags, 8), 0, 'NO', 'YES')
from sys.obj$ so, sys.obj$ po, sys.tabsubpart$ tsp, sys.ts$ ts,
sys.seg$ s, sys.user$ u
where so.obj# = tsp.obj# and po.obj# = tsp.pobj# and tsp.ts# = ts.ts#
and
u.user# = po.owner# and tsp.file# = s.file# and tsp.block# =
s.block# and
tsp.ts# = s.ts#"
SYS DBA_TEMPLATE_REFGROUPS 400 "select rg.refresh_group_id,
rg.refresh_group_name, rt.refresh_template_id,
rt.refresh_template_name, rg.rollback_seg, rg.start_date,
rg.interval
from system.repcat$_refresh_templates rt,
system.repcat$_template_refgroups rg,
system.repcat$_template_types tt
where rt.refresh_template_id = rg.refresh_template_id
and rt.template_type_id = tt.template_type_id
and bitand(rawtohex(tt.flags),1) = 1"
SYS DBA_TEMPLATE_TARGETS 133 "select tt.template_target_id,
tt.target_database, tt.target_comment,
tt.connect_string
from system.repcat$_template_targets tt"
SYS DBA_TEMP_FILES 780 "select /*+ ordered use_nl(hc) */
v.fnnam, hc.ktfthctfno, ts.name,
decode(hc.ktfthccval, 0, ts.blocksize * hc.ktfthcsz, NULL),
decode(hc.ktfthccval, 0, hc.ktfthcsz, NULL), 'AVAILABLE',
decode(hc.ktfthccval, 0, hc.ktfthcfno, NULL),
decode(hc.ktfthccval, 0, decode(hc.ktfthcinc, 0, 'NO', 'YES'),
NULL),
decode(hc.ktfthccval, 0, ts.blocksize * hc.ktfthcmaxsz, NULL),
decode(hc.ktfthccval, 0, hc.ktfthcmaxsz, NULL),
decode(hc.ktfthccval, 0, hc.ktfthcinc, NULL),
decode(hc.ktfthccval, 0, hc.ktfthcusz * ts.blocksize, NULL),
decode(hc.ktfthccval, 0, hc.ktfthcusz, NULL)
from sys.x$kccfn v, sys.x$ktfthc hc, sys.ts$ ts
where v.fntyp = 7 and v.fnnam is not null
and v.fnfno = hc.ktfthctfno
and hc.ktfthctsn = ts.ts#"
SYS DBA_TRANSFORMATIONS 172 "SELECT t.transformation_id, u.name,
t.name,
t.from_schema||'.'||t.from_type, t.to_schema||'.'||t.to_type
FROM transformations$ t, sys.user$ u
WHERE u.name = t.owner"
SYS DBA_TRIGGERS 10603 "select trigusr.name, trigobj.name,
decode(t.type#, 0, 'BEFORE STATEMENT',
1, 'BEFORE EACH ROW',
2, 'AFTER STATEMENT',
3, 'AFTER EACH ROW',
4, 'INSTEAD OF',
'UNDEFINED'),
decode(t.insert$*100 + t.update$*10 + t.delete$,
100, 'INSERT',
010, 'UPDATE',
001, 'DELETE',
110, 'INSERT OR UPDATE',
101, 'INSERT OR DELETE',
011, 'UPDATE OR DELETE',
111, 'INSERT OR UPDATE OR DELETE', 'ERROR'),
tabusr.name,
decode(bitand(t.property, 1), 1, 'VIEW',
0, 'TABLE',
'UNDEFINED'),
tabobj.name, NULL,
'REFERENCING NEW AS '||t.refnewname||' OLD AS '||t.refoldname,
t.whenclause,decode(t.enabled, 0, 'DISABLED', 1, 'ENABLED', 'ERROR'),
t.definition,
decode(bitand(t.property, 2), 2, 'CALL',
'PL/SQL '),
t.action#
from sys.obj$ trigobj, sys.obj$ tabobj, sys.trigger$ t,
sys.user$ tabusr, sys.user$ trigusr
where (trigobj.obj# = t.obj# and
tabobj.obj# = t.baseobject and
tabobj.owner# = tabusr.user# and
trigobj.owner# = trigusr.user# and
bitand(t.property, 63) < 8 )
union all
select trigusr.name, trigobj.name,
decode(t.type#, 0, 'BEFORE EVENT',
2, 'AFTER EVENT',
'UNDEFINED'),
decode(bitand(t.sys_evts, 1), 1, 'STARTUP ') ||
decode(bitand(t.sys_evts, 2), 2,
decode(sign(bitand(t.sys_evts, 1)), 1, 'OR SHUTDOWN ',
'SHUTDOWN ')) ||
decode(bitand(t.sys_evts, 4), 4,
decode(sign(bitand(t.sys_evts, 3)), 1, 'OR ERROR ',
'ERROR ')) ||
decode(bitand(t.sys_evts, 8), 8,
decode(sign(bitand(t.sys_evts, 7)), 1, 'OR LOGON ',
'LOGON ')) ||
decode(bitand(t.sys_evts, 16), 16,
decode(sign(bitand(t.sys_evts, 15)), 1, 'OR LOGOFF ',
'LOGOFF ')) ||
decode(bitand(t.sys_evts, 262176), 32,
decode(sign(bitand(t.sys_evts, 31)), 1, 'OR CREATE ',
'CREATE ')) ||
decode(bitand(t.sys_evts, 262208), 64,
decode(sign(bitand(t.sys_evts, 63)), 1, 'OR ALTER ',
'ALTER ')) ||
decode(bitand(t.sys_evts, 262272), 128,
decode(sign(bitand(t.sys_evts, 127)), 1, 'OR DROP ',
'DROP ')) ||
decode (bitand(t.sys_evts, 262400), 256,
decode(sign(bitand(t.sys_evts, 255)), 1, 'OR ANALYZE ',
'ANALYZE ')) ||
decode (bitand(t.sys_evts, 262656), 512,
decode(sign(bitand(t.sys_evts, 511)), 1, 'OR COMMENT ',
'COMMENT ')) ||
decode (bitand(t.sys_evts, 263168), 1024,
decode(sign(bitand(t.sys_evts, 1023)), 1, 'OR GRANT ',
'GRANT ')) ||
decode (bitand(t.sys_evts, 264192), 2048,
decode(sign(bitand(t.sys_evts, 2047)), 1, 'OR REVOKE ',
'REVOKE ')) ||
decode (bitand(t.sys_evts, 266240), 4096,
decode(sign(bitand(t.sys_evts, 4095)), 1, 'OR TRUNCATE ',
'TRUNCATE ')) ||
decode (bitand(t.sys_evts, 270336), 8192,
decode(sign(bitand(t.sys_evts, 8191)), 1, 'OR RENAME ',
'RENAME ')) ||
decode (bitand(t.sys_evts, 278528), 16384,
decode(sign(bitand(t.sys_evts, 16383)), 1, 'OR ASSOCIATE
STATISTICS ',
'ASSOCIATE
STATISTICS ')) ||
decode (bitand(t.sys_evts, 294912), 32768,
decode(sign(bitand(t.sys_evts, 32767)), 1, 'OR AUDIT ',
'AUDIT ')) ||
decode (bitand(t.sys_evts, 327680), 65536,
decode(sign(bitand(t.sys_evts, 65535)), 1,
'OR DISASSOCIATE STATISTICS ', 'DISASSOCIATE STATISTICS
')) ||
decode (bitand(t.sys_evts, 393216), 131072,
decode(sign(bitand(t.sys_evts, 131071)), 1, 'OR NOAUDIT ',
'NOAUDIT ')) ||
decode (bitand(t.sys_evts, 262144), 262144,
decode(sign(bitand(t.sys_evts, 31)), 1, 'OR DDL ',
'DDL ')) ||
decode (bitand(t.sys_evts, 8388608), 8388608,
decode(sign(bitand(t.sys_evts, 8388607)), 1, 'OR SUSPEND ',
'SUSPEND ')),
'SYS',
'DATABASE ',
NULL,
NULL,
'REFERENCING NEW AS '||t.refnewname||' OLD AS '||t.refoldname
|| decode(bitand(t.property,32),32,' PARENT AS ' ||
t.refprtname,NULL),
t.whenclause,decode(t.enabled, 0, 'DISABLED', 1, 'ENABLED', 'ERROR'),
t.definition,
decode(bitand(t.property, 2), 2, 'CALL',
'PL/SQL '),
t.action#
from sys.obj$ trigobj, sys.trigger$ t, sys.user$ trigusr
where (trigobj.obj# = t.obj# and
trigobj.owner# = trigusr.user# and
bitand(t.property, 63) >= 8 and bitand(t.property, 63) < 16)
union all
select trigusr.name, trigobj.name,
decode(t.type#, 0, 'BEFORE EVENT',
2, 'AFTER EVENT',
'UNDEFINED'),
decode(bitand(t.sys_evts, 1), 1, 'STARTUP ') ||
decode(bitand(t.sys_evts, 2), 2,
decode(sign(bitand(t.sys_evts, 1)), 1, 'OR SHUTDOWN ',
'SHUTDOWN ')) ||
decode(bitand(t.sys_evts, 4), 4,
decode(sign(bitand(t.sys_evts, 3)), 1, 'OR ERROR ',
'ERROR ')) ||
decode(bitand(t.sys_evts, 8), 8,
decode(sign(bitand(t.sys_evts, 7)), 1, 'OR LOGON ',
'LOGON ')) ||
decode(bitand(t.sys_evts, 16), 16,
decode(sign(bitand(t.sys_evts, 15)), 1, 'OR LOGOFF ',
'LOGOFF ')) ||
decode(bitand(t.sys_evts, 262176), 32,
decode(sign(bitand(t.sys_evts, 31)), 1, 'OR CREATE ',
'CREATE ')) ||
decode(bitand(t.sys_evts, 262208), 64,
decode(sign(bitand(t.sys_evts, 63)), 1, 'OR ALTER ',
'ALTER ')) ||
decode(bitand(t.sys_evts, 262272), 128,
decode(sign(bitand(t.sys_evts, 127)), 1, 'OR DROP ',
'DROP ')) ||
decode (bitand(t.sys_evts, 262400), 256,
decode(sign(bitand(t.sys_evts, 255)), 1, 'OR ANALYZE ',
'ANALYZE ')) ||
decode (bitand(t.sys_evts, 262656), 512,
decode(sign(bitand(t.sys_evts, 511)), 1, 'OR COMMENT ',
'COMMENT ')) ||
decode (bitand(t.sys_evts, 263168), 1024,
decode(sign(bitand(t.sys_evts, 1023)), 1, 'OR GRANT ',
'GRANT ')) ||
decode (bitand(t.sys_evts, 264192), 2048,
decode(sign(bitand(t.sys_evts, 2047)), 1, 'OR REVOKE ',
'REVOKE ')) ||
decode (bitand(t.sys_evts, 266240), 4096,
decode(sign(bitand(t.sys_evts, 4095)), 1, 'OR TRUNCATE ',
'TRUNCATE ')) ||
decode (bitand(t.sys_evts, 270336), 8192,
decode(sign(bitand(t.sys_evts, 8191)), 1, 'OR RENAME ',
'RENAME ')) ||
decode (bitand(t.sys_evts, 278528), 16384,
decode(sign(bitand(t.sys_evts, 16383)), 1, 'OR ASSOCIATE
STATISTICS ',
'ASSOCIATE
STATISTICS ')) ||
decode (bitand(t.sys_evts, 294912), 32768,
decode(sign(bitand(t.sys_evts, 32767)), 1, 'OR AUDIT ',
'AUDIT ')) ||
decode (bitand(t.sys_evts, 327680), 65536,
decode(sign(bitand(t.sys_evts, 65535)), 1,
'OR DISASSOCIATE STATISTICS ', 'DISASSOCIATE STATISTICS
')) ||
decode (bitand(t.sys_evts, 393216), 131072,
decode(sign(bitand(t.sys_evts, 131071)), 1, 'OR NOAUDIT ',
'NOAUDIT ')) ||
decode (bitand(t.sys_evts, 262144), 262144,
decode(sign(bitand(t.sys_evts, 31)), 1, 'OR DDL ',
'DDL ')) ||
decode (bitand(t.sys_evts, 8388608), 8388608,
decode(sign(bitand(t.sys_evts, 8388607)), 1, 'OR SUSPEND ',
'SUSPEND ')),
tabusr.name,
'SCHEMA',
NULL,
NULL,
'REFERENCING NEW AS '||t.refnewname||' OLD AS '||t.refoldname,
t.whenclause,decode(t.enabled, 0, 'DISABLED', 1, 'ENABLED', 'ERROR'),
t.definition,
decode(bitand(t.property, 2), 2, 'CALL',
'PL/SQL '),
t.action#
from sys.obj$ trigobj, sys.trigger$ t, sys.user$ tabusr, sys.user$
trigusr
where (trigobj.obj# = t.obj# and
trigobj.owner# = trigusr.user# and
bitand(t.property, 63) >= 16 and bitand(t.property, 63) < 32
and
tabusr.user# = t.baseobject)
union all
select trigusr.name, trigobj.name,
decode(t.type#, 0, 'BEFORE STATEMENT',
1, 'BEFORE EACH ROW',
2, 'AFTER STATEMENT',
3, 'AFTER EACH ROW',
4, 'INSTEAD OF',
'UNDEFINED'),
decode(t.insert$*100 + t.update$*10 + t.delete$,
100, 'INSERT',
010, 'UPDATE',
001, 'DELETE',
110, 'INSERT OR UPDATE',
101, 'INSERT OR DELETE',
011, 'UPDATE OR DELETE',
111, 'INSERT OR UPDATE OR DELETE', 'ERROR'),
tabusr.name,
decode(bitand(t.property, 1), 1, 'VIEW',
0, 'TABLE',
'UNDEFINED'),
tabobj.name, ntcol.name,
'REFERENCING NEW AS '||t.refnewname||' OLD AS '||t.refoldname ||
' PARENT AS ' || t.refprtname,
t.whenclause,decode(t.enabled, 0, 'DISABLED', 1, 'ENABLED', 'ERROR'),
t.definition,
decode(bitand(t.property, 2), 2, 'CALL',
'PL/SQL '),
t.action#
from sys.obj$ trigobj, sys.obj$ tabobj, sys.trigger$ t,
sys.user$ tabusr, sys.user$ trigusr, sys.viewtrcol$ ntcol
where (trigobj.obj# = t.obj# and
tabobj.obj# = t.baseobject and
tabobj.owner# = tabusr.user# and
trigobj.owner# = trigusr.user# and
t.nttrigcol = ntcol.intcol# and
t.nttrigatt = ntcol.attribute# and
t.baseobject = ntcol.obj# and
bitand(t.property, 63) >= 32)"
SYS DBA_TRIGGER_COLS 7640 "select /*+ ORDERED NOCOST */ u.name,
o.name, u2.name, o2.name,c.name,
max(decode(tc.type#,0,'YES','NO')) COLUMN_LIST,
decode(sum(decode(tc.type#, 5, 1, -- one occurrence of new in
6, 2, -- one occurrence of old in
9, 4, -- one occurrence of new out
10, 8, -- one occurrence of old out
(impossible)
13, 5, -- one occurrence of new in out
14, 10, -- one occurrence of old in out
(imp.)
20, 16, -- one occurrence of parent in
24, 32, -- one occurrence of parent out
(imp)
28, 64, -- one occurrence of parent in
out (imp)
null)
), -- result in the following combinations across
occurrences
1, 'NEW IN',
2, 'OLD IN',
3, 'NEW IN OLD IN',
4, 'NEW OUT',
5, 'NEW IN OUT',
6, 'NEW OUT OLD IN',
7, 'NEW IN OUT OLD IN',
16, 'PARENT IN',
'NONE')
from sys.trigger$ t, sys.obj$ o, sys.user$ u, sys.user$ u2,
sys.col$ c, sys.obj$ o2, sys.triggercol$ tc
where t.obj# = tc.obj# -- find corresponding trigger definition
and o.obj# = t.obj# -- and corresponding trigger name
and c.obj# = t.baseobject -- and corresponding row in COL$ of
and c.intcol# = tc.intcol# -- the referenced column
and bitand(c.property,32768) != 32768 -- not unused columns
and o2.obj# = t.baseobject -- and name of the table containing the
trigger
and u2.user# = o2.owner# -- and name of the user who owns the table
and u.user# = o.owner# -- and name of user who owns the trigger
and bitand(c.property,1) <> 1 -- and the col is not an ADT column
and (bitand(t.property,32) <> 32 -- and it is not a nested table col
or
bitand(tc.type#,16) = 16) -- or it is a PARENT type column
group by u.name, o.name, u2.name, o2.name, c.name
union all
select /*+ ORDERED NOCOST */ u.name, o.name, u2.name, o2.name,ac.name,
max(decode(tc.type#,0,'YES','NO')) COLUMN_LIST,
decode(sum(decode(tc.type#, 5, 1, -- one occurrence of new in
6, 2, -- one occurrence of old in
9, 4, -- one occurrence of new out
10, 8, -- one occurrence of old out
(impossible)
13, 5, -- one occurrence of new in out
14, 10, -- one occurrence of old in out
(imp.)
20, 16, -- one occurrence of parent in
24, 32, -- one occurrence of parent out
(imp)
28, 64, -- one occurrence of parent in
out (imp)
null)
), -- result in the following combinations across
occurrences
1, 'NEW IN',
2, 'OLD IN',
3, 'NEW IN OLD IN',
4, 'NEW OUT',
5, 'NEW IN OUT',
6, 'NEW OUT OLD IN',
7, 'NEW IN OUT OLD IN',
16, 'PARENT IN',
'NONE')
from sys.trigger$ t, sys.obj$ o, sys.user$ u, sys.user$ u2,
sys.col$ c, sys.obj$ o2, sys.triggercol$ tc, sys.attrcol$ ac
where t.obj# = tc.obj# -- find corresponding trigger definition
and o.obj# = t.obj# -- and corresponding trigger name
and c.obj# = t.baseobject -- and corresponding row in COL$ of
and c.intcol# = tc.intcol# -- the referenced column
and bitand(c.property,32768) != 32768 -- not unused columns
and o2.obj# = t.baseobject -- and name of the table containing the
trigger
and u2.user# = o2.owner# -- and name of the user who owns the table
and u.user# = o.owner# -- and name of user who owns the trigger
and bitand(c.property,1) = 1 -- and it is an ADT attribute
and ac.intcol# = c.intcol# -- and the attribute name
and (bitand(t.property,32) <> 32 -- and it is not a nested table col
or
bitand(tc.type#,16) = 16) -- or it is a PARENT type column
group by u.name, o.name, u2.name, o2.name, ac.name
union all
select /*+ ORDERED NOCOST */ u.name, o.name, u2.name,
o2.name,attr.name,
max(decode(tc.type#,0,'YES','NO')) COLUMN_LIST,
decode(sum(decode(tc.type#, 5, 1, -- one occurrence of new in
6, 2, -- one occurrence of old in
9, 4, -- one occurrence of new out
10, 8, -- one occurrence of old out
(impossible)
13, 5, -- one occurrence of new in out
14, 10, -- one occurrence of old in out
(imp.)
null)
), -- result in the following combinations across
occurrences
1, 'NEW IN',
2, 'OLD IN',
3, 'NEW IN OLD IN',
4, 'NEW OUT',
5, 'NEW IN OUT',
6, 'NEW OUT OLD IN',
7, 'NEW IN OUT OLD IN',
'NONE')
from sys.trigger$ t, sys.obj$ o, sys.user$ u, sys.user$ u2,
sys.obj$ o2, sys.triggercol$ tc,
sys.collection$ coll, sys.coltype$ ctyp, sys.attribute$ attr
where t.obj# = tc.obj# -- find corresponding trigger definition
and o.obj# = t.obj# -- and corresponding trigger name
and o2.obj# = t.baseobject -- and name of the table containing the
trigger
and u2.user# = o2.owner# -- and name of the user who owns the table
and u.user# = o.owner# -- and name of user who owns the trigger
and bitand(t.property,32) = 32 -- and it is not a nested table col
and bitand(tc.type#,16) <> 16 -- and it is not a PARENT type column
and ctyp.intcol# = t.nttrigcol -- and get the column type for the
nested table
and ctyp.toid = coll.toid -- get the collection toid
and ctyp.version# = coll.version# -- get the collection version
and attr.attribute# = tc.intcol# -- get the attribute number
and attr.toid = coll.elem_toid -- get the attribute toid
and attr.version# = coll.version# -- get the attribute version
group by u.name, o.name, u2.name, o2.name, attr.name
union all
select /*+ ORDERED NOCOST */ u.name, o.name, u2.name,
o2.name,'COLUMN_VALUE',
max(decode(tc.type#,0,'YES','NO')) COLUMN_LIST,
decode(sum(decode(tc.type#, 5, 1, -- one occurrence of new in
6, 2, -- one occurrence of old in
9, 4, -- one occurrence of new out
10, 8, -- one occurrence of old out
(impossible)
13, 5, -- one occurrence of new in out
14, 10, -- one occurrence of old in out
(imp.)
null)
), -- result in the following combinations across
occurrences
1, 'NEW IN',
2, 'OLD IN',
3, 'NEW IN OLD IN',
4, 'NEW OUT',
5, 'NEW IN OUT',
6, 'NEW OUT OLD IN',
7, 'NEW IN OUT OLD IN',
'NONE')
from sys.trigger$ t, sys.obj$ o, sys.user$ u, sys.user$ u2,
sys.obj$ o2, sys.triggercol$ tc
where t.obj# = tc.obj# -- find corresponding trigger definition
and o.obj# = t.obj# -- and corresponding trigger name
and o2.obj# = t.baseobject -- and name of the table containing the
trigger
and u2.user# = o2.owner# -- and name of the user who owns the table
and u.user# = o.owner# -- and name of user who owns the trigger
and bitand(t.property,32) = 32 -- and it is not a nested table col
and bitand(tc.type#,16) <> 16 -- and it is not a PARENT type column
and tc.intcol# = 0
group by u.name, o.name, u2.name, o2.name,'COLUMN_VALUE'"
SYS DBA_TS_QUOTAS 257 "select ts.name, u.name,
q.blocks * ts.blocksize,
decode(q.maxblocks, -1, -1, q.maxblocks * ts.blocksize),
q.blocks, q.maxblocks
from sys.tsq$ q, sys.ts$ ts, sys.user$ u
where q.ts# = ts.ts#
and q.user# = u.user#
and q.maxblocks != 0"
SYS DBA_TYPES 870 "select decode(bitand(t.properties, 64), 64, null,
u.name), o.name, t.toid,
decode(t.typecode, 108, 'OBJECT',
122, 'COLLECTION',
o.name),
t.attributes, t.methods,
decode(bitand(t.properties, 16), 16, 'YES', 0, 'NO'),
decode(bitand(t.properties, 256), 256, 'YES', 0, 'NO'),
decode(bitand(t.properties, 8), 8, 'NO', 'YES'),
decode(bitand(t.properties, 65536), 65536, 'NO', 'YES'),
su.name, so.name, t.local_attrs, t.local_methods, t.typeid
from sys.user$ u, sys.type$ t, sys.obj$ o, sys.obj$ so, sys.user$ su
where o.owner# = u.user#
and o.oid$ = t.tvoid
and o.subname IS NULL -- only the latest version
and o.type# <> 10 -- must not be invalid
and bitand(t.properties, 2048) = 0 -- not system-generated
and t.supertoid = so.oid$ (+) and so.owner# = su.user# (+)"
SYS DBA_TYPE_ATTRS 1547 "select decode(bitand(t.properties, 64), 64,
null, u.name), o.name, a.name,
decode(bitand(a.properties, 32768), 32768, 'REF',
decode(bitand(a.properties, 16384), 16384, 'POINTER')),
nvl2(a.synobj#, (select u.name from user$ u, obj$ o
where o.owner#=u.user# and o.obj#=a.synobj#),
decode(bitand(at.properties, 64), 64, null, au.name)),
nvl2(a.synobj#, (select o.name from obj$ o where
o.obj#=a.synobj#),
decode(at.typecode,
52, decode(a.charsetform, 2, 'NVARCHAR2', ao.name),
53, decode(a.charsetform, 2, 'NCHAR', ao.name),
54, decode(a.charsetform, 2, 'NCHAR VARYING',
ao.name),
61, decode(a.charsetform, 2, 'NCLOB', ao.name),
ao.name)),
a.length, a.precision#, a.scale,
decode(a.charsetform, 1, 'CHAR_CS',
2, 'NCHAR_CS',
3, NLS_CHARSET_NAME(a.charsetid),
4, 'ARG:'||a.charsetid),
a.attribute#, decode(bitand(nvl(a.xflags,0), 1), 1, 'YES',
'NO')
from sys.user$ u, sys.obj$ o, sys.type$ t, sys.attribute$ a,
sys.obj$ ao, sys.user$ au, sys.type$ at
where o.owner# = u.user#
and o.oid$ = t.toid
and o.type# <> 10 -- must not be invalid
and bitand(t.properties, 2048) = 0 -- not system-generated
and t.toid = a.toid
and t.version# = a.version#
and a.attr_toid = ao.oid$
and ao.owner# = au.user#
and a.attr_toid = at.tvoid
and a.attr_version# = at.version#"
SYS DBA_TYPE_METHODS 581 "select u.name, o.name, m.name, m.method#,
decode(bitand(m.properties, 512), 512, 'MAP',
decode(bitand(m.properties, 2048), 2048, 'ORDER',
'PUBLIC')),
m.parameters#, m.results,
decode(bitand(m.properties, 8), 8, 'NO', 'YES'),
decode(bitand(m.properties, 65536), 65536, 'NO', 'YES'),
decode(bitand(m.properties, 131072), 131072, 'YES', 'NO'),
decode(bitand(nvl(m.xflags,0), 1), 1, 'YES', 'NO')
from sys.user$ u, sys.obj$ o, sys.method$ m
where o.owner# = u.user#
and o.type# <> 10 -- must not be invalid
and o.oid$ = m.toid"
SYS DBA_TYPE_VERSIONS 396 "select u.name, o.name, t.version#,
decode(t.typecode, 108, 'OBJECT',
122, 'COLLECTION',
o.name),
decode(o.status, 0, 'N/A', 1, 'VALID', 'INVALID'),
s.line, s.source,
t.hashcode
from sys.obj$ o, sys.source$ s, sys.type$ t, user$ u
where o.obj# = s.obj# and o.oid$ = t.tvoid and o.type# = 13
and o.owner# = u.user#"
SYS DBA_UNDO_EXTENTS 557 "select /*+ ordered use_nl(e) use_nl(f) */
'SYS', u.name, t.name,
e.ktfbueextno, f.file#, e.ktfbuebno,
e.ktfbueblks * t.BLOCKSIZE, e.ktfbueblks, e.ktfbuefno,
nullif(e.ktfbuectm, e.ktfbuectm),
nullif(e.ktfbuestt, e.ktfbuestt),
decode(e.ktfbuesta, 1, 'ACTIVE', 2, 'EXPIRED', 3, 'UNEXPIRED',
'UNDEFINED')
from undo$ u, ts$ t, sys.x$ktfbue e, sys.file$ f
where
e.ktfbuesegfno = u.file#
and e.ktfbuesegbno = u.block#
and e.ktfbuesegtsn = u.ts#
and u.spare1 = 1
and t.ts# = u.ts#
and e.ktfbuefno = f.relfile#"
SYS DBA_UNUSED_COL_TABS 378 "select u.name, o.name, count(*)
from sys.user$ u, sys.obj$ o, sys.col$ c
where c.obj# = o.obj#
and bitand(c.property,32768) = 32768 -- is unused
column
and bitand(c.property, 1) != 1 -- not ADT
attribute col
and bitand(c.property, 1024) != 1024 -- not NTAB's
setid col
and u.user# = o.owner#
group by u.name, o.name"
SYS DBA_UPDATABLE_COLUMNS 726 "select u.name, o.name, c.name,
decode(bitand(c.fixedstorage,2),
2, decode(bitand(v.flags,8192), 8192, 'YES', 'NO'),
decode(bitand(c.property,4096),4096,'NO','YES')),
decode(bitand(c.fixedstorage,2),
2, decode(bitand(v.flags,4096), 4096, 'YES', 'NO'),
decode(bitand(c.property,2048),2048,'NO','YES')),
decode(bitand(c.fixedstorage,2),
2, decode(bitand(v.flags,16384), 16384, 'YES', 'NO'),
decode(bitand(c.property,8192),8192,'NO','YES'))
from sys.obj$ o, sys.user$ u, sys.col$ c, sys.view$ v
where u.user# = o.owner#
and c.obj# = o.obj#
and c.obj# = v.obj#(+)
and bitand(c.property, 32) = 0 /* not hidden column */"
SYS DBA_USERS 1327 "select u.name, u.user#, u.password,
m.status,
decode(u.astatus, 4, u.ltime,
5, u.ltime,
6, u.ltime,
8, u.ltime,
9, u.ltime,
10, u.ltime, to_date(NULL)),
decode(u.astatus,
1, u.exptime,
2, u.exptime,
5, u.exptime,
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"
SYS DBA_USTATS 2071 "select u.name, o.name, o.subname,
decode (bitand(s.property, 3), 1, 'INDEX', 2, 'COLUMN'),
decode (bitand(s.property, 12), 8, 'DIRECT', 4, 'IMPLICIT'),
c.name, u1.name, o1.name, s.statistics
from sys.user$ u, sys.obj$ o, sys.col$ c, sys.ustats$ s,
sys.user$ u1, sys.obj$ o1
where bitand(s.property, 3)=2 and s.obj#=o.obj# and
o.owner#=u.user#
and s.intcol#=c.intcol# and s.statstype#=o1.obj#
and o1.owner#=u1.user# and c.obj#=s.obj#
union all -- partition case
select u.name, o.name, o.subname,
decode (bitand(s.property, 3), 1, 'INDEX', 2, 'COLUMN'),
decode (bitand(s.property, 12), 8, 'DIRECT', 4, 'IMPLICIT'),
c.name, u1.name, o1.name, s.statistics
from sys.user$ u, sys.user$ u1, sys.obj$ o, sys.obj$ o1, sys.col$
c,
sys.ustats$ s, sys.tabpart$ t, sys.obj$ o2
where bitand(s.property, 3)=2 and s.obj# = o.obj#
and s.obj# = t.obj# and t.bo# = o2.obj# and o2.owner# = u.user#
and s.intcol# = c.intcol# and s.statstype#=o1.obj# and
o1.owner#=u1.user#
and t.bo#=c.obj#
union all
select u.name, o.name, o.subname,
decode (bitand(s.property, 3), 1, 'INDEX', 2, 'COLUMN'),
decode (bitand(s.property, 12), 8, 'DIRECT', 4, 'IMPLICIT'),
NULL, u1.name, o1.name, s.statistics
from sys.user$ u, sys.obj$ o, sys.ustats$ s,
sys.user$ u1, sys.obj$ o1
where bitand(s.property, 3)=1 and s.obj#=o.obj# and
o.owner#=u.user#
and s.statstype#=o1.obj# and o1.owner#=u1.user# and o.type#=1
union all -- index partition
select u.name, o.name, o.subname,
decode (bitand(s.property, 3), 1, 'INDEX', 2, 'COLUMN'),
decode (bitand(s.property, 12), 8, 'DIRECT', 4, 'IMPLICIT'),
NULL, u1.name, o1.name, s.statistics
from sys.user$ u, sys.user$ u1, sys.obj$ o, sys.obj$ o1,
sys.ustats$ s, sys.indpart$ i, sys.obj$ o2
where bitand(s.property, 3)=1 and s.obj# = o.obj#
and s.obj# = i.obj# and i.bo# = o2.obj# and o2.owner# = u.user#
and s.statstype#=o1.obj# and o1.owner#=u1.user#"
SYS DBA_VARRAYS 4413 "select u.name, op.name, ac.name,
nvl2(ct.synobj#, (select u.name from user$ u, obj$ o
where o.owner#=u.user# and o.obj#=ct.synobj#), ut.name),
nvl2(ct.synobj#, (select o.name from obj$ o
where o.obj#=ct.synobj#), ot.name),
NULL,
lpad(decode(bitand(ct.flags, 64), 64, 'USER_SPECIFIED',
'DEFAULT'), 30),
lpad(decode(bitand(ct.flags, 32), 32, 'LOCATOR', 'VALUE'), 20),
lpad((case when bitand(ct.flags, 5120)=0 and
bitand(t.properties, 8)= 8
then 'Y' else 'N' end), 25)
from sys.obj$ op, sys.obj$ ot, sys.col$ c, sys.coltype$ ct, sys.user$
u,
sys.user$ ut, sys.attrcol$ ac, sys.type$ t, sys.collection$ cl
where op.owner# = u.user#
and c.obj# = op.obj#
and c.obj# = ac.obj#
and c.intcol# = ac.intcol#
and op.obj# = ct.obj#
and ct.toid = ot.oid$
and ct.intcol#=c.intcol#
and ot.owner# = ut.user#
and ct.toid=cl.toid
and cl.elem_toid=t.tvoid
and bitand(ct.flags,8)=8
and bitand(c.property, 128) != 128
and bitand(c.property,32768) != 32768 /* not unused column
*/
union all
select u.name, op.name, ac.name,
nvl2(ct.synobj#, (select u.name from user$ u, obj$ o
where o.owner#=u.user# and o.obj#=ct.synobj#), ut.name),
nvl2(ct.synobj#, (select o.name from obj$ o
where o.obj#=ct.synobj#), ot.name),
o.name,
lpad(decode(bitand(ct.flags, 64), 64, 'USER_SPECIFIED',
'DEFAULT'), 30),
lpad(decode(bitand(ct.flags, 32), 32, 'LOCATOR', 'VALUE'), 20),
lpad((case when bitand(ct.flags, 5120)=0 and
bitand(t.properties, 8)= 8
then 'Y' else 'N' end), 25)
from sys.lob$ l, sys.obj$ o, sys.obj$ op, sys.obj$ ot, sys.col$ c,
sys.coltype$ ct, sys.user$ u, sys.user$ ut, sys.attrcol$ ac, sys.type
$ t,
sys.collection$ cl
where o.owner# = u.user#
and l.obj# = op.obj#
and l.lobj# = o.obj#
and c.obj# = op.obj#
and l.intcol# = c.intcol#
and c.obj# = ac.obj#
and c.intcol# = ac.intcol#
and op.obj# = ct.obj#
and ct.toid = ot.oid$
and ct.intcol#=l.intcol#
and ot.owner# = ut.user#
and ct.toid=cl.toid
and cl.elem_toid=t.tvoid
and bitand(ct.flags,8)=8
and bitand(c.property, 128) = 128
and bitand(c.property,32768) != 32768 /* not unused column
*/
union all
select u.name, op.name, c.name,
nvl2(ct.synobj#, (select u.name from user$ u, obj$ o
where o.owner#=u.user# and o.obj#=ct.synobj#), ut.name),
nvl2(ct.synobj#, (select o.name from obj$ o
where o.obj#=ct.synobj#), ot.name),
NULL,
lpad(decode(bitand(ct.flags, 64), 64, 'USER_SPECIFIED',
'DEFAULT'), 30),
lpad(decode(bitand(ct.flags, 32), 32, 'LOCATOR', 'VALUE'), 20),
lpad((case when bitand(ct.flags, 5120)=0 and
bitand(t.properties, 8)= 8
then 'Y' else 'N' end), 25)
from sys.obj$ op, sys.obj$ ot, sys.col$ c, sys.coltype$ ct, sys.user$
u,
sys.user$ ut, sys.type$ t, sys.collection$ cl
where op.owner# = u.user#
and c.obj# = op.obj#
and bitand(c.property,1)=0
and op.obj# = ct.obj#
and ct.toid = ot.oid$
and ct.intcol#=c.intcol#
and ot.owner# = ut.user#
and ct.toid=cl.toid
and cl.elem_toid=t.tvoid
and bitand(ct.flags,8)=8
and bitand(c.property, 128) != 128
and bitand(c.property,32768) != 32768 /* not unused column
*/
union all
select u.name, op.name, c.name,
nvl2(ct.synobj#, (select u.name from user$ u, obj$ o
where o.owner#=u.user# and o.obj#=ct.synobj#), ut.name),
nvl2(ct.synobj#, (select o.name from obj$ o
where o.obj#=ct.synobj#), ot.name),
o.name,
lpad(decode(bitand(ct.flags, 64), 64, 'USER_SPECIFIED',
'DEFAULT'), 30),
lpad(decode(bitand(ct.flags, 32), 32, 'LOCATOR', 'VALUE'), 20),
lpad((case when bitand(ct.flags, 5120)=0 and
bitand(t.properties, 8)= 8
then 'Y' else 'N' end), 25)
from sys.lob$ l, sys.obj$ o, sys.obj$ op, sys.obj$ ot, sys.col$ c,
sys.coltype$ ct, sys.user$ u, sys.user$ ut, sys.type$ t,
sys.collection$ cl
where o.owner# = u.user#
and l.obj# = op.obj#
and l.lobj# = o.obj#
and c.obj# = op.obj#
and l.intcol# = c.intcol#
and bitand(c.property,1)=0
and op.obj# = ct.obj#
and ct.toid = ot.oid$
and ct.intcol#=l.intcol#
and ot.owner# = ut.user#
and ct.toid=cl.toid
and cl.elem_toid=t.tvoid
and bitand(ct.flags,8)=8
and bitand(c.property, 128) = 128
and bitand(c.property,32768) != 32768 /* not unused column
*/"
SYS DBA_VIEWS 452 "select u.name, o.name, v.textlength, v.text,
t.typetextlength, t.typetext,
t.oidtextlength, t.oidtext, t.typeowner, t.typename,
decode(bitand(v.property, 134217728), 134217728,
(select sv.name from superobj$ h, obj$ sv
where h.subobj# = o.obj# and h.superobj# = sv.obj#),
null)
from sys.obj$ o, sys.view$ v, sys.user$ u, sys.typed_view$ t
where o.obj# = v.obj#
and o.obj# = t.obj#(+)
and o.owner# = u.user#"
SYS DBA_WAITERS 2043 "select /*+ordered */ w.sid
,s.ksusenum
,decode(r.ksqrsidt,
'MR', 'Media Recovery',
'RT', 'Redo Thread',
'UN', 'User Name',
'TX', 'Transaction',
'TM', 'DML',
'UL', 'PL/SQL User Lock',
'DX', 'Distributed Xaction',
'CF', 'Control File',
'IS', 'Instance State',
'FS', 'File Set',
'IR', 'Instance Recovery',
'ST', 'Disk Space Transaction',
'TS', 'Temp Segment',
'IV', 'Library Cache Invalidation',
'LS', 'Log Start or Switch',
'RW', 'Row Wait',
'SQ', 'Sequence Number',
'TE', 'Extend Table',
'TT', 'Temp Table',
r.ksqrsidt)
,decode(l.lmode,
0, 'None', /* Mon Lock equivalent */
1, 'Null', /* N */
2, 'Row-S (SS)', /* L */
3, 'Row-X (SX)', /* R */
4, 'Share', /* S */
5, 'S/Row-X (SSX)', /* C */
6, 'Exclusive', /* X */
l.lmode)
,decode(bitand(w.p1,65535),
0, 'None', /* Mon Lock equivalent */
1, 'Null', /* N */
2, 'Row-S (SS)', /* L */
3, 'Row-X (SX)', /* R */
4, 'Share', /* S */
5, 'S/Row-X (SSX)', /* C */
6, 'Exclusive', /* X */
to_char(bitand(w.p1,65535)))
,r.ksqrsid1, r.ksqrsid2
from v$session_wait w, x$ksqrs r, v$_lock l, x$ksuse s
where w.wait_Time = 0
and w.event = 'enqueue'
and r.ksqrsid1 = w.p2
and r.ksqrsid2 = w.p3
and r.ksqrsidt = chr(bitand(p1,-16777216)/16777215)||
chr(bitand(p1,16711680)/65535)
and l.block = 1
and l.saddr = s.addr
and l.raddr = r.addr
and s.inst_id = userenv('Instance')"
SYS DBA_WORKSPACES 1711 "select asp.workspace, asp.parent_workspace,
ssp.savepoint parent_savepoint,
asp.owner, asp.createTime, asp.description,
decode(asp.freeze_status,'LOCKED','FROZEN',
'UNLOCKED','UNFROZEN') freeze_status,
decode(asp.oper_status, null, asp.freeze_mode,'INTERNAL')
freeze_mode,
decode(asp.freeze_mode, '1WRITER_SESSION', s.username,
asp.freeze_writer) freeze_writer,
decode(asp.freeze_mode, '1WRITER_SESSION',
substr(asp.freeze_writer, 1, instr(asp.freeze_writer, ',')-1), null)
sid,
decode(asp.freeze_mode, '1WRITER_SESSION',
substr(asp.freeze_writer, instr(asp.freeze_writer, ',')+1), null)
serial#,
decode(asp.session_duration, 0, asp.freeze_owner, s.username)
freeze_owner,
decode(asp.freeze_status, 'UNLOCKED', null,
decode(asp.session_duration, 1, 'YES', 'NO')) session_duration,
decode(asp.session_duration, 1,
decode((select 1 from dual
where s.sid=sys_context('lt_ctx', 'cid')
and s.serial#=sys_context('lt_ctx', 'serial#')),
1, 'YES', 'NO'),
null) current_session,
decode(rst.workspace,null,'INACTIVE','ACTIVE') resolve_status,
rst.resolve_user
from wmsys.wm$workspaces_table asp, wmsys.wm
$workspace_savepoints_table ssp,
wmsys.wm$resolve_workspaces_table rst, V$session s
where nvl(ssp.is_implicit,1) = 1 and
asp.parent_version = ssp.version (+) and
asp.workspace = rst.workspace (+) and
to_char(s.sid(+)) = substr(asp.freeze_owner, 1,
instr(asp.freeze_owner, ',')-1) and
to_char(s.serial#(+)) = substr(asp.freeze_owner,
instr(asp.freeze_owner, ',')+1)
WITH READ ONLY"
SYS DBA_WORKSPACE_SESSIONS 237 "select sut.username,
sut.workspace,
sut.sid,
decode(t.ses_addr, null, 'INACTIVE','ACTIVE') status
from sys.wm$workspace_sessions_view sut,
sys.v$transaction t
where sut.saddr = t.ses_addr (+)
WITH READ ONLY"
SYS DBA_XML_SCHEMAS 753 "select s.xmldata.schema_owner,
s.xmldata.schema_url,
case when bitand(to_number(s.xmldata.flags,'xxxxxxxx'), 16)
= 16
then 'NO' else 'YES' end,
value(s),
xdb.xdb
$Extname2Intname(s.xmldata.schema_url,s.xmldata.schema_owner),
case when bitand(to_number(s.xmldata.flags,'xxxxxxxx'), 16)
= 16
then s.xmldata.schema_url
else 'http://xmlns.oracle.com/xdb/schemas/' ||
s.xmldata.schema_owner || '/' ||
case when substr(s.xmldata.schema_url, 1, 7) =
'http://'
then substr(s.xmldata.schema_url, 8)
else s.xmldata.schema_url
end
end
from xdb.xdb$schema s"
SYS DBA_XML_TABLES 1329 "select u.name, o.name, null, null, null,
decode(bitand(opq.flags,5),1,'OBJECT-RELATIONAL','CLOB')
from sys.opqtype$ opq, sys.tab$ t, sys.user$ u, sys.obj$ o,
sys.coltype$ ac, sys.col$ tc
where o.owner# = u.user#
and o.obj# = t.obj#
and bitand(t.property, 1) = 1
and t.obj# = tc.obj#
and tc.name = 'SYS_NC_ROWINFO$'
and tc.obj# = ac.obj#
and tc.intcol# = ac.intcol#
and ac.toid = '00000000000000000000000000020100'
and tc.intcol# = opq.intcol#
and tc.obj# = opq.obj#
and bitand(opq.flags,2) = 0
union all
select u.name, o.name, schm.xmldata.schema_url,
schm.xmldata.schema_owner,
xel.xmldata.property.name,
decode(bitand(opq.flags,5),1,'OBJECT-RELATIONAL','CLOB')
from xdb.xdb$element xel, xdb.xdb$schema schm, sys.opqtype$ opq,
sys.tab$ t, sys.user$ u, sys.obj$ o, sys.coltype$ ac, sys.col$
tc
where o.owner# = u.user#
and o.obj# = t.obj#
and bitand(t.property, 1) = 1
and t.obj# = tc.obj#
and tc.name = 'SYS_NC_ROWINFO$'
and tc.obj# = ac.obj#
and tc.intcol# = ac.intcol#
and ac.toid = '00000000000000000000000000020100'
and tc.intcol# = opq.intcol#
and tc.obj# = opq.obj#
and bitand(opq.flags,2) = 2
and opq.schemaoid = schm.sys_nc_oid$
and ref(schm) = xel.xmldata.property.parent_schema
and opq.elemnum = xel.xmldata.property.prop_number"
SYS DBA_XML_TAB_COLS 1586 "select u.name, o.name,
decode(bitand(tc.property, 1), 1, attr.name, tc.name),
null, null, null,
decode(bitand(opq.flags,5),1,'OBJECT-RELATIONAL','CLOB')
from sys.opqtype$ opq, sys.tab$ t, sys.user$ u, sys.obj$ o,
sys.coltype$ ac, sys.col$ tc, sys.attrcol$ attr
where o.owner# = u.user#
and o.obj# = t.obj#
and t.obj# = tc.obj#
and tc.obj# = ac.obj#
and tc.intcol# = ac.intcol#
and tc.obj# = attr.obj#(+)
and tc.intcol# = attr.intcol#(+)
and tc.name != 'SYS_NC_ROWINFO$'
and ac.toid = '00000000000000000000000000020100'
and tc.intcol# = opq.intcol#
and tc.obj# = opq.obj#
and bitand(opq.flags,2) = 0
union all
select u.name, o.name,
decode(bitand(tc.property, 1), 1, attr.name, tc.name),
schm.xmldata.schema_url, schm.xmldata.schema_owner,
xel.xmldata.property.name,
decode(bitand(opq.flags,5),1,'OBJECT-RELATIONAL','CLOB')
from xdb.xdb$element xel, xdb.xdb$schema schm, sys.opqtype$ opq,
sys.tab$ t, sys.user$ u, sys.obj$ o, sys.coltype$ ac, sys.col$
tc,
sys.attrcol$ attr
where o.owner# = u.user#
and o.obj# = t.obj#
and t.obj# = tc.obj#
and tc.obj# = ac.obj#
and ac.toid = '00000000000000000000000000020100'
and tc.intcol# = ac.intcol#
and tc.obj# = attr.obj#(+)
and tc.intcol# = attr.intcol#(+)
and tc.name != 'SYS_NC_ROWINFO$'
and tc.intcol# = opq.intcol#
and tc.obj# = opq.obj#
and tc.name != 'SYS_NC_ROWINFO$'
and opq.schemaoid = schm.sys_nc_oid$
and bitand(opq.flags,2) = 2
and ref(schm) = xel.xmldata.property.parent_schema
and opq.elemnum = xel.xmldata.property.prop_number"
SYS DBA_XML_VIEWS 687 "select u.name, o.name, schm.xmldata.schema_url,
schm.xmldata.schema_owner,
xel.xmldata.property.name
from xdb.xdb$element xel, xdb.xdb$schema schm, sys.opqtype$ opq,
sys.view$ v, sys.user$ u, sys.obj$ o, sys.coltype$ ac, sys.col$
tc
where o.owner# = u.user#
and o.obj# = v.obj#
and bitand(v.property, 1) = 1
and v.obj# = tc.obj#
and tc.name = 'SYS_NC_ROWINFO$'
and tc.obj# = ac.obj#
and tc.intcol# = ac.intcol#
and ac.toid = '00000000000000000000000000020100'
and tc.intcol# = opq.intcol#
and tc.obj# = opq.obj#
and opq.schemaoid = schm.sys_nc_oid$
and ref(schm) = xel.xmldata.property.parent_schema
and opq.elemnum = xel.xmldata.property.prop_number"
SYS DBA_XML_VIEW_COLS 804 "select u.name, o.name,
decode(bitand(tc.property, 1), 1, attr.name, tc.name),
schm.xmldata.schema_url, schm.xmldata.schema_owner,
xel.xmldata.property.name
from xdb.xdb$element xel, xdb.xdb$schema schm, sys.opqtype$ opq,
sys.view$ v, sys.user$ u, sys.obj$ o, sys.coltype$ ac, sys.col$
tc,
sys.attrcol$ attr
where o.owner# = u.user#
and o.obj# = v.obj#
and bitand(v.property, 1) = 1
and v.obj# = tc.obj#
and tc.obj# = ac.obj#
and tc.intcol# = ac.intcol#
and tc.obj# = attr.obj#(+)
and tc.intcol# = attr.intcol#(+)
and ac.toid = '00000000000000000000000000020100'
and tc.intcol# = opq.intcol#
and tc.obj# = opq.obj#
and opq.schemaoid = schm.sys_nc_oid$
and ref(schm) = xel.xmldata.property.parent_schema
and opq.elemnum = xel.xmldata.property.prop_number"
SYS DEFCALL 1581 "SELECT step_no callno,
enq_tid deferred_tran_id,
substrb(sys.dbms_defer_query_utl.key_to_schema_name(
recipient_key,
enq_tid,
step_no), 1, 30) schemaname,
substrb(sys.dbms_defer_query_utl.key_to_package_name(
recipient_key,
enq_tid,
step_no), 1, 30) packagename,
substrb(sys.dbms_defer_query_utl.procedure_name(
1, --dbms_defer_query_utl.loc_normal_call,
chain_no,
user_data,
recipient_key), 1, 30) procname,
chain_no argcount
FROM system.def$_aqcall
WHERE substrb(sys.dbms_defer_query_utl.key_to_schema_name(
recipient_key,
enq_tid,
step_no), 1, 30) != '** NO DATA FOUND **'
AND substrb(sys.dbms_defer_query_utl.key_to_package_name(
recipient_key,
enq_tid,
step_no), 1, 30) != '** NO DATA FOUND **'
UNION ALL
SELECT step_no callno,
enq_tid deferred_tran_id,
substrb(sys.dbms_defer_query_utl.schema_name(
2, --dbms_defer_query_utl.loc_error_call,
chain_no,
user_data), 1, 30) schemaname,
substrb(sys.dbms_defer_query_utl.package_name(
2, --dbms_defer_query_utl.loc_error_call,
chain_no,
user_data), 1, 30) packagename,
substrb(sys.dbms_defer_query_utl.procedure_name(
2, --dbms_defer_query_utl.loc_error_call,
chain_no,
user_data,
0), 1, 30) procname,
chain_no argcount
FROM system.def$_aqerror"
SYS DEFCALLDEST 1140 "select C1.step_no callno, C.enq_tid
deferred_tran_id,
D.dblink
from system.def$_aqcall C, system.def$_aqcall C1,
system.def$_destination D
where C.cscn IS NOT NULL
and C1.enq_tid = c.enq_tid
AND C.cscn >= D.last_delivered
AND (C.cscn > D.last_delivered
OR
(C.cscn = D.last_delivered
AND (C.enq_tid > D.last_enq_tid)))
and (( C1.recipient_key = 0
AND EXISTS (
select NULL
from system.def$_calldest CD
where CD.enq_tid=C1.enq_tid
AND CD.step_no=C1.step_no
AND CD.dblink = D.dblink
AND CD.catchup = D.catchup))
OR ( C1.recipient_key > 0
AND EXISTS (
SELECT NULL
from system.repcat$_repprop P
WHERE D.dblink = P.dblink
AND D.catchup = P.extension_id
AND P.how = 1
AND P.recipient_key = C1.recipient_key
AND ((P.delivery_order is NULL) OR
(P.delivery_order < C.cscn)))))"
SYS DEFDEFAULTDEST 44 SELECT "DBLINK" from system.def$_defaultdest
SYS DEFERRCOUNT 76 "SELECT count(1) errcount, destination
FROM deferror GROUP BY destination"
SYS DEFERROR 281 "SELECT
e.enq_tid deferred_tran_id,
e.origin_tran_db,
e.origin_enq_tid origin_tran_id,
e.step_no callno,
e.destination,
e.enq_time start_time, e.error_number, e.error_msg, u.name receiver
FROM system.def$_error e, sys.user$ u
WHERE e.receiver = u.user# (+)"
SYS DEFLOB 106 "SELECT
d.id,
d.enq_tid,
d.blob_col,
d.clob_col,
d.nclob_col
FROM sys.def$_lob d"
SYS DEFPROPAGATOR 190 "SELECT
p.username,
p.userid,
DECODE(u.name, NULL, 'INVALID', 'VALID'),
p.created
FROM system.def$_propagator p, sys.user$ u
WHERE p.userid = u.user# (+)"
SYS DEFSCHEDULE 446 "SELECT dblink, job, interval, next_date,
last_date, disabled, last_txn_count, last_error_number,
last_error_message, catchup,
total_txn_count,
avg_throughput,
avg_latency,
total_bytes_sent,
total_bytes_received,
total_round_trips,
total_admin_count,
total_error_count,
total_sleep_time,
disabled_internally_set
FROM sys.""_DEFSCHEDULE"""
SYS DEFTRAN 353 "SELECT
enq_tid deferred_tran_id,
cscn delivery_order,
decode(recipient_key, 0, 'D', 'R') destination_list,
enq_time start_time
FROM system.def$_aqcall t
WHERE cscn is NOT NULL
UNION ALL
SELECT enq_tid deferred_tran_id,
cscn delivery_order,
'D' destination_list,
enq_time start_time
FROM system.def$_aqerror t
WHERE cscn is NOT NULL"
SYS DEFTRANDEST 71 "select deferred_tran_id, delivery_order, dblink
from ""_DEFTRANDEST"""
SYS DICTIONARY 1889 "select o.name, c.comment$
from sys.obj$ o, sys.com$ c
where o.obj# = c.obj#(+)
and c.col# is null
and o.owner# = 0
and o.type# = 4
and (o.name like 'USER%'
or o.name like 'ALL%'
or (o.name like 'DBA%'
and exists
(select null
from sys.v$enabledprivs
where priv_number = -47 /* SELECT ANY TABLE */)
)
)
union all
select o.name, c.comment$
from sys.obj$ o, sys.com$ c
where o.obj# = c.obj#(+)
and o.owner# = 0
and o.name in ('AUDIT_ACTIONS', 'COLUMN_PRIVILEGES', 'DICTIONARY',
'DICT_COLUMNS', 'DUAL', 'GLOBAL_NAME', 'INDEX_HISTOGRAM',
'INDEX_STATS', 'RESOURCE_COST', 'ROLE_ROLE_PRIVS',
'ROLE_SYS_PRIVS',
'ROLE_TAB_PRIVS', 'SESSION_PRIVS', 'SESSION_ROLES',

'TABLE_PRIVILEGES','NLS_SESSION_PARAMETERS','NLS_INSTANCE_PARAMETERS',
'NLS_DATABASE_PARAMETERS', 'DATABASE_COMPATIBLE_LEVEL',
'DBMS_ALERT_INFO', 'DBMS_LOCK_ALLOCATED')
and c.col# is null
union all
select so.name, 'Synonym for ' || sy.name
from sys.obj$ ro, sys.syn$ sy, sys.obj$ so
where so.type# = 5
and ro.linkname is null
and so.owner# = 1
and so.obj# = sy.obj#
and so.name <> sy.name
and sy.owner = 'SYS'
and sy.name = ro.name
and ro.owner# = 0
and ro.type# = 4
and (ro.owner# = userenv('SCHEMAID')
or ro.obj# in
(select oa.obj#
from sys.objauth$ oa
where grantee# in (select kzsrorol from x$kzsro))
or exists (select null from v$enabledprivs
where priv_number in (-45 /* LOCK ANY TABLE */,
-47 /* SELECT ANY TABLE */,
-48 /* INSERT ANY TABLE */,
-49 /* UPDATE ANY TABLE */,
-50 /* DELETE ANY TABLE */)
))"
SYS DICT_COLUMNS 1241 "select o.name, c.name, co.comment$
from sys.com$ co, sys.col$ c, sys.obj$ o
where o.owner# = 0
and o.type# = 4
and (o.name like 'USER%'
or o.name like 'ALL%'
or (o.name like 'DBA%'
and exists
(select null
from sys.v$enabledprivs
where priv_number = -47 /* SELECT ANY TABLE */)
)
)
and o.obj# = c.obj#
and c.obj# = co.obj#(+)
and c.col# = co.col#(+)
and bitand(c.property, 32) = 0 /* not hidden column */
union all
select o.name, c.name, co.comment$
from sys.com$ co, sys.col$ c, sys.obj$ o
where o.owner# = 0
and o.name in ('AUDIT_ACTIONS','DUAL','DICTIONARY', 'DICT_COLUMNS')
and o.obj# = c.obj#
and c.obj# = co.obj#(+)
and c.col# = co.col#(+)
and bitand(c.property, 32) = 0 /* not hidden column */
union all
select so.name, c.name, co.comment$
from sys.com$ co,sys.col$ c, sys.obj$ ro, sys.syn$ sy, sys.obj$ so
where so.type# = 5
and so.owner# = 1
and so.obj# = sy.obj#
and so.name <> sy.name
and sy.owner = 'SYS'
and sy.name = ro.name
and ro.owner# = 0
and ro.type# = 4
and ro.obj# = c.obj#
and c.col# = co.col#(+)
and bitand(c.property, 32) = 0 /* not hidden column */
and c.obj# = co.obj#(+)"
SYS DISK_AND_FIXED_OBJECTS 323 "select obj#, owner#, name, type#,
remoteowner, linkname
from sys.obj$
union all
select kobjn_kqfp, 0, name_kqfp,
decode(type_kqfp, 1, 9, 2, 11, 3, 10, 0), NULL, NULL
from sys.x$kqfp
union all
select kqftaobj, 0, kqftanam, 2, NULL, NULL
from sys.x$kqfta
union all
select kqfviobj, 0, kqfvinam, 4, NULL, NULL
from sys.x$kqfvi"


Regards,

Mohammed sheriff.s
+919894022554
Reply all
Reply to author
Forward
0 new messages