OracleËø»úÖÆ
±¾ÎÄͨ¹ý¶ÔOracleÊý¾Ý¿âËø»úÖƵÄÑо¿£¬Ê×ÏȽéÉÜÁËOracleÊý¾Ý¿âËøµÄÖÖÀ࣬²¢ÃèÊöÁËʵ¼ÊÓ¦ÓÃÖÐÓöµ½µÄÓëËøÏà¹ØµÄÒì³£Çé¿ö£¬Ìرð¶Ô¾³£Óöµ½µÄÓÉÓڵȴýËø¶øʹÊÂÎñ±»¹ÒÆðµÄÎÊÌâ½øÐÐÁ˶¨Î»¼°½â¾ö£¬²¢¶ÔËÀËøÕâÒ»±È½ÏÑÏÖصÄÏÖÏó£¬Ìá³öÁËÏàÓ¦µÄ½â¾ö·½·¨ºÍ¾ßÌåµÄ·ÖÎö¹ý³Ì¡£
Êý¾Ý¿âÊÇÒ»¸ö¶àÓû§Ê¹ÓõĹ²Ïí×ÊÔ´¡£µ±¶à¸öÓû§²¢·¢µØ´æÈ¡Êý¾Ýʱ£¬ÔÚÊý¾Ý¿âÖоͻá²úÉú¶à¸öÊÂÎñͬʱ´æȡͬһÊý¾ÝµÄÇé¿ö¡£Èô¶Ô²¢·¢²Ù×÷²»¼Ó¿ØÖƾͿÉÄÜ»á¶ÁÈ¡ºÍ´æ´¢²»ÕýÈ·µÄÊý¾Ý£¬ÆÆ»µÊý¾Ý¿âµÄÒ»ÖÂÐÔ¡£
¼ÓËøÊÇʵÏÖÊý¾Ý¿â²¢·¢¿ØÖƵÄÒ»¸ö·Ç³£ÖØÒªµÄ¼¼Êõ¡£µ±ÊÂÎñÔÚ¶Ôij¸öÊý¾Ý¶ÔÏó½øÐвÙ×÷Ç°£¬ÏÈÏòϵͳ·¢³öÇëÇ󣬶ÔÆä¼ÓËø¡£¼ÓËøºóÊÂÎñ¾Í¶Ô¸ÃÊý¾Ý¶ÔÏóÓÐÁËÒ»¶¨µÄ¿ØÖÆ£¬ÔÚ¸ÃÊÂÎñÊÍ·ÅËø֮ǰ£¬ÆäËûµÄÊÂÎñ²»ÄܶԴËÊý¾Ý¶ÔÏó½øÐиüвÙ×÷¡£
ÔÚÊý¾Ý¿âÖÐÓÐÁ½ÖÖ»ù±¾µÄËøÀàÐÍ£ºÅÅËüËø£¨Exclusive Locks£¬¼´XËø£©ºÍ¹²ÏíËø£¨Share Locks£¬¼´SËø£©¡£µ±Êý¾Ý¶ÔÏó±»¼ÓÉÏÅÅËüËøʱ£¬ÆäËûµÄÊÂÎñ²»ÄܶÔËü¶ÁÈ¡ºÍÐ޸ġ£¼ÓÁ˹²ÏíËøµÄÊý¾Ý¶ÔÏó¿ÉÒÔ±»ÆäËûÊÂÎñ¶ÁÈ¡£¬µ«²»ÄÜÐ޸ġ£Êý¾Ý¿âÀûÓÃÕâÁ½ÖÖ»ù±¾µÄËøÀàÐÍÀ´¶ÔÊý¾Ý¿âµÄÊÂÎñ½øÐв¢·¢¿ØÖÆ¡£
ÔÚʵ¼ÊÓ¦ÓÃÖо³£»áÓöµ½µÄÓëËøÏà¹ØµÄÒì³£Çé¿ö£¬ÈçÓÉÓڵȴýËøÊÂÎñ±»¹ÒÆð¡¢ËÀËøµÈÏÖÏó£¬Èç¹û²»Äܼ°Ê±µØ½â¾ö£¬½«ÑÏÖØÓ°ÏìÓ¦ÓõÄÕý³£Ö´ÐУ¬¶øÄ¿Ç°¶ÔÓÚ¸ÃÀàÎÊÌâµÄ½â¾öȱ·¦ÏµÍ³»¯Ñо¿ºÍÖ¸µ¼£¬±¾ÎÄÔÚ×ܽáʵ¼Ê¾ÑéµÄ»ù´¡ÉÏ£¬Ìá³öÁËÏàÓ¦µÄ½â¾ö·½·¨ºÍ¾ßÌåµÄ·ÖÎö¹ý³Ì¡£
OracleÊý¾Ý¿âµÄËøÀàÐÍ
¸ù¾Ý±£»¤µÄ¶ÔÏó²»Í¬£¬OracleÊý¾Ý¿âËø¿ÉÒÔ·ÖΪÒÔϼ¸´óÀࣺDMLËø£¨data locks£¬Êý¾ÝËø£©£¬ÓÃÓÚ±£»¤Êý¾ÝµÄÍêÕûÐÔ£»DDLËø£¨dictionary locks£¬×ÖµäËø£©£¬ÓÃÓÚ±£»¤Êý¾Ý¿â¶ÔÏóµÄ½á¹¹£¬Èç±í¡¢Ë÷ÒýµÈµÄ½á¹¹¶¨Ò壻ÄÚ²¿ËøºÍãÅ£¨internal locks and latches£©£¬±£»¤Êý¾Ý¿âµÄÄÚ²¿½á¹¹¡£
DMLËøµÄÄ¿µÄÔÚÓÚ±£Ö¤²¢·¢Çé¿öϵÄÊý¾ÝÍêÕûÐÔ£¬±¾ÎÄÖ÷ÒªÌÖÂÛDMLËø¡£ÔÚOracleÊý¾Ý¿âÖУ¬DMLËøÖ÷Òª°üÀ¨TMËøºÍTXËø£¬ÆäÖÐTMËø³ÆΪ±í¼¶Ëø£¬TXËø³ÆΪÊÂÎñËø»òÐм¶Ëø¡£
µ±OracleÖ´ÐÐDMLÓï¾äʱ£¬ÏµÍ³×Ô¶¯ÔÚËùÒª²Ù×÷µÄ±íÉÏÉêÇëTMÀàÐ͵ÄËø¡£µ±TMËø»ñµÃºó£¬ÏµÍ³ÔÙ×Ô¶¯ÉêÇëTXÀàÐ͵ÄËø£¬²¢½«Êµ¼ÊËø¶¨µÄÊý¾ÝÐеÄËø±ê־λ½øÐÐÖÃλ¡£ÕâÑùÔÚÊÂÎñ¼ÓËøÇ°¼ì²éTXËøÏàÈÝÐÔʱ¾Í²»ÓÃÔÙÖðÐмì²éËø±êÖ¾£¬¶øÖ»Ðè¼ì²éTMËøģʽµÄÏàÈÝÐÔ¼´¿É£¬´ó´óÌá¸ßÁËϵͳµÄЧÂÊ¡£TMËø°üÀ¨ÁËSS¡¢SX¡¢S¡¢XµÈ¶àÖÖģʽ£¬ÔÚÊý¾Ý¿âÖÐÓÃ0£6À´±íʾ¡£²»Í¬µÄSQL²Ù×÷²úÉú²»Í¬ÀàÐ͵ÄTMËø¡£Èç±í1Ëùʾ¡£
ÔÚÊý¾
Ïà¹ØÎĵµ£º
Oracle»¹ÊDZȽϳ£Óõģ¬µ«ÓësqlserverÇø±ð»¹ÊÇͦ´óµÄ¡£Ñ§Ï°OracleµÃÁ˽âdual±í£¬ÕâÀïºÍ´ó¼Ò·ÖÏíһϣ¬Ï£Íû¶Ô´ó¼ÒÓÐÓÃ
1£º×ª×Ö·ûº¯Êý·Öת»»º¯ÊýºÍ×Ö·û²Ù×÷º¯Êý
ת»»º¯ÊýÓУºLower£¬upper£¬initcap£¨Ê××Öĸ´óд£©
×Ö·û²Ù×÷º¯Êý£ºconcat£¬substr£¬length£¬instr£¨Ä³¸ö×Ö·û´®ÔÚ´Ë×Ö·û´®ÖеÄλÖã©£¬ipad£¨×Ö·û´®°´Ä³ÖÖ¸ñʽÏÔ ......
ÒÔÇ°Ö»ÖªµÀjavaÄܵ÷ÓÃoracle´æ´¢¹ý³ÌºÍº¯Êý£¬µ«½ñÌìÎÒ·¢ÏÖÔÀ´oracleÒ²¿ÉÒÔµ÷ÓÃjava
²âÊÔ»·¾³oracle 10g
call dbms_java.set_output(5000);
--Ê×ÏÈÔÚoracleÖбàÒëjavaÎļþ ÒÔÏÂÊǸö¼òµ¥µÄ
create or replace and compile java source named helloworld as
public class hellowor ......
Create directoryÈÃÎÒÃÇ¿ÉÒÔÔÚOracleÊý¾Ý¿âÖÐÁé»îµÄ¶ÔÎļþ½øÐжÁд²Ù×÷£¬¼«´óµÄÌá¸ßÁËOracleµÄÒ×ÓÃÐԺͿÉÀ©Õ¹ÐÔ¡£
ÆäÓ﷨Ϊ:
CREATE [OR REPLACE] DIRECTORY directory
AS 'pathname
';
±¾°¸Àý¾ßÌå´´½¨ÈçÏÂ:
create or replace directory exp_dir as '/tmp';
Ŀ¼´´½¨ÒԺ󣬾ͿÉÒ԰ѶÁдȨÏÞÊÚÓèÌض¨Óà ......
replace¾ÍÊÇÒ»°ãÒâÒåÉϵÄ×Ö·û´®Ìæ»»£¬translateÖ»ÊÇÒ»¸ö×Ö·ûÌæ»»¶ÔÓ¦µÄÒ»¸ö×Ö·û£¬ÏÂÃæÓÐÊÖ²á˵Ã÷£¬»¹ÓÐÀý×Ó O(∩_∩)O¹þ¹þ~
REPLACE
Syntax
Purpose
REPLACE returns char with every occurrence of search_string replaced with replacement_string. If replacement_string is omitted or null, then all occu ......
²é¿´sessionµÈ´ýʼþ£º
select sid,event from v$session_wait where event not like 'rdbms%' and event not like 'SQL*Net message%';
°´pid²é¿´ÕýÔÚÖ´ÐеijÌÐò£º
select sid,program from v$session b where paddr in (selec ......