zoukankan      html  css  js  c++  java
  • Script:列出失效索引或索引分区

    以下脚本可用于列出数据库中的失效的索引、索引分区、子分区:
    
    REM list of the unusable index,index partition,index subpartition in Database 
    
    Select owner, index_name, status
      From dba_indexes
     where status = 'UNUSABLE'
       and owner not in ('SYS','SYSTEM',
                         'SYSMAN',
                         'EXFSYS',
                         'WMSYS',
                         'OLAPSYS',
                         'OUTLN',
                         'DBSNMP',
                         'ORDSYS',
                         'ORDPLUGINS',
                         'MDSYS',
                         'CTXSYS',
                         'AURORA$ORB$UNAUTHENTICATED',
                         'XDB',
                         'FLOWS_030000',
                         'FLOWS_FILES')
     order by 1, 2 
    /
    
    select index_owner, index_name, partition_name
      from dba_ind_partitions
     where status ='UNUSABLE'
       and index_owner not in ('SYS',
                               'SYSTEM',
                               'SYSMAN',
                               'EXFSYS',
                               'WMSYS',
                               'OLAPSYS',
                               'OUTLN',
                               'DBSNMP',
                               'ORDSYS',
                               'ORDPLUGINS',
                               'MDSYS',
                               'CTXSYS',
                               'AURORA$ORB$UNAUTHENTICATED',
                               'XDB',
                               'FLOWS_030000',
                               'FLOWS_FILES') order by 1,2
    /
    
    Select
           Index_Owner
         , Index_Name
         , partition_name
         , SUBPARTITION_NAME
     From 
           DBA_IND_SUBPARTITIONS
    Where
           status = 'UNUSABLE'  
           and index_owner not in ('SYS',
                               'SYSTEM',
                               'SYSMAN',
                               'EXFSYS',
                               'WMSYS',
                               'OLAPSYS',
                               'OUTLN',
                               'DBSNMP',
                               'ORDSYS',
                               'ORDPLUGINS',
                               'MDSYS',
                               'CTXSYS',
                               'AURORA$ORB$UNAUTHENTICATED',
                               'XDB',
                               'FLOWS_030000',
                               'FLOWS_FILES') order by 1, 2
    /
    
  • 相关阅读:
    java中的工厂模式(简单工厂模式+工厂方法模式)
    代码集合
    java读取文件的路径问题
    使用ZXing库生成二维码
    java设计模式-装饰者模式
    android文件流缓存
    java8 新特性
    Excel导出
    常用的在线工具
    Java加密简介
  • 原文地址:https://www.cnblogs.com/macleanoracle/p/2967799.html
Copyright © 2011-2022 走看看