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

ORACLEËøµÄ¹ÜÀí

ORACLEÀïËøÓÐÒÔϼ¸ÖÖģʽ:
0£ºnone
1£ºnull ¿Õ
2£ºRow-S Ðй²Ïí(RS)£º¹²Ïí±íËø£¬sub share
3£ºRow-X ÐжÀÕ¼(RX)£ºÓÃÓÚÐеÄÐ޸ģ¬sub exclusive
4£ºShare ¹²ÏíËø(S)£º×èÖ¹ÆäËûDML²Ù×÷£¬share
5£ºS/Row-X ¹²ÏíÐжÀÕ¼(SRX)£º×èÖ¹ÆäËûÊÂÎñ²Ù×÷£¬share/sub exclusive
6£ºexclusive ¶ÀÕ¼(X)£º¶ÀÁ¢·ÃÎÊʹÓã¬exclusive
Êý×ÖÔ½´óËø¼¶±ðÔ½¸ß, Ó°ÏìµÄ²Ù×÷Ô½¶à¡£
1¼¶ËøÓУºSelect£¬ÓÐʱ»áÔÚv$locked_object³öÏÖ¡£
2¼¶ËøÓУºSelect for update,Lock For Update,Lock Row Share
select for updateµ±¶Ô»°Ê¹ÓÃfor update×Ó´®´ò¿ªÒ»¸öÓαêʱ£¬ËùÓзµ»Ø¼¯ÖеÄÊý¾ÝÐж¼½«´¦ÓÚÐм¶(Row-X)¶ÀռʽËø¶¨£¬ÆäËû¶ÔÏóÖ»ÄܲéѯÕâЩÊý¾ÝÐУ¬²»ÄܽøÐÐupdate¡¢delete»òselect for update²Ù×÷¡£
3¼¶ËøÓУºInsert, Update, Delete, Lock Row Exclusive
ûÓÐcommit֮ǰ²åÈëͬÑùµÄÒ»Ìõ¼Ç¼»áûÓз´Ó¦, ÒòΪºóÒ»¸ö3µÄËø»áÒ»Ö±µÈ´ýÉÏÒ»¸ö3µÄËø, ÎÒÃDZØÐëÊͷŵôÉÏÒ»¸ö²ÅÄܼÌÐø¹¤×÷¡£
4¼¶ËøÓУºCreate Index, Lock Share
locked_modeΪ2,3,4²»Ó°ÏìDML(insert,delete,update,select)²Ù×÷, µ«DDL(alter,dropµÈ)²Ù×÷»áÌáʾora-00054´íÎó¡£
00054, 00000, "resource busy and acquire with NOWAIT specified"
// *Cause: Resource interested is busy.
// *Action: Retry if necessary.
5¼¶ËøÓУºLock Share Row Exclusive
¾ßÌåÀ´½²ÓÐÖ÷Íâ¼üÔ¼Êøʱupdate / delete ... ; ¿ÉÄÜ»á²úÉú4,5µÄËø¡£
6¼¶ËøÓУºAlter table, Drop table, Drop Index, Truncate table, Lock Exclusive
ÒÔDBA½ÇÉ«, ²é¿´µ±Ç°Êý¾Ý¿âÀïËøµÄÇé¿ö¿ÉÒÔÓÃÈçÏÂSQLÓï¾ä£º
col owner for a12
col object_name for a16
select b.owner,b.object_name,l.session_id,l.locked_mode
from v$locked_object l, dba_objects b
where b.object_id=l.object_id
/
select t2.username,t2.sid,t2.serial#,t2.logon_time
from v$locked_object t1,v$session t2
where t1.session_id=t2.sid order by t2.logon_time
/
Èç¹ûÓг¤ÆÚ³öÏÖµÄÒ»ÁУ¬¿ÉÄÜÊÇûÓÐÊͷŵÄËø¡£ÎÒÃÇ¿ÉÒÔÓÃÏÂÃæSQLÓï¾äɱµô³¤ÆÚûÓÐÊÍ·Å·ÇÕý³£µÄËø£º
alter system kill session 'sid,serial#';
Èç¹û³öÏÖÁËËøµÄÎÊÌâ, ij¸öDML²Ù×÷¿ÉÄܵȴýºÜ¾ÃûÓз´Ó¦¡£
µ±Äã²ÉÓõÄÊÇÖ±½ÓÁ¬½ÓÊý¾Ý¿âµÄ·½Ê½£¬Ò²²»ÒªÓÃOSϵͳÃüÁî $kill process_num »òÕß $kill -9 process_numÀ´ÖÕÖ¹Óû§Á¬½Ó£¬ÒòΪһ¸öÓû§½ø³Ì¿ÉÄܲúÉúÒ»¸öÒÔÉϵÄËø, ɱOS½ø³Ì²¢²»Äܳ¹µ×Çå


Ïà¹ØÎĵµ£º

Á¬½Óoracle£¬sqlserverÖÐÊý¾Ý¿âµÄʾÀý´úÂë

Ò» ÔÚOracleÖÐÁ¬½ÓÊý¾Ý¿â
public class Test1 {
 public static void main(String[] args) {
  try {
   Class.forName("oracle.jdbc.driver.OracleDriver");
   Connection conn = DriverManager.getConnection(
       &nbs ......

oracle²»Í¬°æ±¾¼äÊý¾ÝµÄµ¼Èëµ¼³ö


oracle²»Í¬°æ±¾¼äÊý¾ÝµÄµ¼Èëµ¼³ö
OracleµÄimp/exp×é¼þÊÇÎÒÃdz£ÓõŤ¾ß£¬ËüµÄÒ»¸ö²Ù×÷Ô­Ôò¾ÍÊÇÏòϼæÈÝ¡£ÏÂÃæÊǾݴË×ܽáµÄ¼¸¸öʹÓùæÔòºÍÏà¹Ø²âÊÔ£º
 
¹æÔò1£ºµÍ°æ±¾µÄexp/imp¿ÉÒÔÁ¬½Óµ½¸ß°æ±¾£¨»òͬ°æ±¾£©µÄÊý¾Ý¿â·þÎñÆ÷£¬µ«¸ß°æ±¾µÄexp/imp²»ÄÜÁ¬½Óµ½µÍ°æ±¾µÄÊý¾Ý¿â·þÎñÆ÷
 
1.1 ʹÓÃ9i¿Í»§¶Ëͨ¹ýimpÁ¬ ......

Oracle 10g StatisticÊý¾Ýͳ¼Æ


Oracle 10g statisticÊý¾Ýͳ¼Æ,Oracle»á¸ù¾ÝÕâЩͳ¼ÆÐÅÏ¢À´¾ö¶¨ÊÇ×ßRBO(Rule-BasedOptimization)£¬»¹ÊÇ×ßCBO(Cost-BasedOptimization)£¬»áȥѡÔñÄÄÖÖÖ´Ðмƻ®¸ü»®Ëã,Ó°ÏìÊÇ·ñ×ßÏà¹ØµÄË÷ÒýµÈ.Èç¹ûÊÇCBOµÄ»°£¬ËüÒÀ¿¿×¼È·µÄ£¨»òÕß˵±È½Ï׼ȷµÄ£©Í³¼ÆÐÅÏ¢À´²úÉúÓÅ»¯µÄÖ´Ðз¾¶,Èç¹ûûÓÐ×ö¹ýͳ¼Æ£¬CBOÒ²¾ÍûÓÐ×öcostÆÀ¹ÀµÄÒÀ¾Ý ......

Oracle ÓëÔÚJavaÖеÄÁ´½Ó

תÌû´¦£ºhttp://dong-java.javaeye.com/blog/375150 
1¡£ÍƼöʹÓÃOralce±È½ÏеÄ10.2.0.3 JDBC Drivers¡£Õâ¸ö°æ±¾¶Ô±È9.2µÄ×î´óµÄºÃ´¦ÊÇDriverManager.setLoginTimeoutº¯ÊýÊÇÆð×÷Óõġ£ÉèÖÃÁËÕâ¸ö²ÎÊý£¬ÔÚ¶ñÁÓµÄÍøÂç»·¾³ÖоͲ»»áÓÐÁ¬½ÓÊý¾Ý¿âµÄº¯Êý³¤Ê±¼ä²»·µ»ØµÄÇé¿ö¡£
2¡£JDBC Developer!ˉs Guide and Refer ......

Aix 5.3ÏÂ×Ô¶¯±¸·ÝOracle¶à¸öʵÀý£¬²¢ÉÏ´«ÖÁFTP·þÎñÆ÷

Ò»¡¢Ð½¨databack.shÎļþ£¬´æ·ÅĿ¼/opt/databack/
#Êý¾Ý¿âÓû§×ÊÁÏ
USERNAME=Êý¾Ý¿âÓû§Ãû(ÐÅÏ¢Òþ²Ø)
PASSWORD=Êý¾Ý¿âÃÜÂë(ÐÅÏ¢Òþ²Ø)
#FTP·þÎñÆ÷ÐÅÏ¢
FTP_SERV=FTP·þÎñÆ÷(ÐÅÏ¢Òþ²Ø)
FTP_USER=FTPÓû§Ãû(ÐÅÏ¢Òþ²Ø)
FTP_PASS=FTPÃÜÂë(ÐÅÏ¢Òþ²Ø)
FTP_DIR=FTPĿ¼(ÐÅÏ¢Òþ²Ø)
#±¸·ÝĿ¼
BACKUP_DIR=/opt/databack
#¸ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ