当前位置:  数据库>oracle

Oracle 数据字典表之:DBA_TABLES

    来源: 互联网  发布时间:2017-04-03

    本文导语: //数据字典表 DBA_TABLES 与 ALL_TABLES 字段结构相同,   //其创建语句如下(以下脚本来自Oracle10g 10.2.0.3):   CREATE OR REPLACE FORCE VIEW SYS.dba_tables (owner,                                               table_name,   ...

//数据字典表 DBA_TABLES 与 ALL_TABLES 字段结构相同,  
//其创建语句如下(以下脚本来自Oracle10g 10.2.0.3):  
CREATE OR REPLACE FORCE VIEW SYS.dba_tables (owner,  
                                            table_name,  
                                            tablespace_name,  
                                            cluster_name,  
                                            iot_name,  
                                            status,  
                                            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,  
                                            TEMPORARY,  
                                            secondary,  
                                            NESTED,  
                                            BUFFER_POOL,  
                                            row_movement,  
                                            global_stats,  
                                            user_stats,  
                                            DURATION,  
                                            skip_corrupt,  
                                            MONITORING,  
                                            cluster_owner,  
                                            dependencies,  
                                            compression,  
                                            dropped  
                                            )  
AS  
  SELECT u.NAME, o.NAME,  
          DECODE (BITAND (t.property, 2151678048), 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.trigflag, 1073741824),  
                  1073741824, 'UNUSABLE',  
                  'VALID' 
                ),  
          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 + 64),  
                  0, DECODE (BITAND (t.flags, 32), 0, 'YES', 'NO'),  
                  NULL  
                ),  
          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 (o.flags, 2),  
                  2, 'NO',  
                  DECODE (BITAND (t.property, 2147483648),  
                          2147483648, 'NO',  
                          DECODE (ksppcv.ksppstvl, 'TRUE', 'YES', 'NO')  
                        )  
                ),  
          DECODE (BITAND (t.property, 1024), 0, NULL, cu.NAME),  
          DECODE (BITAND (t.flags, 8388608), 8388608, 'ENABLED', 'DISABLED'),  
          DECODE (BITAND (t.property, 32),  
                  32, NULL,  
                  DECODE (BITAND (s.spare1, 2048),  
                          2048, 'ENABLED',  
                          'DISABLED' 
                        )  
                ),  
          DECODE (BITAND (o.flags, 128), 128, 'YES', 'NO')  
    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,  
          x$ksppcv ksppcv,  
          x$ksppi ksppi  
    WHERE o.owner# = u.user#  
      AND o.obj# = t.obj#  
      AND BITAND (t.property, 1) = 0  
      AND BITAND (o.flags, 128) = 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#(+)  
      AND ksppi.indx = ksppcv.indx  
      AND ksppi.ksppinm = '_dml_monitoring_enabled'; 
































































































































































































    
 
 
 
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。












  • 相关文章推荐
  • Oracle 数据库(oracle Database)Select 多表关联查询方式
  • oracle数据库导出和oracle导入数据的二种方法(oracle导入导出数据)
  • Oracle 数据库开发工具 Oracle SQL Developer iis7站长之家
  • Oracle 数据库开发工具 Oracle SQL Developer
  • Oracle数据库(Oracle Database)体系结构及基本组成介绍
  • 请问大家用oracle数据库, 用import oracle.*;下的东西么? 还是用标准库?
  • ORACLE数据库常用字段数据类型介绍
  • 怎样调出ORACLE数据库中的数据,该如何连接?
  • Oracle 数据库(oracle Database)性能调优技术详解
  • 用JDBC连接Oracle数据库时,如何向数据库中写日期型数据(格式)?谢了!
  • 关于JDBC连接Oracle数据库,是否必须有Oracle客户端
  • linux上安装oracle 数据库后,是否能写shell程序实现数据库的自动启动。
  • win2000+jbuilder6+oracle817编出的程序,在win2000下执行很好,在win98下却访问不了oracle数据库
  • jsp文件上传smartupload到oracle数据库中没有longblob的数据类型如何处理的?
  • 将Oracle 8i数据成功移植Oracle 10g的方法
  • Oracle收购TimesTen 提高数据库软件性能
  • 我从JSP页将数据插入到oracle数据库中,为何汉字插入后数据库中显示为乱码呢?
  • Oracle数据库恢复后心得
  • 紧急求救:对Oracle数据库中long 型数据进行模糊查询 如何查?
  • Linux下Oracle数据库,dbstart持续不动,数据库无法启动解决
  • 卸载oracle数据库
  • Oracle 12c发布简单介绍及官方下载地址
  • 在linux下安装oracle,如何设置让oracle自动启动!也就是让oracle那个服务自动启动,不是手动的
  • oracle 11g最新版官方下载地址
  • 请问su oracle 和su - oracle有什么不同?
  • 如何设置让Oracle SQL Developer显示的时间包含时分秒
  • 虚拟机装Oracle R12与Oracle10g
  • Oracle 10g和Oracle 11g网格技术介绍
  • Oracle EBS R12 支持 Oracle Database 11g
  • ORACLE日期相关操作
  • SCO unix下安装oracle,但没有光盘,请大家推荐一个oracle下载站点(unix版本的)。谢谢!!!!


  • 站内导航:


    特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

    ©2012-2021,,E-mail:www_#163.com(请将#改为@)

    浙ICP备11055608号-3