2g文件导入mysql_Oracle数据库导出遇到2G文件大小限制!急!!!!

你的位置:

问答吧

-> 数据库

-> 问题详情

Oracle数据库导出遇到2G文件大小限制!急!!!!

exp导出时中止,显示文件大小达到限制,我看dmp文件大小为2147483647,应该系统的限制吧?该如何解决,请大家帮帮小弟!!

作者: zhoulm

发布时间: 2003-08-20

如果是linux,使用ext3或reiserfs试试看

作者: 流浪人生

发布时间: 2003-08-20

让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.Z &

exp usrename/password file=yourfile.dmp buffer=40960000 tables=(...)

imp:

#!/bin/sh

mknod yourfile.dmp p

uncompress ;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上

测试通过

作者iaomiao

摘自itpub

http://www.itpub.net/showthread.php?s=342a8bd9e54608cd12ac9c076020ea0b&threadid=2844

作者: stevenyi

发布时间: 2003-08-20

谢谢斑竹,我用第一种方法导出了,上面那种没用!!!非常感谢!!!

作者: lnx3000

发布时间: 2003-08-20

到底具体怎么实现的,说说呀!

作者: zhoulm

发布时间: 2003-08-20

exp system/manager@server file=(test1.dmp,test2.dmp,test3.dmp) filesize=1000000000 full=y direct=y

导全库的话使用full=y,direct=y是直接导出。当指定file时,在导出的过程中文件大小达到1000000000时还是会询问你第二个和第三个文件名的。

作者: nxzwt

发布时间: 2003-08-20

可能是因为你的文件太大了,压缩后也超过2G了吧

多谢你在解决问题之后把方法写出来

作者: zhoulm

发布时间: 2003-08-21

QUOTE:

原帖由 "lnx3000" 发表:

可能是因为你的文件太大了,压缩后也超过2G了吧

多谢你在解决问题之后把方法写出来

数据库的oradata 目录有十多个G,用上面的方法exp导出后的dmp文件有2.4G多,所以达到了限制。

作者: lnx3000

发布时间: 2003-08-21

在WINDOWS系统下没有这个问题。

作者: zhoulm

发布时间: 2003-08-21

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

作者: tsgm

发布时间: 2003-09-03

这中问题我在AIX里面做INFORMIX DUMP的时候也碰到过,没办法,也只有通过脚本方式DUMP成多个文件。

作者: kuherbal

发布时间: 2003-09-04

[quote]原帖由 "zhoulm"]我很想再长二十斤!![/quote 发表:

我也很想再长二十斤,哥们你有什么好方法没有?

作者: herogl

发布时间: 2003-09-04

[quote]原帖由 "tsgm"]在WINDOWS系统下没有这个问题。[/quote 发表:

那是,在windows里面文件限制是4G

作者: windblow

发布时间: 2003-09-08

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值