一套10g的库,客户觉得每次逻辑导出觉得文件太大,占用较多的文件系统空间。
给出的建议是exp管道压缩的方式导出文件 ,受版本的限制无法使用expdp方式 。
oracle 10g下,expdp只支持metadata_only的方式
COMPRESSION Reduce size of dumpfile contents where valid
keyword values are: (METADATA_ONLY) and NONE.
oracle11g下,就支持数据的压缩了。
COMPRESSION Reduce the size of a dump file.
Valid keyword values are: ALL, DATA_ONLY, [METADATA_ONLY] and NONE.
以下给出测试方法
1、先创建命名管道
[ora10@ora12c ~]$ mknod /ora11_10/dumpfile/jinzypipe p
2、使用管道压缩的方法导出数据
[ora10@ora12c ~] exp jinzy/jinzy file=/ora11_10/dumpfile/jinzypipe tables=test & gzip < /ora11_10/dumpfile/jinzypipe > /ora11_10/dumpfile/jinzycompress.gz
3、exp直接导出 [ora10@ora12c ~]$ exp jinzy/jinzy file=/ora11_10/dumpfile/jinzynocompress tables=test
4、对比导出文件大小
[ora10@ora12c dumpfile]$ ls -lrth
total 370M
prw-r--r--. 1 ora10 oinstall 0 Jun 21 15:03 jinzypipe
-rw-r--r--. 1 ora10 oinstall 36M Jun 21 15:03 jinzycompress.gz
-rw-r--r--. 1 ora10 oinstall 334M Jun 21 15:12 jinzynocompress.dmp
==》36:334,管道压缩的方式只占用很少的空间。
另外使用管道导入文件
[ora10@ora12c ~]$imp jinzy/jinzy file=/ora11_10/dumpfile/jinzypipe tables=test & gunzip < /ora11_10/dumpfile/jinzycompress.gz > /ora11_10/dumpfile/jinzypipe
==》这种方式,不需要手工进行解压
总结:
1、该方式适用于exp,不适用于expdp
2、这种方式导出就是压缩好的文件,减少了文件系统的占用
3、这是以牺牲系统性能换空间的一种方式,应充分测试后再使用。
end!
给出的建议是exp管道压缩的方式导出文件 ,受版本的限制无法使用expdp方式 。
oracle 10g下,expdp只支持metadata_only的方式
COMPRESSION Reduce size of dumpfile contents where valid
keyword values are: (METADATA_ONLY) and NONE.
oracle11g下,就支持数据的压缩了。
COMPRESSION Reduce the size of a dump file.
Valid keyword values are: ALL, DATA_ONLY, [METADATA_ONLY] and NONE.
以下给出测试方法
1、先创建命名管道
[ora10@ora12c ~]$ mknod /ora11_10/dumpfile/jinzypipe p
2、使用管道压缩的方法导出数据
[ora10@ora12c ~] exp jinzy/jinzy file=/ora11_10/dumpfile/jinzypipe tables=test & gzip < /ora11_10/dumpfile/jinzypipe > /ora11_10/dumpfile/jinzycompress.gz
3、exp直接导出 [ora10@ora12c ~]$ exp jinzy/jinzy file=/ora11_10/dumpfile/jinzynocompress tables=test
4、对比导出文件大小
[ora10@ora12c dumpfile]$ ls -lrth
total 370M
prw-r--r--. 1 ora10 oinstall 0 Jun 21 15:03 jinzypipe
-rw-r--r--. 1 ora10 oinstall 36M Jun 21 15:03 jinzycompress.gz
-rw-r--r--. 1 ora10 oinstall 334M Jun 21 15:12 jinzynocompress.dmp
==》36:334,管道压缩的方式只占用很少的空间。
另外使用管道导入文件
[ora10@ora12c ~]$imp jinzy/jinzy file=/ora11_10/dumpfile/jinzypipe tables=test & gunzip < /ora11_10/dumpfile/jinzycompress.gz > /ora11_10/dumpfile/jinzypipe
==》这种方式,不需要手工进行解压
总结:
1、该方式适用于exp,不适用于expdp
2、这种方式导出就是压缩好的文件,减少了文件系统的占用
3、这是以牺牲系统性能换空间的一种方式,应充分测试后再使用。
end!
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/25923810/viewspace-2121183/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/25923810/viewspace-2121183/