我的程序
FileOutputStream fosStandr = new FileOutputStream("e:\\standar.txt");
FileOutputStream fosError = new FileOutputStream("e:\\error.txt");
Process proc = Runtime.getRuntime().exec("sqlldr userid=name/pwd@service control=importlog.ctl");
StreamHandler errorGobbler = new
StreamHandler(proc.getErrorStream(), "ERROR",fosError);
proc.getOutputStream();
StreamHandler outputGobbler = new
StreamHandler(proc.getInputStream(), "OUTPUT", fosStandr);
errorGobbler.start();
outputGobbler.start();我处理了getErrorStream(), proc.getInputStream()却没得到正确的输出结果。
实际执行 Runtime.getRuntime().exec("sqlldr userid=name/pwd@service control=importlog.ctl");得到一个log文件,内容很长,类似如下在直接路径中没有使用绑定数组大小。
列数组 行数: 5000
流缓冲区字节数: 256000
读取 缓冲区字节数: 1048576跳过的逻辑记录总数: 0
读取的逻辑记录总数: 6
拒绝的逻辑记录总数: 3
废弃的逻辑记录总数: 0
由 SQL*Loader 主线程加载的流缓冲区总数: 2
由 SQL*Loader 加载线程加载的流缓冲区总数: 0从 星期日 9月 28 15:41:02 2008 开始运行
在 星期日 9月 28 15:41:02 2008 处运行结束而我生成的standar.txt和error.txt内容却很少只有
SQL*Loader: Release 10.2.0.1.0 - Production on 星期日 9月 28 15:41:02 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
加载完成 - 逻辑记录计数 6。
是什么原因呢?
FileOutputStream fosStandr = new FileOutputStream("e:\\standar.txt");
FileOutputStream fosError = new FileOutputStream("e:\\error.txt");
Process proc = Runtime.getRuntime().exec("sqlldr userid=name/pwd@service control=importlog.ctl");
StreamHandler errorGobbler = new
StreamHandler(proc.getErrorStream(), "ERROR",fosError);
proc.getOutputStream();
StreamHandler outputGobbler = new
StreamHandler(proc.getInputStream(), "OUTPUT", fosStandr);
errorGobbler.start();
outputGobbler.start();我处理了getErrorStream(), proc.getInputStream()却没得到正确的输出结果。
实际执行 Runtime.getRuntime().exec("sqlldr userid=name/pwd@service control=importlog.ctl");得到一个log文件,内容很长,类似如下在直接路径中没有使用绑定数组大小。
列数组 行数: 5000
流缓冲区字节数: 256000
读取 缓冲区字节数: 1048576跳过的逻辑记录总数: 0
读取的逻辑记录总数: 6
拒绝的逻辑记录总数: 3
废弃的逻辑记录总数: 0
由 SQL*Loader 主线程加载的流缓冲区总数: 2
由 SQL*Loader 加载线程加载的流缓冲区总数: 0从 星期日 9月 28 15:41:02 2008 开始运行
在 星期日 9月 28 15:41:02 2008 处运行结束而我生成的standar.txt和error.txt内容却很少只有
SQL*Loader: Release 10.2.0.1.0 - Production on 星期日 9月 28 15:41:02 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
加载完成 - 逻辑记录计数 6。
是什么原因呢?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货