Oracle SQL Loader - 如何不显示“达到提交点 - 逻辑记录计数”计数
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11902476/
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
Oracle SQL Loader - How to not display "Commit point reached - logical record count" counts
提问by Superdooperhero
I'm loading big files via Oracle SQL Loader over vpn from home, and they're taking a lot of time. They were a lot faster to load when I loaded them from work. The files I'm loading are on my work server already.
我正在通过 Oracle SQL Loader 从家里通过 vpn 加载大文件,而且它们花费了很多时间。当我从工作中加载它们时,它们的加载速度要快得多。我正在加载的文件已经在我的工作服务器上。
So my thinking is that the slow down is because of the "Commit point reached - logical record count" that is printed for each row. Must be slow due to them having to be sent over the network. I googled but can't find any way to print less of them. Tried adding rows=5000 as a parameter, but I still get the prints for each row.
所以我的想法是速度变慢是因为为每一行打印了“达到提交点 - 逻辑记录计数”。由于它们必须通过网络发送,所以速度一定很慢。我用谷歌搜索但找不到任何方法来减少它们的打印量。尝试添加行 = 5000 作为参数,但我仍然得到每一行的打印。
How can I print less of the "Commit point reached - logical record count" counts?
如何打印更少的“达到提交点 - 逻辑记录计数”计数?
Thanks
谢谢
回答by Ben
You can use the keyword silent
, which is available in the options clause. You can set the following thingsto be silent:
您可以使用关键字silent
,该关键字在选项子句中可用。您可以将以下内容设置为静音:
- HEADER - Suppresses the SQL*Loader header messages that normally appear on the screen. Header messages still appear in the log file.
- FEEDBACK - Suppresses the "commit point reached" feedback messages that normally appear on the screen.
- ERRORS - Suppresses the data error messages in the log file that occur when a record generates an Oracle error that causes it to be
written to the bad file. A count of rejected records still appears.- DISCARDS - Suppresses the messages in the log file for each record written to the discard file.
- PARTITIONS - Disables writing the per-partition statistics to the log file during a direct load of a partitioned table.
- ALL - Implements all of the suppression values: HEADER, FEEDBACK, ERRORS, DISCARDS, and PARTITIONS.
- HEADER - 抑制通常出现在屏幕上的 SQL*Loader 头消息。标头消息仍会出现在日志文件中。
- 反馈 - 抑制通常出现在屏幕上的“达到提交点”反馈消息。
- ERRORS - 抑制日志文件中出现的数据错误消息,当记录生成 Oracle 错误导致其
写入错误文件时。仍会显示拒绝记录的计数。- DISCARDS - 为写入丢弃文件的每条记录抑制日志文件中的消息。
- PARTITIONS - 在直接加载分区表期间禁止将每个分区的统计信息写入日志文件。
- ALL - 实现所有抑制值:HEADER、FEEDBACK、ERRORS、DISCARDS 和 PARTITIONS。
You would want to suppress feedback
.
你会想要压制feedback
.
You can either use on the command line, for instance:
您可以在命令行上使用,例如:
sqlldr schema/pw@db silent=(feedback, header)
On in the options clause of the control file, for instance:
在控制文件的选项子句中,例如:
options (bindsize=100000, silent=(feedback, errors) )
回答by DCookie
Try redirecting output and error to a file.
尝试将输出和错误重定向到文件。
回答by Kemin Zhou
Ben's answer is very good. Do not use any shell program to suppress the STDOUT
. I used the following:
本的回答非常好。不要使用任何 shell 程序来抑制STDOUT
. 我使用了以下内容:
sqlldr schema/pw@db mycontrolfile.ctl | sed '/Commit point reached/d'
One of the problems with this is that if you are using scripts to run the command, then the error return value will be flushed by the sed command. Put it another way, if for some reason, the sqlldr failed with return value of 1, then sed will immediately flush this with return value of 0. So your error state will be flushed.
这样做的问题之一是,如果您使用脚本来运行命令,那么错误返回值将被 sed 命令刷新。换句话说,如果由于某种原因,sqlldr 失败,返回值为 1,那么 sed 将立即刷新它,返回值为 0。因此您的错误状态将被刷新。
Redirecting STDOUT
and STDERR
might not be as good as Ben's solution.
重定向STDOUT
并且STDERR
可能不如 Ben 的解决方案好。
回答by greatvedas
I had same problem while calling sqlldr
from a shell script.
sqlldr
从 shell 脚本调用时我遇到了同样的问题。
ERROR:
错误:
SQL*Loader: Release 10.2.0.3.0 - Production on Tue Aug 9 20:06:38 2016 Copyright (c) 1982, 2005, Oracle. All rights reserved.
Commit point reached - logical record count 64
SQL Loader failed for the table myschema.ORG_MOVEMENT_RULES. Exiting...
SQL*Loader:10.2.0.3.0 版 - 2016 年 8 月 9 日星期二 20:06:38 版权所有 (c) 1982, 2005,Oracle。版权所有。
达到提交点 - 逻辑记录数 64
表 myschema.ORG_MOVEMENT_RULES 的 SQL 加载程序失败。退出...
Upon Investigation, found that the control file (v_movementrules_control)
got corrupted while copying from a Windows to Unix system and it got DOS/Windows line ending characters ^M
at end of every line.
经调查,发现控制文件(v_movementrules_control)
在从 Windows 复制到 Unix 系统时损坏,并且^M
在每行末尾都有 DOS/Windows 行结束符。
sqlldr userid=${USER}/${PASS}@${DB} control=${v_OrgRules_Control}