A ResultSet object is automatically closed by the Statement object that generated it when that Statement object is closed, re-executed, or is used to retrieve the next result from a sequence of multiple results.

22
 

The init.ora parameter open_cursors defines the maximum of opened cursors a session can have at once. It has a default value of 50. If the application exceeds this number the error "ORA-01000: maximum open cursors exceeded" is raised.

Therefore it's mandatory to close the JDBC resources when they are not needed any longer, in particular java.sql.ResultSet and java.sql.Statement. If they are not closed, the application has a resource leak.

In case of reusing the Connection object, you must be aware of the fact that the opened oracle cursors are kept open and in use as long the connection exists and the transaction has not ended. When the application commits, the opened cursors are released.

Therefore as an application designer you need to know a rough estimation of the needed open cursors for your most complex transaction.

The difficulty lies in the inability of oracle's internal parameter views (v$open_cursor, v$sesstat, et. al.) to show the difference between opened cursors, which are reusable and opened cursors, which are still blocked (not reusable!) by an unclosed ResulSet or Statement. If you close all Statement and ResultSet objects in your finally block, your application is perfectly fine.

Adjusting the init.ora parameter works like this (our application needs 800 cursors at a maximum)

ORA-01000的更多相关文章

  1. ORA-12541:TNS:no listener 客户端tnsnames.ora配置,以及服务端listener.ora配置

    需求:客户端(192.168.25.1)需要访问服务端(192.168.7.215)的Oracle库ORCL. 步骤一:配置客户端tnsnames.ora 步骤二:配置服务端listener.ora ...

  2. Oracle的tnsnames.ora配置(PLSQL Developer)

    首先打开tnsnames.ora的存放目录,一般为D:\app\Administrator\product\11.2.0\client_1\network\admin,就看安装具体位置了. 步骤阅读 ...

  3. Oracle RAC客户端tnsnames.ora相关配置及测试

    1.Oracle RAC服务端/etc/hosts部分内容如下 2.查看服务端的local_listener和remote_listener参数 3.客户端tnsnames.ora配置参考 3.1 1 ...

  4. oracle的sqlnet.ora,tnsnames.ora,listener.ora三个配置文件

    总结: 1 .三个配置文件都是放在$ORACLE_HOME\network\admin目录下. 2 .sqlnet.ora确定解析方式 3 .listener.ora上设SID_NAME,通常用于JD ...

  5. oracle客户端安装配置 tnsnames.ora文件

    Oracle客户端tnsnames.ora连接配置 Oracle90的在C:\Oracle\ora90\network\ADMIN下面 Oracel10g的在D:\oracle\product\10. ...

  6. 修改tnsnames.ora文件中配置内容中的连接别名后,连接超时解决办法

    1.tnsnames.ora文件中配置内容中的连接别名:由upaydb修改为IP地址 2.连接超时 定位原因: PLSQL登录界面的数据库列表就是读的tnsname.ora中连接的别名,这个文件中连接 ...

  7. 安装了多个Oracle11g的客户端,哪个客户端的tnsnames.ora会起作用?

    如果我们由于需要安装了多个Oracle的client,哪个客户端的tnsnames.ora会起作用呢? 答案是: 在安装好clinent端后,安装程序会把client的bin目录放到path里面,pa ...

  8. PLSQL登录数据库 报ORA -12154的诡异问题

    https://q.cnblogs.com/q/89420/ 现象: 1.机器上先后安装了oracle两个版本的client.在装第一个client后,plsql可以顺利连接数据库a并登录. 2.安装 ...

  9. tnsnames.ora配置注意(连接新的数据库)

    文件地址D:\app\think\product\11.2.0\instantclient_11_2\network\admin\tnsnames.ora# tnsnames.ora Network ...

  10. listener.ora/sqlnet.ora/tnsnames.ora配置文件详解

    oracle网络配置 三个配置文件 listener.ora.sqlnet.ora.tnsnames.ora ,都是放在$ORACLE_HOME/network/admin目录下. 英文说明: The ...

随机推荐

  1. LeetCode(76): 最小覆盖子串

    Hard! 题目描述: 给定一个字符串 S 和一个字符串 T,请在 S 中找出包含 T 所有字母的最小子串. 示例: 输入: S = "ADOBECODEBANC", T = &q ...

  2. python网络爬虫笔记(二)

    一.函数调用的默认设置 1.def enroll(name,grnder,age=4,city='Shanghai'): print (''name:',name) print (''gender', ...

  3. python(5):scipy之numpy介绍

    python 的scipy 下面的三大库: numpy, matplotlib, pandas scipy 下面还有linalg 等 scipy 中的数据结构主要有三种: ndarray(n维数组), ...

  4. lightoj1234 打表技巧:分块打表

    /* 打不了那么大的表,所以只记录分块的信息即可 */ #include<bits/stdc++.h> using namespace std; #define maxn 1000005 ...

  5. 第三周学习总结-Java

    2018年7月29日 这是暑假第三周.这一周我把找到的Java教学视频看完了. 本周学到了Java剩余的基础知识,比如:抽象类.接口.内部类.几种常用类.IO流.多态.多线程等等. 因为没有书,所以我 ...

  6. JS中----this的指向和如何修改this的指向

    this this是js中的一个关键字,函数运行时自动生成的一个内部对象,只能在函数内部使用.我们要讨论的是 this 的指向. this就是函数运行时自动生成的一个内部对象 下面介绍一下几种情况下, ...

  7. 如何使用Scrapy框架实现网络爬虫

    现在用下面这个案例来演示如果爬取安居客上面深圳的租房信息,我们采取这样策略,首先爬取所有租房信息的链接地址,然后再根据爬取的地址获取我们所需要的页面信息.访问次数多了,会被重定向到输入验证码页面,这个 ...

  8. 数据库和linux对大小写的区分

  9. 跨域 XMLHttpRequest对象

    XMLHttpRequest对象是ajax编程的基础,用于发送请求(数据)与服务端进行交互. 目前主流浏览器都内置了XMLHttpRequest对象. 浏览器会使用XMLHttpRequest对象来创 ...

  10. 分库分表之后全局id怎么生成

    数据库自增id: 这个就是说你的系统里每次得到一个id,都是往一个库的一个表里插入一条没什么业务含义的数据,然后获取一个数据库自增的一个id.拿到这个id之后再往对应的分库分表里去写入. 这个方案的好 ...