Skip to main content

Oracle ORA-01000 maximum open cursors exceeded

Several days ago, I wrote a piece of program in C#/.Net to import some records into oracle database. It is windows version 10g XE. When the program is running, I got a run-time error which is ORA-01000 maximum open cursors exceeded.

Here is the Oracle docs about ORA-01000:

ORA-01000 maximum open cursors exceeded

Cause: A host language program attempted to open too many cursors. The initialization parameter OPEN_CURSORS determines the maximum number of cursors per user.

Action: Modify the program to use fewer cursors. If this error occurs often, shut down Oracle, increase the value of OPEN_CURSORS, and then restart Oracle.


In order to solve this problem, I increased my OPEN_CURSORS by using:

ALTER SYSTEM SET open_cursors = 5000 SCOPE=BOTH;

You can use SQL/PL client and "connect" command to login the database system by using "system" user to change the open_cursors.

If you are using .NET, DBA, and Java programming, please remember to close all the readers or recordsets.
Otherwise, the un-used readers will bite all of your cursors.



Comments

Popular posts from this blog

Changing Task Progress By SwingWorker

When SwingWorker is used to report task progress, it should be noted that the propertyChangeEvent won't be invoked if the oldValue is the same as the oldValue. To solve this problem, it is better to reset your progress status to zero or random number before the SwingWorker starts. The setting will force the propertyChangeEvent to be invoked. So your progress status will be updated.

Java: Syntax error, parameterized types are only available if source level is 5.0

HOW TO FIX IT: It is because eventhough you have Java 5 installed, the JVM running may be different. Try typing this in the console window: java -version. It will give you the Version of the Runtime Environment. Or, if you are using an IDE, then you need to enable Java 5 support. In Eclipse, You can add Java 5 in Window > Preferences > Java > Installed JRE’s. and/or, Set the compiler compliance level to 5.0 (Window > Preferences > Java > Compiler) In Netbeans, you can use (Tools -> Java Platform Manager) to check your default platform. If you use javac commond line, try: javac -1.5 xxx.java Reference: http://laksmono.wordpress.com/2007/05/27/syntax-error-parameterized-types-are-only-available-if-source-level-is-50/

(zz) 加州七至十日自驾攻略--贡献篇

一晃大半年竟然飘忽忽地过去了。这里这么冷清。这大半年门儿也不出了,闲 情逸致的书也少读了,朋友也没聚了。少了丰富的生活,觉得手生了,心钝了,懒洋洋 的 开始倒退了。这可怎么得了?不管怎样,难得有机会再来次加州。坐下来,想想来 美国整整5年的风雨经历中,加州也多多少少划了重彩。先后三次的造访,让我几乎踏 遍了它南北所有的景致。既然如此,为什么不总结了做成攻略,拿出来给大家分享?也 算是为了阔别博客这么久,回归之时的小贡献。 1.先来点科普的。 加州是美国第三大州。北接俄勒冈,南挟墨西哥。若把美国当成矩形,那加州 就是落在左手的宽。加州狭长,确实很大。如果要从北部与俄勒冈州 交界出发,沿5号 州际公路驾车向下穿越整个加州到南部与墨西哥交界处,即使很少或根本没有塞车现象 ,也需要大约15个小时。加州拥有极富变化的自然景观, 从北部海岸地区浓密的红木 森林、内华达山脉地区的花岗岩山峰,到南加州地区人烟罕至的荒漠。该州的12个景观 和地区各有特色,变换地区时,时常会让人误以 为置身到一个完全不同的国度。这正 是加州的美丽所在。説加州适合自驾之旅,其实还因为它温和的气候。加州长年是阳春 之暖,没有四季之分。只分雨季和旱季。 一年到头都是短T加单外套,让人既感轻便, 又觉舒畅。 2.再来点儿个人经验的。 说起旅游,自然是人文景观和自然景观结合起来才能丰富见闻,相得益彰。加 州的经济发达城市是人文景观的综合去处。南加的洛杉矶,北加的硅谷旧金山,是不可 遗漏的必去之所。而自然景观,加州就更是天堂了。全美共有58个国家公园,加州占 有其中七个。若是安排七日到十日的驾游,从南至北的贯纵开去,穿过所有国家公园, 探究人文城市的美好,岂不是人生美事? 拉森火山国家公园 (Lassen Volcanic National Park) [Redding, CA] 红杉树国家公园 (Redwood National Park) [Eureka, California] 优胜美地国家公园 (Yosemite National Park) [Mariposa, California] 美洲杉国家公园 (Sequoia National Park) [Fresno, Califo...