当前位置:网站首页>When Oracle11G uses EXP to export, the empty table cannot be exported.
When Oracle11G uses EXP to export, the empty table cannot be exported.
2022-08-07 15:37:00 【Let the Emperor love you】
Oracle11G用EXP导出时,空表不能导出解决:
11G中有个新特性,当表无数据时,不分配segment,以节省空间
解决:
方法一:insert一行,再rollback就产生segment了
该方法是在在空表中插入数据,再删除,则产生segment.导出时则可导出空表.
方法二:设置deferred_segment_creation 参数
show parameter deferred_segment_creation
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
deferred_segment_creation boolean TRUE
alter system set deferred_segment_creation=false;
系统已更改.
show parameter deferred_segment_creation
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
deferred_segment_creation boolean FALSE
- 该参数值默认是TRUE,当改为FALSE时,无论是空表还是非空表,都分配segment.
- 注意:This value has no effect on previously imported empty tables,仍不能导出,Only works on newly added tables later.
- 如需导出之前的空表,只能用第一种方法.
方法三:
- 先查询一下当前用户下的所有空表
select table_name from user_tables where NUM_ROWS=0;
- Use the following sentence to find an empty table
select 'alter table '||table_name||' allocate extent;' from user_tables where num_rows=0
- 把查询结果导出,执行导出的语句
'ALTERTABLE'||TABLE_NAME||'ALLOCATEEXTENT;'
-----------------------------------------------------------
alter table AQ$_AQ$_MEM_MC_H allocate extent;
alter table AQ$_AQ$_MEM_MC_G allocate extent;
alter table AQ$_AQ$_MEM_MC_I allocate extent;
alter table AQ$_AQ_PROP_TABLE_T allocate extent;
alter table AQ$_AQ_PROP_TABLE_H allocate extent;
alter table AQ$_AQ_PROP_TABLE_G allocate extent;
alter table AQ$_AQ_PROP_TABLE_I allocate extent;
alter table AQ$_KUPC$DATAPUMP_QUETAB_T allocate extent;
alter table AQ$_KUPC$DATAPUMP_QUETAB_H allocate extent;
alter table AQ$_KUPC$DATAPUMP_QUETAB_G allocate extent;
alter table AQ$_KUPC$DATAPUMP_QUETAB_I allocate extent;
'ALTERTABLE'||TABLE_NAME||'ALLOCATEEXTENT;'
-----------------------------------------------------------
alter table AQ$_SYS$SERVICE_METRICS_TAB_T allocate extent;
alter table AQ$_SYS$SERVICE_METRICS_TAB_H allocate extent;
alter table AQ$_SYS$SERVICE_METRICS_TAB_G allocate extent;
alter table AQ$_SYS$SERVICE_METRICS_TAB_I allocate extent;
- 然后再执行
exp 用户名/密码@数据库名 file=/home/oracle/exp.dmp log=/home/oracle/exp_smsrun.log
exp camsjs/camsjs@orcl file=E:\CAMSJS0421.dmp owner=camsjs
边栏推荐
- pip list导入与导出
- 66:第五章:开发admin管理服务:19:开发【查看用户详情,接口】;
- OpenCV 颜色检测| color detection
- 微信小程序——点击事件 bindtap和catchtap的区别
- Chapter 8 C programming expert why programmers cannot distinguish where Halloween and Christmas 8.5 prototype fail
- 浏览器工作原理与实践学习笔记(一)宏观视角下的浏览器
- LeetCode 热题 HOT 100(1.两数之和)
- RTT学习笔记9-IO设备模型
- Lianshengde W801 series 4-MQTT use
- 05 【接口 interface VS type】
猜你喜欢
随机推荐
Based on the FPGA VGA display color bar, characters, pictures
【通信原理】第四章 -- 信道
LeetCode刷题系列 -- 678. 有效的括号字符串
苹果,设计思维的“布道者”
win10 uwp BadgeLogo 颜色
Discuz论坛网站搭建教程,从0开始学会搭建网站
mysql5.7.35安装配置教程【超级详细安装教程】
微信小程序——video视频全屏展示
LeetCode HOT HOT 100 (5. Back to the longest text string)
LeetCode每日两题01:删除排序数组中的重复项 (均1200道)
Tensorflow的contrib报错
labelme安装
LeetCode hot topic HOT 100 (10. Delete the Nth node from the bottom of the linked list)
【Verilog】Verilog基础知识整理
MQTT X Newsletter 2022-07 | 自动更新、MQTT X CLI 支持 MQTT 5.0、新增 conn 命令…
Open3D ICP精配准(点到点)
浏览器工作原理与实践学习笔记(一)宏观视角下的浏览器
zabbix监控华为路由器
【21天学习挑战赛】双向链表的数据操作
Hash table | The sum of three numbers, the sum of four numbers | The most suitable `double pointer method` | leecode brush notes









