免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1654 | 回复: 6

[数据库] 试试这个,看看你会得到什么? [复制链接]

论坛徽章:
0
发表于 2013-02-28 19:48 |显示全部楼层
本帖最后由 xuhainanjing 于 2013-02-28 20:03 编辑

select segment_name,segment_type,tablespace_name
--select count(*)
--select distinct tablespace_name  

from dba_segments s
where s.next_extent is not null
   and not exists
       (select 1
        from dba_free_space f
        where f.tablespace_name=s.tablespace_name
        having max(f.bytes) > s.next_extent)
   and
    (select autoextensible
     from dba_data_files
     where tablespace_name=s.tablespace_name)='NO';


试试这个脚本,呵呵!

论坛徽章:
0
发表于 2013-03-08 13:32 |显示全部楼层
太阳

论坛徽章:
0
发表于 2013-03-11 16:42 |显示全部楼层
坐等结果~~~

论坛徽章:
0
发表于 2013-03-13 22:20 |显示全部楼层
回复 3# ym221479

无须坐等,自己试试不就行了?!:wink:

论坛徽章:
71
15-16赛季CBA联赛之同曦
日期:2018-08-23 15:41:42辰龙
日期:2014-08-15 09:07:43狮子座
日期:2014-06-03 13:55:33亥猪
日期:2014-06-02 11:17:08巨蟹座
日期:2014-05-06 10:02:03午马
日期:2014-05-04 08:18:27亥猪
日期:2014-04-29 11:11:32技术图书徽章
日期:2014-04-24 15:51:26技术图书徽章
日期:2014-04-17 11:01:53辰龙
日期:2014-04-15 12:45:46亥猪
日期:2014-04-11 09:06:23射手座
日期:2014-04-01 15:28:10
发表于 2013-03-14 13:50 |显示全部楼层
SQL> select segment_name,segment_type,tablespace_name
  2  --select count(*)
  3  --select distinct tablespace_name  
  4  from dba_segments s
  5  where s.next_extent is not null
  6     and not exists
  7         (select 1
  8          from dba_free_space f
  9          where f.tablespace_name=s.tablespace_name
10          having max(f.bytes) > s.next_extent)
11     and
12      (select autoextensible
13       from dba_data_files
14       where tablespace_name=s.tablespace_name)='NO';

no rows selected

论坛徽章:
0
发表于 2013-03-18 21:21 |显示全部楼层
xuhainanjing 发表于 2013-03-13 22:20
回复 3# ym221479

无须坐等,自己试试不就行了?!


嘿嘿,权限木有~~

论坛徽章:
0
发表于 2013-03-19 09:35 |显示全部楼层
其实这个就是看看有没有扩展报错的segment,这个写的不好,用了关联查询,性能底下,改天改写个。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP