今天帮开发人员导出方案时,发现此方案的回收站里有很多表,那么回收站里这些被drop的表会不会被exp导出呢,先用scott用户来测试一把
--1.建测试表,导出方案,查看dmp文件的大小
SQL> create table a as select * from all_objects;
Table created
SQL> ho exp scott/tiger owner=scott file=1.dmp
F:\sqlplus>dir -find 1.dmp
2011-10-24 15:40 7,618,560 1.dmp --现在建了一个大表,方案导出有7M左右
--2.插入数据,导出方案,查看dmp文件的大小
SQL> insert into a select * from all_objects;
65630 rows inserted
SQL> ho exp scott/tiger owner=scott file=2.dmp
F:\sqlplus>dir -find 2.dmp
2011-10-24 15:44 7,618,560 2.dmp --又插入了大量数据,但没提交,方案导出还是一样,说明没提交的话是不导出的
--3.提交事务,导出方案,查看dmp文件的大小
SQL> commit;
Commit complete
SQL> ho exp scott/tiger owner=scott file=3.dmp
F:\sqlplus>dir -find 3.dmp
2011-10-24 15:44 15,214,592 3.dmp --提交后,方案导出有15M左右
--4.drop表,导出方案,查看dmp文件的大小
SQL> drop table a;
Table dropped
SQL> show recyclebin;
ORIGINAL NAME RECYCLEBIN NAME OBJECT TYPE DROP TIME
---------------- ------------------------------ ------------ -------------------
A BIN$OrCoTIQKTtStqwwC4PLgKg==$0 TABLE 2011-10-24:15:45:03 --大表现在在回收站里了
SQL> ho exp scott/tiger owner=scott file=4.dmp
F:\sqlplus>dir -find 4.dmp
2011-10-24 15:46 20,480 4.dmp --将那个大表drop后,导出方案只有20K左右,说明回收站里的表是不会导出了