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±í¿Õ¼ä²Ù×÷Ïê½â
1
2
3×÷Õߣº À´Ô´£º ¸üÐÂÈÕÆÚ£º2006-01-04
5
6
7½¨Á¢±í¿Õ¼ä
8
9CREATE TABLESPACE data01
10DATAFILE '/ora ......
參¿¼:http://blog.csdn.net/rainnyzhong/archive/2009/01/09/3740660.aspx
×÷ÕߣºRainny
ÈÕÆÚ£º2009-1-8
´´½¨²âÊÔ±í£º
create table test(c_id varchar2(20));
²åÈë²âÊÔÊý¾Ý£º
insert into test values ('1234');
insert into test values ('45678');
insert into test values ('-12 ......
1.²é¿´ËùÓÐÓû§£º
select * from dba_users;
select * from all_users;
select * from user_users;
2.²é¿´Óû§»ò½ÇɫϵͳȨÏÞ(Ö±½Ó¸³Öµ¸øÓû§»ò½ÇÉ«µÄϵͳȨÏÞ)£º
select * from dba_sys_privs;
select * from user_sys_privs;
3.²é¿´½ÇÉ«(Ö»Äܲ鿴µÇ½Óû§ÓµÓеĽÇÉ«)Ëù°üº¬µÄÈ ......
ÒòΪҵÎñÐèÒª,ÐÞÒªÐÞ¸Ä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 ......
OracleÊÚȨ
Ò»¡¢ÊÚȨÓï·¨
GRANT Óï·¨£º
1.ÏÔʽÊÚȨ(Ö±½Ó½«¶ÔÏóÊÚȨ¸øÓû§)
GRANT privilege [, ...] ON object [, ...] TO { Public| Group | Username|role} [WITH GRANT OPTION ]
2.ÒþʽÊÚȨ(ͨ¹ý½«½ÇÉ«ÊÚȨ¸øÓû§)
GRANT role TO { Public| Group | Use ......