oracle 11g不能导出空表的解决方法
Select 'alter table '||table_name||' allocate extent;' from user_tables where num_rows=0;
- 设置deferred_segment_creation 参数:
alter system set deferred_segment_creation=false;
注意:该值设置后只对后面新增的表产生作用,对之前建立的空表(已经存在的)不起作用,仍不能导出。
并且要重新启动数据库,让参数生效。
- 使用ALLOCATE EXTENT,可以导出之前已经存在的空表。
Select 'alter table '||table_name||' allocate extent;' from user_tables where num_rows=0 or num_rows is null;
但是:数据库本身的deferred_segment_creation属性还是TRUE,也是就是说如果再创建新表的话,默认还是不分配segment的。所以还是需要更改deferred_segment_creation的参数,以便以后创建的新表自动分配segment。

浙公网安备 33010602011771号