惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

J
Java Code Geeks
Hugging Face - Blog
Hugging Face - Blog
博客园_首页
爱范儿
爱范儿
罗磊的独立博客
美团技术团队
Jina AI
Jina AI
量子位
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
酷 壳 – CoolShell
酷 壳 – CoolShell
有赞技术团队
有赞技术团队
V
V2EX
阮一峰的网络日志
阮一峰的网络日志
小众软件
小众软件
IT之家
IT之家
雷峰网
雷峰网
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 司徒正美
大猫的无限游戏
大猫的无限游戏
博客园 - 聂微东
月光博客
月光博客
人人都是产品经理
人人都是产品经理
博客园 - 三生石上(FineUI控件)

博客园 - davidullua

Google chrome的离线安装版 百度进军B2C行业 File Comparer - To compare two files and check whether they have the same content No size set for variable length data type: String Response.WriteFile()下载文件,打开对话框出现两次 - davidullua - 博客园 to create table if table do not exist -- to backup and restore table in oracle Gmail邀请 to call Session_End() event when user closed Browser When Session_End() and Session_Start() Fires Oracle FAQ: 未在本地计算机上注册"OraOLEDB.Oracle"提供程序 (The 'OraOLEDB.Oracle' provider is not registered on the local machine) solution - davidullua ora-00054 , alter system kill session 'id,serial#' Change Path of C:\Documents and Settings - davidullua About FormsAuthentication.RedirectFromLoginPage(string username, bool createPersistentCookie) Send email by jmail or CDO according to configuration C#中调用控件的事件 [导入]C#向Sql Server中插入记录时单引号的处理 [导入]C#使用CDO发送邮件 [导入]使用jmail组件发送电子邮件(C#) [导入]C#中使用反射显示程序集的所有类型和属性 [导入]使用Oracle Developer Tools For Visual Studio .NET
about Ora-03114 disable asp.net connection pool(pooling)
davidullua · 2005-09-21 · via 博客园 - davidullua

I have met the ora-03114 error ("not connected to oracle")when connection Oracle 9i through asp.net by OracleClient drive. And tried to use OLEDB to connect to oracle, the error still occured.

It seems the ora-03114 error occured randomly, more exactly, it would occur several hours after the web application run, or occur in every morning. after the error appearance, no one could logon web application(logon process would be validated in database), each time it shows exception of ora-03114.

What confused us is when the connection error happen, and we rename the Web.config to a new name, and rename it back; or just modify the connection string, and modify it back, things would be ok. I think when web.config is modified, IIS would recompile(maybe restart is more exact) web application and repick connection string. Later, through searching engine's help, of course done by goole, I know IIS makes a connection pool for each different connection string, and do not release the connection even when network is down or oracle is restarted. thus when server execute a query, it failed. And we searched and know it is a bug of Dotnet pooling.

I tried several days, and found a way to solve the problem. when we use oledb to connecting to oracle, and immediatly dispose connection after each query(query by instance connection), it would works fine. However, we use OracleClient before, and use each query was done by a single static instance connection. It would cost a great effort to change our source code.

At last we contact Microsoft, and got a solution to disable connection pool,  just add "Pooling=False" in the connection string for OracleClient.(SqlClient and OracleClient are the same), or add "OLE DB Services=-4;" for OLEDB.

After disable connection pool, the second time we log on the system, it could be connecting all the time, and do not throw an exception or connected to database. We found our static connection wasn't closed, the pooling is false, thus it always tried to connect to oracle and failed. We close the connection each time a session start in the Session_Start() of Global.asax. It solved all problems.