OracleÖдò¿ªÓα곬³ö×î´óÖµ
ÏòOracleÊý¾Ý¿â±íÖвåÈëÊ®¼¸ÍòÌõÊý¾Ý£¬¿ÉÊǵ±²åÈë3Íò¶àÌõºó£¬³ÌÐò¾ÍÅ×
Java´úÂë
ORA-01000 maximum open cursors exceeded
ORA-01000 maximum open cursors exceeded
Òì³£ÐÅÏ¢¡£GoogleÁËÒì³£ÐÅÏ¢£¬µÃÖªÕâÑùµÄ´íÎóºÜÈÝÒ׳öÏÖÔÚJava´úÂëÖеÄÖ÷ÒªÔÒòÊÇ£ºJava´úÂëÔÚÖ´ÐÐconn.createStatement()ºÍconn.prepareStatement()µÄʱºò£¬Êµ¼ÊÉ϶¼ÊÇÏ൱ÓÚÔÚÊý¾Ý¿âÖдò¿ªÁËÒ»¸öcursor¡£ÓÈÆäÊÇ£¬Èç¹ûÄãµÄcreateStatementºÍprepareStatementÊÇÔÚÒ»¸öÑ»·ÀïÃæµÄ»°£¬¾Í»á·Ç³£ÈÝÒ׳öÏÖÕâ¸öÎÊÌâ¡£ÒòΪÓαêÒ»Ö±ÔÚ²»Í£µÄ´ò¿ª£¬¶øÇÒûÓйرա£
Ò»°ãÀ´Ëµ£¬ÎÒÃÇÔÚдJava´úÂëµÄʱºò£¬createStatementºÍprepareStatement¶¼Ó¦¸ÃÒª·ÅÔÚÑ»·ÍâÃæ£¬¶øÇÒʹÓÃÁËÕâЩStatmentºó£¬¼°Ê±¹Ø±Õ¡£×îºÃÊÇÔÚÖ´ÐÐÁËÒ»´ÎexecuteQuery¡¢executeUpdateµÈÖ®ºó£¬Èç¹û²»ÐèҪʹÓýá¹û¼¯£¨ResultSet£©µÄÊý¾Ý£¬¾ÍÂíÉϽ«Statment¹Ø±Õ£¨statementName.close()£©¡£
ÏÂÃæ½«´úÂ븽ÉÏ
Å×Òì³£´úÂ룺
Java´úÂë
Connection conn = DBUtils.getConnection();//»ñÈ¡Êý¾Ý¿âÁ¬½Ó
PreparedStatement pstmt = conn.prepareStatement("select statement...");
ResultSet rset = pstmt.executeQuery();
while (rset.next()) {
PreparedStatement pst=conn.prepareStatement("insert statement...");//¿ªÆôÒ»¸öÓαê
//pst.setXXX()...;
pst.executeUpdate();
pst=conn.prepareStatement("another insert statement");//ÔÙ¿ªÆôÒ»¸öÓαê
//pst.setXXX()...;
pst.executeUpdate();
pst=conn.prepareStatement("third insert statement");//¿ªÆôÒ»¸öÓαê
//pst.setXXX()...;
&
Ïà¹ØÎĵµ£º
oracle±í¿Õ¼ä²Ù×÷Ïê½â
1
2
3×÷Õߣº À´Ô´£º ¸üÐÂÈÕÆÚ£º2006-01-04
5
6
7½¨Á¢±í¿Õ¼ä
8
9CREATE TABLESPACE data01
10DATAFILE '/ora ......
ËäȻѧϰJavaºÜ¾ÃÁË£¬×Ô¼ºÒ²Á¬½Ó¹ýһЩÊý¾Ý¿â£¬±ÈÈçmysqlÖ®ÀàµÄ£¬Èç½ñÄØ£¬Ò²Ñ§Ï°ÁËÒ»¶Îʱ¼äµÄOracle£¬È»¶øÄØ£¬½ñÌìÊÇÎÒµÚÒ»´ÎÁ¬½ÓOracle£¬ºÙºÙ£¬Ó¦¸Ã»¹²»ËãÌ«³Ù°É¡£
½ñÌìÄØ£¬Óе㱿׾£¬´ó¼ÒĪЦ£¡
ÎÒÕâÊÇÒ»¸ö²éѯÀý×Ó
Ê×ÏÈ£¬Ô ......
×¢£ºÏÂÃæÖ»ÊÇÎÒ´ÖÁӵļǼһÏ£¬×Ô¼ºÔÚ¿ª·¢ÖÐËùѧµÄÒ»²¿·Ö×ÊÁÏ£¡
1£® µÚÒ»¡¢ÊÇÏÂÔØÒ»¸ö“Oracle9i¿Í»§¶Ë¾«¼ò°æ.exe”¿Í»§¶Ë£¬È»ºó°ÑËü°²×°µ½CÅÌÏÂÃæ¡£
È»ºó°ÑÎÒÃÇ×Ô¼ºÅäÖúõĔ tnsnames.ora”Îļþ£¬¸´¸ÇC:\oracle\ora90\network\adminÏÂÃæµÄtnsnames.oraÎļþ¡£
2£® ÔÚVS2005¿ª·¢¹¤¾ßÖ ......
oracleÖÐconnect by priorʵÏֵݹé²éѯ
ÊÕ¼¯µÄ¼¸ÌõÔÚoracleÖÐͨ¹ýconnect by priorÀ´ÊµÏֵݹé²éѯ
Start with...Connect By×Ó¾äµÝ¹é²éѯһ°ãÓÃÓÚÒ»¸ö±íά»¤Ê÷ÐνṹµÄÓ¦Óá£
´´½¨Ê¾Àý±í£º
CREATE TABLE TBL_TEST
(
ID NUMBER,
NAME VARCHAR2(100 BYTE),
PID NUMBER   ......
°²×°¹ý³ÌÖгöÏÖ“X11/extensions/Print.h: No such file or directory”µÄ½â¾ö·½·¨
ÕâÊÇÒòΪϵͳÖÐȱÉÙlibXp-devel
# yum install libXp-devel
°²×°¹ý³ÌÖгöÏÖ“X11/bitmaps/gray: No such file or directory”µÄ½â¾ö·½·¨
ÕâÊÇÒòΪϵͳÖÐȱÉÙxorg-x11-xbitmaps£¨x11/xbitmaps (Ubuntu) and xorg-x1 ......