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×ֶΣ¬²Ù×÷˳ÐòÒ²×îºÃ°´ÕÕ±íÀïµÄ×Ö¶Î˳ÐòÀ´²Ù×÷£¬·ñÔòÒ²¿ÉÄܳö´í¡£
Ïà¹ØÎĵµ£º
ËäȻѧϰJavaºÜ¾ÃÁË£¬×Ô¼ºÒ²Á¬½Ó¹ýһЩÊý¾Ý¿â£¬±ÈÈçmysqlÖ®ÀàµÄ£¬Èç½ñÄØ£¬Ò²Ñ§Ï°ÁËÒ»¶Îʱ¼äµÄOracle£¬È»¶øÄØ£¬½ñÌìÊÇÎÒµÚÒ»´ÎÁ¬½ÓOracle£¬ºÙºÙ£¬Ó¦¸Ã»¹²»ËãÌ«³Ù°É¡£
½ñÌìÄØ£¬Óе㱿׾£¬´ó¼ÒĪЦ£¡
ÎÒÕâÊÇÒ»¸ö²éѯÀý×Ó
Ê×ÏÈ£¬Ô ......
²½Ö裺
1.Ê×ÏÈ£¬ÄãÒªÓÐÒ»ÕÅ±í£¡
CREATE TABLE example(
ID Number(4) NOT NULL PRIMARY KEY,
NAME VARCHA ......
CREATE TABLE T_BI_CurrentAccountDetailed
(
OrderDate DATE,
BranchFlag varchar2(3),
SortId varchar2(11),
OrderNo&n ......
OracleÊÚȨ
Ò»¡¢ÊÚȨÓï·¨
GRANT Óï·¨£º
1.ÏÔʽÊÚȨ(Ö±½Ó½«¶ÔÏóÊÚȨ¸øÓû§)
GRANT privilege [, ...] ON object [, ...] TO { Public| Group | Username|role} [WITH GRANT OPTION ]
2.ÒþʽÊÚȨ(ͨ¹ý½«½ÇÉ«ÊÚȨ¸øÓû§)
GRANT role TO { Public| Group | Use ......