Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Oracle LOB×ֶβÙ×÷µÄÒ»µã½Ìѵ

½ñÌìÓиö¹¦ÄÜÐèÒª¶ÔCLOB×ֶνøÐвÙ×÷£¬ÆÚ¼äÓöµ½¼¸¸öÎÊÌ⣬ÀÏÌì¾ì¹Ë£¬¶¼ËãÊǽâ¾öÁË£¬¼Çһϣ¬ÃâµÃÈÕºóÖØµ¸¸²ÕÞ¡£
      ´íÎóÒ»£º
ORA-22920: Î´Ëø¶¨º¬ÓÐ LOB ÖµµÄÐÐ
³öÏÖÕâ¸öÎÊÌâµÄÔ­Òò£¬ÊÇÓÉÓÚselect³öLOB×Ö¶Îʱδ¼Ó for update£¬ORACLE¹Ù·½Îĵµ¶Ô¸Ã´íÎóµÄ˵Ã÷£º
ÒýÓÃÎÄ×Ö´úÂë
ORA-22920 row containing the LOB value is not locked

Cause: The row containing the LOB value must be locked before updating the LOB value.

Action: Lock the row containing the LOB value before updating the LOB value.
ORA-22920 row containing the LOB value is not locked
Cause: The row containing the LOB value must be locked before updating the LOB value.
Action: Lock the row containing the LOB value before updating the LOB value.

  
ÓÚÊǼÓÉÏfor updateÔٲ⣬·¢ÏÖ´íÎóÌáʾ±äÁË£¬±ä³ÉÏÂÃæµÄ£º
     ´íÎó¶þ£º
ORA-01002: ¶ÁȡΥ·´Ë³Ðò
³öÏÖÕâ¸öÎÊÌâµÄÔ­ÒòÊÇConnection µÄ autoCommitÊôÐÔֵΪtrue£¬¸Ä³É
Sql´úÂë conn.setAutoCommit(false);

......

LOB²Ù×÷

.....

conn.commit();

conn.setAutoCommit(true);
conn.setAutoCommit(false);
......
LOB²Ù×÷
.....
conn.commit();
conn.setAutoCommit(true);

 
¾Í¿ÉÒÔÁË¡£
ÁíÍ⣬עÒâµÚÒ»²½µÄselectʱ£¬²»Òªselect³ö·ÇLOBµÄ×ֶΣ¬²¢ÇÒ£¬Èç¹ûÒ»ÕűíÓжà¸öLOB×ֶΣ¬²Ù×÷˳ÐòÒ²×îºÃ°´ÕÕ±íÀïµÄ×Ö¶Î˳ÐòÀ´²Ù×÷£¬·ñÔòÒ²¿ÉÄܳö´í¡£


Ïà¹ØÎĵµ£º

oracle ±í¿Õ¼ä²Ù×÷

oracle±í¿Õ¼ä²Ù×÷Ïê½â
  1
  2
  3×÷Õߣº   À´Ô´£º    ¸üÐÂÈÕÆÚ£º2006-01-04 
  5
  6 
  7½¨Á¢±í¿Õ¼ä
  8
  9CREATE TABLESPACE data01
 10DATAFILE '/ora ......

jdbcÁ¬½ÓOracle

      ËäȻѧϰJavaºÜ¾ÃÁË£¬×Ô¼ºÒ²Á¬½Ó¹ýһЩÊý¾Ý¿â£¬±ÈÈçmysqlÖ®ÀàµÄ£¬Èç½ñÄØ£¬Ò²Ñ§Ï°ÁËÒ»¶Îʱ¼äµÄOracle£¬È»¶øÄØ£¬½ñÌìÊÇÎÒµÚÒ»´ÎÁ¬½ÓOracle£¬ºÙºÙ£¬Ó¦¸Ã»¹²»ËãÌ«³Ù°É¡£
    ½ñÌìÄØ£¬Óе㱿׾£¬´ó¼ÒĪЦ£¡
    ÎÒÕâÊÇÒ»¸ö²éѯÀý×Ó
    Ê×ÏÈ£¬Ô ......

oracleµÄRBO/CBOÓÅ»¯Æ÷

Ô­ÎĵØÖ·£ºhttp://tech.it168.com/db/o/2006-08-09/200608091935599.shtml        
                              & ......

oracleȨÏÞ¹ÜÀí

Ò»¡¢ÏµÍ³µÄĬÈÏÓû§
Java´úÂë
sys;//ϵͳ¹ÜÀíÔ±£¬ÓµÓÐ×î¸ßȨÏÞ     
system;//±¾µØ¹ÜÀíÔ±£¬´Î¸ßȨÏÞ     
scott;//ÆÕͨÓû§£¬ÃÜÂëĬÈÏΪtiger,ĬÈÏδ½âËø  
¶þ¡¢µÇ½
Java´úÂë
sqlplus conn / as sysdba;//µÇ½sysÕÊ»§     ......

oracle ÐÞ¸Ä×Ö¶ÎÀàÐ͵ķ½·¨£¨×ª£©

ÒòΪҵÎñÐèÒª,ÐÞÒªÐÞ¸Äij¸ö×Ö¶ÎÊý¾ÝÀàÐÍÓÐnumber(5),±äΪnumber(5,2)ÐÍ
ÒªÊÇûÓÐÊý¾ÝµÄ»°Ö±½ÓÓÃÒÔÏÂÓï¾ä¼´¿É
alter   table tb_test modify permile number(5,2);
µ«ÊÇÓÐÊý¾ÝµÄ»° ¾Í²»ÄÜÓÃÉÏÃæ·½·¨ÁË,
alter table tb_test add permile_temp number(5,2)
update tb_test set permile_temp=permile;
alter t ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ