通过 TOAD 将大型 CSV 导入 Oracle
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/30883445/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Importing large CSV to Oracle via TOAD
提问by S_S
I have a large CSV file (around 620,000,000 records) which I need to import into Oracle via Toad. It gives out of memory.
我有一个大型 CSV 文件(大约 620,000,000 条记录),我需要通过 Toad 将其导入 Oracle。它给出了内存不足。
I have been able to split them into .xls files with single sheet in each. How can I upload data into a table from multiple xls files, or is there a better alternative?
我已经能够将它们拆分为 .xls 文件,每个文件都有一张纸。如何将数据从多个 xls 文件上传到表中,或者有更好的选择吗?
回答by S_S
The way is to use SQL*LOADER
, and in TOAD there is an option Database->Import->SQL*LOADER
wizard. One can directly specify the input file and the table in which records are to be inserted/appended.
方法是使用SQL*LOADER
,在TOAD中有一个选项Database->Import-> SQL*LOADER
wizard。可以直接指定要插入/附加记录的输入文件和表。
A problem that may arise is the availability of sqlldr.exe when working on Oracle 10g Instant Client. For this, the user may download the Oracle Universal Installer, OUI, (the one for 11g will work too), and this provides sqlldr.exe. It needs to be added to the SQL*LOADER
path in TOAD (View->Toad Options->Executables).
可能出现的一个问题是在 Oracle 10g Instant Client 上工作时 sqlldr.exe 的可用性。为此,用户可以下载 Oracle Universal Installer OUI(11g 的也可以),它提供了 sqlldr.exe。需要添加到SQL*LOADER
TOAD中的路径中(View->Toad Options->Executables)。
Finally, in case after installing the OUI there are problems starting TOAD (error related to NLS environment), create a system variable NLS_LANG
with value AMERICAN_AMERICA.WE8ISO8859P1
. This should fix TOAD connectivity issues.
最后,如果安装 OUI 后启动 TOAD 出现问题(与 NLS 环境相关的错误),请创建一个NLS_LANG
值为的系统变量AMERICAN_AMERICA.WE8ISO8859P1
。这应该可以解决 TOAD 连接问题。