导出前分析表格垃圾数据
select
us.BYTES/
1024
kb ,us.SEGMENT_NAME
from
user_segments us
where
us.segment_type=
'TABLE'
order
by
BYTES
desc
truncate table 垃圾数据过多的表;
|
导出UAT2 数据库脚本
|
导入数据
把导出的文件上传或者移动到 目标数据库服务器 DATA_PUMP_DIR 目录下
chown oracle:oracle 源数据库导出文件
chmod 777 源数据库导出文件
cp 文件 目录
|
导入数据类型需要注意的 关联oid相同,说明type的oid在Oracle内部是作为关联的重要信息使用的。 在impdp中,我们可以使用transform参数设置,要求将原有dmp文件中oid映射重新生成。
impdp scottback/scottback@wilson directory=my_dir dumpfile=scott.dmp logfile=resimp2.log remap_schema=scott:scottback transform=oid:n
|