1.查询当前用户下的所有空表

select table_name from user_tables where num_rows=0 or num_rows is null

2.根据上述查询的语句,可以构建针对空表分配空间的命令语句,具体如下;

select 'alter table '||table_name||' allocate extent;' from user_tables where num_rows=0 or num_rows is null

oracle 11g 如何导出空表

 

 

3.上述代码可产生批量的修改表extent的SQL语句(有多少张空表就产生多少条),我们只需要将其生成的所有sql代码全部执行,就可以给每一张已经存在的表来分配空间。

 

参考:http://blog.sina.com.cn/s/blog_5f0e9ca50101it7n.html

相关文章:

  • 2021-11-07
  • 2022-03-03
  • 2021-06-23
猜你喜欢
  • 2021-11-21
  • 2021-12-30
  • 2022-02-27
  • 2022-02-24
  • 2022-02-26
  • 2022-12-23
  • 2021-09-28
相关资源
相似解决方案