问题现象:

完整的SQL脚本如下:

select ac.constraint_name key_name, acc.column_name key_col, 1 from all_cons_columns acc, all_constraints ac where acc.owner = ac.owner and acc.constraint_name = ac.constraint_name and acc.table_name = ac.table_name and ac.constraint_type = 'P' and ac.owner = user and ac.table_name = :TableName order by acc.constraint_name

查阅咨询显示,使用OracleCommandBuilder对象后会产生该语句,而bulkcopy正是使用了该对象。

The query you have mentioned is done by OracleCommandBuilder to get the schema information from the database.

Once queried, the instance of OracleCommandBuilder creates an internal cache of it and reuses it.

But when you create new instance of OracleCommandBuilder it will run this query again.

To avoid it, create OracleCommandBuilder once and reuse it. For example, you can define a static variable to hold the instance,

or you can create it once in caller class and pass it as an argument every use.

https://social.msdn.microsoft.com/Forums/en-us/53defa9c-82f2-48b4-b923-6afbc064928c/oraclecommandbuilder-and-repetitive-internal-query?forum=adodotnetdataproviders

按照提示修改每次bulkcopy的批量大小后,问题消失。

最新文章

  1. kaggle数据挖掘竞赛初步--Titanic<派生属性&维归约>
  2. 【BZOJ 3809】Gty的二逼妹子序列
  3. SQLSERVER复制的要点
  4. Ribbon_窗体_实现Ribbon风格的窗体
  5. 利用DetachedCriteria实现模糊查询和分页
  6. 时间日期Date类型
  7. vim 配置语法高亮 行号标示
  8. VC环境下编译OpenSSL(仅仅是个示例,网上还有许多相关文章)
  9. sqlserver 存储过程 带输出参数
  10. Spring--ClassPathResource
  11. SpringMvc支持跨域访问,Spring跨域访问,SpringMvc @CrossOrigin 跨域[转]
  12. MySql查询最近一个月,一周,一天
  13. Linux 设置IP地址,并能连接外网
  14. jq控制select值为某个时选中
  15. centos 基础修改文件权限
  16. HDU 6129 Just do it(杨辉三角)
  17. Selenium 错误处理之:stale element reference: element is not attached to the page document
  18. BaiduMap 鼠标绘制矩形选框四个顶角坐标的获取
  19. scala简介
  20. 180619-Yaml文件语法及读写小结

热门文章

  1. thinkPHP 数字字典
  2. 51nod 1264 线段相交(几何)
  3. JSP显示不完全问题
  4. guava学习--集合2&Range
  5. 9_13学习完整修改和查询&&实体类,数据访问类
  6. const 放在函数后
  7. Ubuntu-搜狗输入法
  8. Android M新特性之Behavior Changes
  9. Java中文档制作与继承
  10. 《Java中方法的重写》