===========================================================
disable table lock or enable table lock
===========================================================
作者: rchsh(http://rchsh.itpub.net)
发表于:2006.06.21 14:20
分类:
数据库
出处:http://rchsh.itpub.net/post/8010/123945
---------------------------------------------------------------
alter table t1 disable table lock;
可以禁止表锁定,也就是说可以防止session 对表进行DDL ,即禁止session 获得表lock
alter table t1 enable table lock;
session 可以在表上面获得锁
测试:
我先前在winxp + 9.2.0.1上测试没有任何问题
代码:
SQL> create table test(no int);
表已创建。
SQL> alter table test disable table lock;
表已更改。
SQL> insert into test select rownum from tabs;
已创建13行。
SQL> commit;
提交完成。
SQL> rename test to test_mid ;
rename test to test_mid
*
ERROR 位于第 1 行:
ORA-00069: 无法获得锁定 -- TEST禁用了表锁定
SQL> alter table test enable table lock;
表已更改。
SQL> rename test to test_mid;
表已重命名。
SQL>
生产库就不能随便测试了,我在测试库aix 5.2+ Oracle 9.2.0.6上测试的时候,缺遇到了这样的问题
代码:
[oracle@res2] /oracle> sqlplus tomsrep
SQL*Plus: Release 9.2.0.6.0 - Production on Wed Jun 21 13:57:11 2006
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Enter password:
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.6.0 - Production
SQL> create table test_lock(no int);
Table created.
SQL> alter table test_lock disable table lock;
Table altered.
SQL> insert into test_lock select rownum from tabs;
7 rows created.
SQL> commit;
Commit complete.
SQL> rename test_lock to test_lock_mid;
rename test_lock to test_lock_mid
*
ERROR at line 1:
ORA-00069: cannot acquire lock -- table locks disabled for TEST_LOCK
SQL> alter table test_lock enable table lock;
alter table test_lock enable table lock
*
ERROR at line 1:
ORA-00603: ORACLE server session terminated by fatal error
SQL>
在alert中也报告了ora-00600的错误信息如下:
ORA-00603: ORACLE server session terminated by fatal error
ORA-00600: internal error code, arguments: [kcbgcur_9], [4219439], [1], [4294967250], [524288], [], [], []
ORA-00054: resource busy and acquire with
rchsh
发表于:2006.06.21 14:20
::分类:
(
数据库
)
::阅读:(105988次)
::
评论
(15)
::
引用 (0)

car insurance list low insureance
[回复]
Wages pen in unvaryingly turn over undamaged situation. http://depinca.com
dante1986
评论于:2012.03.15 19:24

good stuff
[回复]
a solid blog here. is it possible in any way to cite all your sources though? would like to know exactly where you received your information. anyway, great stuff.
oghostc
评论于:2012.02.17 12:31

Happy New Year!
[回复]
Good morning!
Happy New Year!
Health, luck and love!
elogiecerrorn
评论于:2012.01.29 13:49

online casinos usa
[回复]
Undurry
评论于:2010.06.28 16:10

hello , everybody i'am jacob
[回复]
i'am glad fo find this place, i love tv shows ,games:)
funny dogs
Abepammegogum
评论于:2010.06.20 17:18

桧蜩
[回复]
Thank you very well read allss textt about drsating and ilike it very much
cBespaippilm
评论于:2010.05.21 12:03

Check-cashing stores around military bases often charge annual interest and.
[回复]
With the internet today and the connections between companies this allows every. Nationwide State Legislative Agenda 2008-2009 Reports initiatives to.
viabe
评论于:2010.01.21 14:54

耜圜囹
[回复]
uderweqh
评论于:2009.12.09 15:15

urls 潆
[回复]
uderweq
评论于:2009.12.09 13:02

claudine trillo sex videos
[回复]
free non downloadable sex video sex animals 200 dvd free porn videos honest cunt sex movies free free sexy feet video free gay asian porn videos free nude amateurs abby winters free rss porn videos feeds free lesbian sex teen video videos of sex with hookers amateur patti scott free loving sex videos free amateur leg gallery free video girlfriend amateur free adult sex education videos
alablemiomb
评论于:2009.11.28 00:04

磬轵
[回复]
Cristy
评论于:2009.11.26 15:50

Test, just a test
[回复]
XRumerTest
评论于:2009.11.11 15:06

镱痦
[回复]
meanind
评论于:2009.10.25 16:27

Personal Loans Bad Credit
[回复]
Second Chance Personal Loan Bad Credit In Ontario
Free Copy Of My Credit Report
inceniafoexqwabiop
评论于:2009.07.24 16:43

poor credit personal loan
[回复]
easy personal loans guaranteed bad credit personal loan no credit check personal loans fast personal loan
moorrywemertuop
评论于:2009.07.16 05:12