开发者

Visual Studio Debugging and Database (Oracle) Connections?

开发者 https://www.devze.com 2022-12-11 13:11 出处:网络
Each time I run my application it creates a connection to the Oracle database (pretty typical).The problem I\'m running into is that, when I kill the debugger to stop the application the code to close

Each time I run my application it creates a connection to the Oracle database (pretty typical). The problem I'm running into is that, when I kill the debugger to stop the application the code to close the database connection never 开发者_JAVA百科gets called.

Oracle doesn't seem to realize that those connections are now unimportant and it tries to keep the connection open. Eventually, I run into errors and problems because there aren't any available connections.

It seems like this has to be a common problem. But I couldn't find anything about how to fix it.

Suggestions?


You need to add the SQLNET.EXPIRE_TIME clause to your sqlnet.ora file.


That is strange. Oracle must drop connection, if not instantly, but with some interval. Anyway, you can write a program to select connections from your program and your machine and drop them. Run it in some intervals. See http://www.techper.net/2008/02/04/killing-an-oracle-session-using-sql/

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号