【问题标题】:ORACLE Temp table not session specific (ODP.NET)ORACLE 临时表不是特定于会话的 (ODP.NET)
【发布时间】:2013-05-25 01:53:46
【问题描述】:

我有一个程序调用使用临时表的存储过程。我注意到我第一次拨打电话时,我得到了正确数量的数据,但是每 n 次调用,行都会变得越来越大。

我调查了这个问题并了解到临时表没有被清除,所以我不得不在我的存储过程的开头手动添加一个删除语句。

DELETE FROM  sampleSchema.temp; --This was added AFTER i found out it doesnt clear per session
        -- put relevant data set into temp table first
INSERT INTO sampleSchema.temp (date_, por, id)

这是我的 ODP.net 表结构和连接字符串:

-- Create table
create global temporary table sampleSchema.temp
(
  date_        NUMBER(8) not null,
  por    VARCHAR2(30) not null,
  id       VARCHAR2(12) not null
)
on commit preserve rows;

ODP.NET 的连接字符串:

<connectionStrings>
        <add name="EDB" connectionString="USER ID=/;MIN POOL SIZE=1;DATA SOURCE={0};CONNECTION TIMEOUT=16;MAX POOL SIZE=12" />
</connectionStrings>

【问题讨论】:

    标签: c# oracle odp.net temp-tables


    【解决方案1】:

    on commit delete rows 选项可以解决这个问题吗?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-01-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-09-21
      相关资源
      最近更新 更多