使用
$command = "sqlldr userid=abc/abc_def@defghijk CONTROL= $controlFileName DATA=\"$csvFilePath\" LOG=$logFile1 BAD=$logFile2";
exec($command,$output,$returnValue);
得到了输出:
SQL*Loader: Release 11.2.0.1.0 - Production on Wed Feb 19 15:53:58 2014
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Load completed - logical record count 196.
而不是这个输出,是否可以从日志文件到PHP的结果的下面部分:
Table table_name:
195 Rows successfully loaded.
1 Row not loaded due to data errors.
0 Rows not loaded because all WHEN clauses were failed.
0 Rows not loaded because all fields were null.
Partition SYS_P42102: 195 Rows loaded.
Bind array size not used in direct path.
Column array rows : 5000
Stream buffer bytes: 256000
Read buffer bytes: 1048576
Total logical records skipped: 2
Total logical records read: 196
Total logical records rejected: 1
Total logical records discarded: 0
Total stream buffers loaded by SQL*Loader main thread: 2
Total stream buffers loaded by SQL*Loader load thread: 0
即,我想从sqlldr命令返回值,即读取了多少行,拒绝了多少行以及插入了多少行?
感谢。