时间:2021-07-01 10:21:17 帮助过:15人阅读
二、解决方法:
1、先查询一下当前用户下的所有空表
select table_name from user_tables where NUM_ROWS=0;
2、用以下这句查找空表
select ‘alter table ‘||table_name||‘ allocate extent;‘ from user_tables where num_rows = 0 and table_name like ‘UFLO_%‘;
把查询结果导出,执行导出的语句
‘ALTERTABLE‘||TABLE_NAME||‘ALLOCATEEXTENT;‘
-----------------------------------------------------------
1 alter table UFLO_CALENDAR allocate extent;
2 alter table UFLO_CALENDAR_DATE allocate extent;
3 alter table UFLO_D_NODE_ATTRIBUTE allocate extent;
4 alter table UFLO_D_NODE_ENTRY allocate extent;
5 alter table UFLO_D_PROCESS_ATTRIBUTE allocate extent;
6 alter table UFLO_D_PROCESS_ENTRY allocate extent;
7 alter table UFLO_D_PROCESS_ENTRY_ASSIGNEE allocate extent;
8 alter table UFLO_FORM allocate extent;
9 alter table UFLO_TABLE_COLUMN allocate extent;
10 alter table UFLO_TABLE_DEFINITION allocate extent;
11 alter table UFLO_TASK_APPOINTOR allocate extent;
12 alter table UFLO_TASK_REMINDER allocate extent;
3、然后再执行
exp 用户名/密码@数据库名 file=/home/oracle/exp.dmp log=/home/oracle/exp_smsrun.log 成功!
==================================================================================================================
注:
1、使用ALLOCATE EXTENT的说明
使用ALLOCATE EXTENT可以为数据库对象分配Extent。其语法如下:
-----------
ALLOCATE EXTENT { SIZE integer [K | M] | DATAFILE ‘filename‘ | INSTANCE integer }
-----------
可以针对数据表、索引、物化视图等手工分配Extent。
ALLOCATE EXTENT使用样例:
ALLOCATE EXTENT
ALLOCATE EXTENT(SIZE integer [K | M])
ALLOCATE EXTENT(DATAFILE ‘filename‘)
ALLOCATE EXTENT(INSTANCE integer)
ALLOCATE EXTENT(SIZE integer [K | M] DATAFILE ‘filename‘)
ALLOCATE EXTENT(SIZE integer [K | M] INSTANCE integer)
针对数据表操作的完整语法如下:
-----------
ALTER TABLE [schema.]table_name ALLOCATE EXTENT [({ SIZE integer [K | M] | DATAFILE ‘filename‘ | INSTANCE integer})]
-----------
故,需要构建如下样子简单的SQL命令:
-----------
alter table aTabelName allocate extent
-----------
create directory expdp_dir as ‘/data/app1/dp‘;
grant read,write on directory expdp_dir to DRGN_OWNER;
expdp DRGN_OWNER/DRGN_OWNER DIRECTORY=expdp_dir DUMPFILE=DRGN_OWNER.dmp SCHEMAS=DRGN_OWNER logfile=DRGN_OWNERexpdp.log
create directory impdp_dir as ‘/data/app1/dp‘;
grant read,write on directory impdp_dir to DRGN_OWNER;
impdp DRGN_OWNER/DRGN_OWNER DIRECTORY=impdp_dir DUMPFILE=DRGN_OWNER.dmp logfile=DRGN_OWNER.dmpimpdp.log
空表果然已经导入了
我个人建议,建立了空的数据库后,马上执行
alter system set deferred_segment_creation=flase sscope=spfile;
shutdowm immediate
startup
Oracle 11G在用EXP 导出时,空表不能导出解决
标签:form init deferred 节省空间 产生 att 系统 sig assign