流浪人生 回复于:2003-08-20 15:23:34 |
lnx3000 回复于:2003-08-20 16:05:47 |
让imp/exp突破2GB文件大小限制! Oracle8 提供的imp/exp是常用的数据库备份工具程序, 但是由于32位addressing的限制,Oracle 8/8i的Installationguide明确指出imp,exp,SQL*Loader三个Utilities工具软件操作的文件大小不能超过2GB,但是随着数据库数据量的增大,很容易让备份文件大小超过2GB,如果正常使用imp/exp呢?一种方法是将数据作为多个文件export出来形成.dmp文件,还有一种方法是利用Unix提供的mknod命令创建FIFO,并启动compress在后台压缩,并同时运行imp(或者exp)程序: exp: #!/bin/sh mknod yourfile.dmp p compress <yourfile.dmp >yourfile.dmp.Z & exp usrename/password file=yourfile.dmp buffer=40960000 tables=(...) imp: #!/bin/sh mknod yourfile.dmp p uncompress <yourfile.dmp.Z >yourfile.dmp & imp usrename/password file=yourfile.dmp buffer=40960000 tables=(...) 上述方法在HP_UX 11.0 + Oracle 8.0.5.2.1和Sun Solaris 2.6+Oracle 8.1.5上 测试通过 作者javascript:window.open(this.src);" style="CURSOR: pointer" onload="return imgzoom(this,550)">iaomiao 摘自itpub http://www.itpub.net/showthread.php?s=342a8bd9e54608cd12ac9c076020ea0b&threadid=2844 |
stevenyi 回复于:2003-08-20 15:54:45 |
如果是linux,使用ext3或reiserfs试试看 |
zhoulm 回复于:2003-08-20 17:52:26 |
谢谢斑竹,我用第一种方法导出了,上面那种没用!!!非常感谢!!! |
nxzwt 回复于:2003-08-20 18:00:21 |
到底具体怎么实现的,说说呀! |
zhoulm 回复于:2003-08-21 08:39:03 |
exp system/manager@server file=(test1.dmp,test2.dmp,test3.dmp) filesize=1000000000 full=y direct=y 导全库的话使用full=y,direct=y是直接导出。当指定file时,在导出的过程中文件大小达到1000000000时还是会询问你第二个和第三个文件名的。 |
lnx3000 回复于:2003-08-21 08:56:32 |
可能是因为你的文件太大了,压缩后也超过2G了吧 多谢你在解决问题之后把方法写出来 |
zhoulm 回复于:2003-08-21 09:48:43 |
[quote:13623e484f="lnx3000"]可能是因为你的文件太大了,压缩后也超过2G了吧 多谢你在解决问题之后把方法写出来[/quote:13623e484f] 数据库的oradata 目录有十多个G,用上面的方法exp导出后的dmp文件有2.4G多,所以达到了限制。 |
tsgm 回复于:2003-09-03 17:24:21 |
在WINDOWS系统下没有这个问题。 |
kuherbal 回复于:2003-09-04 10:59:20 |
FILE Default: expdat.dmp Specifies the names of the export files. The default extension is .dmp, but you can specify any extension. Since Export supports multiple export files (see the parameter FILESIZE), you can specify multiple filenames to be used. When Export reaches the value you have specified for the maximum FILESIZE, Export stops writing to the current file, opens another export file with the next name specified by the parameter FILE and continues until complete or the maximum value of FILESIZE is again reached. If you do not specify sufficient export filenames to complete the export, Export will prompt you to provide additional filenames. FILESIZE Export supports writing to multiple export files and Import can read from multiple export files. If you specify a value (byte limit) for the FILESIZE parameter, Export will write only the number of bytes you specify to each dump file. When the amount of data Export must write exceeds the maximum value you specified for FILESIZE, it will get the name of the next export file from the FILE parameter (see FILE for more information) or, if it has used all the names specified in the FILE parameter, it will prompt you to provide a new export filename. If you do not specify a value for FILESIZE (note that a value of 0 is equivalent to not specifying FILESIZE), then Export will write to only one file, regardless of the number of files specified in the FILE parameter. Note: If your export file(s) requirements exceed the available diskspace, Export will abort and you will have to repeat the Export after making sufficient diskspace available. The FILESIZE parameter has a maximum value equal to the maximum value that can be stored in 64 bits. Note: The maximum value that can be stored in a file is operating system dependent. You should verify this maximum value in your operating-system specific documentation before specifying FILESIZE. You should also ensure that the file size you specify for Export is supported on the system on which Import will run. The FILESIZE value can also be specified as a number followed by K (number of kilobytes). For example, FILESIZE=2K is the same as FILESIZE=2048. Similarly, M specifies megabytes (1024 * 1024) while G specifies gigabytes (1024**3). B remains the shorthand for bytes; the number is not multiplied to get the final file size (FILESIZE=2048b is the same as FILESIZE=204 |
herogl 回复于:2003-09-04 11:06:48 |
这中问题我在AIX里面做INFORMIX DUMP的时候也碰到过,没办法,也只有通过脚本方式DUMP成多个文件。 |
windblow 回复于:2003-09-08 11:33:53 |
[quote:629e89ac1a="zhoulm"]我很想再长二十斤!![/quote:629e89ac1a] 我也很想再长二十斤,哥们你有什么好方法没有? |
仙剑 回复于:2003-09-08 14:23:00 |
[quote:d637963387="tsgm"]在WINDOWS系统下没有这个问题。[/quote:d637963387] 那是,在windows里面文件限制是4G |