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×ֶΣ¬²Ù×÷˳ÐòÒ²×îºÃ°´ÕÕ±íÀïµÄ×Ö¶Î˳ÐòÀ´²Ù×÷£¬·ñÔòÒ²¿ÉÄܳö´í¡£
Ïà¹ØÎĵµ£º
ÎÒÃÇÏÈÀ´¿´Ò»ÏÂËûÃǵ͍Ò壺
A schema is a collection of database objects (used by a user.).
Schema objects are the logical structures that directly refer to the database’s data.
A user is a name defined in the database that can connect to and access objects.
Schemas and users help database ......
½«BLOB±£´æÎª±¾µØÎĵµ£º
/// <summary>
/// ¶Á³öBlob×Ö¶Î
/// </summary>
/// <param name="commandText">sqlÓï¾ä£¬Ö´Ðнá¹ûΪBLOBÊý¾Ý</param>
/// <param name="DocumentAddress">½«Òª°ÑBLOBÊý¾Ý±£´æÎªµÄÎĵµµÄ·¾¶</param>
......
1¡¢pfile Îı¾Îļþ client¶Ë²ÎÊýÎļþ£»²»Äܶ¯Ì¬Ð޸ģ¬¿ÉÒÔÓÃÆÕͨµÄ±à¼Æ÷Ð޸ģ¬ÐÞ¸ÄÖ®ºóÐèÒªÖØÆô¡£pfile¿ÉÄܻᵼÖ·þÎñÆ÷Æô¶¯²»Ò»Ö£¬ÒòΪ¿ÉÒÔÔÚ¿Í»§¶ËÆô¶¯¡£ 2¡¢spfile ¶þ½øÖÆÎļþ·þÎñÆ÷¶Ë²ÎÊýÎļþ£¬ÓÐÁËspfile£¬oracle¿ÉÒÔʵÏÖ¶¯Ì¬²ÎÊýÔÚÏßÐ޸쬲¿·Ö²ÎÊýÐÞ¸ÄÖ®ºóÎÞÐèÖØÆô¡£µ«ÊÇ£¬ÒòΪÊǶþ½øÖÆÎļþ£¬ËùÒÔ²»ÄÜÓÃÆÕͨµÄ±à¼ ......
ÇëÎÊÏÂ,ÎÒɾ³ý±íµÄijЩÊý¾Ý,ÈçºÎ°ÑËüÉÁ»ØÀ´Ñ½? 20·ÖÖÓÄÚ²»¹ý¶Ô¸Ã±íÓɲåÈëÁËЩÊý¾Ý
¸ù¾ÝscnºÅÀ´²éѯ
select a, b, c, versions_xid, versions_starttime, versions_endtime,
versions_startscn,versions_endscn,versions_operation
from test versions between scn 339493 and 339635
¸ù¾Ýʱ¼äÒ²¿ÉÒÔ
from te ......
. ´´½¨job
jobÊÇÊ²Ã´ÄØ? ¼òµ¥µÄ˵¾ÍÊǼƻ®(schedule)¼ÓÉÏÈÎÎñ˵Ã÷. ÁíÍ⻹ÓÐһЩ±ØÐëµÄ²ÎÊý.
ÕâÀïÌáµ½µÄ"ÈÎÎñ"¿ÉÒÔÊÇÊý¾Ý¿âÄÚ²¿µÄ´æ´¢¹ý³Ì,ÄäÃûµÄPL/SQL¿é,Ò²¿ÉÒÔÊDzÙ×÷ϵͳ¼¶±ðµÄ½Å±¾.
¿ÉÒÔÓÐÁ½ÖÖ·½Ê½À´¶¨Òå"¼Æ»®":
1) ʹÓÃDBMS_SCHDULER.CREATE_SCHEDULE ¶¨ÒåÒ»¸ö¼Æ»®;
2) µ÷ÓÃDBMS_SCHDULER.CREATE_JOBE¹ý³ÌÖ±½ÓÖ¸¶ ......