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. vue-cli 3配置接口代理

    vue.config.js vue.config.js是一个可选的配置文件,新建该文件,存放在项目根目录(将自动加载)中 // 作为配置文件,直接导出配置对象即可 module.exports = { ...

  2. python之dict与set实现原理之hash算法

    理解不透彻,下回分解 http://www.cnblogs.com/pengsixiong/p/5326893.html https://blog.csdn.net/zhao_crystal/arti ...

  3. SpringMVC视图及REST风格

    点击进入第二章:SpringMVC基础配置 什么是视图解析器? springMVC用于处理视图最重要的两个接口是ViewResolver和View. ViewResolver的主要作用是把一个逻辑上的 ...

  4. Nginx详解十八:Nginx深度学习篇之Rewrite规则

    Rewrite规则可以实现对url的重写,以及重定向 作用场景: 1.URL访问跳转,支持开发设计,如页面跳转,兼容性支持,展示效果等 2.SEO优化 3.维护:后台维护.流量转发等 4.安全 配置语 ...

  5. 性能测试四十七:jmeter性能监控工具ServerAgent

    在liunx压力机进行压测的时候,可以在widows下开一个jmeter,只进行监控用,不产生压力,监控效果和dstat差不多 jmeter安装客户端插件 把工具放到服务端任意目录并解压,我这里放到了 ...

  6. binlog2sql之MySQL数据闪回实践

    DBA或开发人员,有时会误删或者误更新数据,如果是线上环境并且影响较大,就需要能快速回滚.传统恢复方法是利用备份重搭实例,再应用去除错误sql后的binlog来恢复数据.此法费时费力,甚至需要停机维护 ...

  7. 开放系统的直连式存储(Direct-Attached Storage,简称DAS)

    开放系统的直连式存储(Direct-Attached Storage,简称DAS)已经有近四十年的使用历史,随着用户数据的不断增长,尤其是数百GB以上时,其在备份.恢复.扩展.灾备等方面的问题变得日益 ...

  8. oracle 备份脚本

    本文是一个shell脚本.主要用于Oracle 数据库备份.默认情况下,在周一晚上进行全备.其他时间进行累积增量备份. 使用方法: 假如脚本保存名为: oracle_backup.sh 使用方法为 o ...

  9. excel vba获取拼音

    Function PinYin2(Hz As String) Dim PinMa As String Dim MyPinMa As Variant Dim Temp As Integer, i As ...

  10. office web apps搭建与解决方案

    微软office在线预览解决方案https://view.officeapps.live.com/op/view.aspx?src=http://storage.xuetangx.com/public ...