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

ORACLEÖ´Ðмƻ®µÄһЩ»ù±¾¸ÅÄî

 
Ò»£®Ïà¹ØµÄ¸ÅÄî
RowidµÄ¸ÅÄrowidÊÇÒ»¸öαÁУ¬¼ÈÈ»ÊÇαÁУ¬ÄÇôÕâ¸öÁоͲ»ÊÇÓû§¶¨Ò壬¶øÊÇϵͳ×Ô¼º¸ø¼ÓÉϵġ£¶Ôÿ¸ö±í¶¼ÓÐÒ»¸örowidµÄαÁУ¬µ«ÊÇ
±íÖв¢²»ÎïÀí´æ´¢ROWIDÁеÄÖµ¡£²»¹ýÄã¿ÉÒÔÏñʹÓÃÆäËüÁÐÄÇÑùʹÓÃËü£¬µ«ÊDz»ÄÜɾ³ý¸ÄÁУ¬Ò²²»ÄܶԸÃÁеÄÖµ½øÐÐÐ޸ġ¢²åÈë¡£Ò»µ©Ò»ÐÐÊý¾Ý²åÈëÊý¾Ý¿â£¬Ôò
rowidÔÚ¸ÃÐеÄÉúÃüÖÜÆÚÄÚÊÇΨһµÄ£¬¼´¼´Ê¹¸ÃÐвúÉúÐÐǨÒÆ£¬ÐеÄrowidÒ²²»»á¸Ä±ä¡£
Recursive
SQL¸ÅÄÓÐʱΪÁËÖ´ÐÐÓû§·¢³öµÄÒ»¸ösqlÓï¾ä£¬Oracle±ØÐëÖ´ÐÐһЩ¶îÍâµÄÓï¾ä£¬ÎÒÃǽ«ÕâЩ¶îÍâµÄÓï¾ä³Æ֮Ϊ'recursive
calls'»ò'recursive SQL statements'¡£Èçµ±Ò»¸öDDLÓï¾ä·¢³öºó£¬ORACLE×ÜÊÇÒþº¬µÄ·¢³öһЩrecursive
SQLÓï¾ä£¬À´ÐÞ¸ÄÊý¾Ý×ÖµäÐÅÏ¢£¬ÒÔ±ãÓû§¿ÉÒԳɹ¦µÄÖ´ÐиÃDDLÓï¾ä¡£µ±ÐèÒªµÄÊý¾Ý×ÖµäÐÅϢûÓÐÔÚ¹²ÏíÄÚ´æÖÐʱ£¬¾­³£»á·¢ÉúRecursive
calls£¬ÕâЩRecursive calls»á½«Êý¾Ý×ÖµäÐÅÏ¢´ÓÓ²Å̶ÁÈëÄÚ´æÖС£Óû§²»±È¹ØÐÄÕâЩrecursive
SQLÓï¾äµÄÖ´ÐÐÇé¿ö£¬ÔÚÐèÒªµÄʱºò£¬ORACLE»á×Ô¶¯µÄÔÚÄÚ²¿Ö´ÐÐÕâЩÓï¾ä¡£µ±È»DMLÓï¾äÓëSELECT¶¼¿ÉÄÜÒýÆðrecursive
SQL¡£¼òµ¥µÄ˵£¬ÎÒÃÇ¿ÉÒÔ½«´¥·¢Æ÷ÊÓΪrecursive SQL¡£
Row Source(ÐÐÔ´)£ºÓÃÔÚ²éѯÖУ¬ÓÉÉÏÒ»²Ù×÷·µ»ØµÄ·ûºÏÌõ¼þµÄÐеļ¯ºÏ£¬¼´¿ÉÒÔÊDZíµÄÈ«²¿ÐÐÊý¾ÝµÄ¼¯ºÏ£»Ò²¿ÉÒÔÊDZíµÄ²¿·ÖÐÐÊý¾ÝµÄ¼¯ºÏ£»Ò²¿ÉÒÔΪ¶ÔÉÏ2¸örow source½øÐÐÁ¬½Ó²Ù×÷(ÈçjoinÁ¬½Ó)ºóµÃµ½µÄÐÐÊý¾Ý¼¯ºÏ¡£
Predicate(ν´Ê)£ºÒ»¸ö²éѯÖеÄWHEREÏÞÖÆÌõ¼þ
Driving Table(Çý¶¯±í)£º¸Ã±íÓÖ³ÆΪÍâ²ã±í(OUTER TABLE)¡£Õâ¸ö¸ÅÄîÓÃÓÚǶÌ×ÓëHASHÁ¬½ÓÖС£Èç¹û¸Ãrow
source·µ»Ø½Ï¶àµÄÐÐÊý¾Ý£¬Ôò¶ÔËùÓеĺóÐø²Ù×÷ÓиºÃæÓ°Ïì¡£×¢Òâ´Ë´¦ËäÈ»·­ÒëΪÇý¶¯±í£¬µ«Êµ¼ÊÉÏ·­ÒëΪÇý¶¯ÐÐÔ´(driving row
source)¸üΪȷÇС£Ò»°ã˵À´£¬ÊÇÓ¦ÓòéѯµÄÏÞÖÆÌõ¼þºó£¬·µ»Ø½ÏÉÙÐÐÔ´µÄ±í×÷ΪÇý¶¯±í£¬ËùÒÔÈç¹ûÒ»¸ö´ó±íÔÚWHEREÌõ¼þÓÐÓÐÏÞÖÆÌõ¼þ(ÈçµÈÖµÏÞ
ÖÆ)£¬Ôò¸Ã´ó±í×÷ΪÇý¶¯±íÒ²ÊǺÏÊʵģ¬ËùÒÔ²¢²»ÊÇÖ»ÓнÏСµÄ±í¿ÉÒÔ×÷ΪÇý¶¯±í£¬Õýȷ˵·¨Ó¦¸ÃΪӦÓòéѯµÄÏÞÖÆÌõ¼þºó£¬·µ»Ø½ÏÉÙÐÐÔ´µÄ±í×÷ΪÇý¶¯±í¡£ÔÚÖ´ÐÐ
¼Æ»®ÖУ¬Ó¦¸ÃΪ¿¿ÉϵÄÄǸörow source£¬ºóÃæ»á¸ø³ö¾ßÌå˵Ã÷¡£ÔÚÎÒÃǺóÃæµÄÃèÊöÖУ¬Ò»°ã½«¸Ã±í³ÆΪÁ¬½Ó²Ù×÷µÄrow source 1¡£
Probed Table(±»Ì½²é±í)£º¸Ã±íÓÖ³ÆΪÄÚ²ã±í(INNER
TABLE)¡£ÔÚÎÒÃÇ´ÓÇý¶¯±íÖеõ½¾ßÌåÒ»ÐеÄÊý¾Ýºó£¬ÔڸñíÖÐÑ°ÕÒ·ûºÏÁ¬½ÓÌõ¼þµÄÐС£ËùÒԸñíÓ¦µ±Îª´ó±í(ʵ¼ÊÉÏÓ¦¸ÃΪ·µ»Ø½Ï´órow
sourceµÄ±í)ÇÒÏàÓ¦µÄÁÐÉÏÓ¦¸ÃÓÐË÷Òý¡£Ô


Ïà¹ØÎĵµ£º

Oracle²Ù×÷ϵͳÈÏÖ¤

ĬÈÏÇé¿öÏ£¬ÔÚOracleµÄÖ÷»úÉÏ£¨linuxϵͳ£©µÄOracle²Ù×÷ϵͳÓû§Ï£¬ÒÔsysÓû§µÇ½Êý¾Ý¿âʱ¿ÉÒÔ²»ÓÃÊäÈëÃÜÂëÖ±½ÓµÇ¼¡£Êµ¼ÊÉÏ£¬Ö»ÒªÊÇÊôÓÚdba×飨linux£©»òosdba×飨windows£©Ï£¬¶¼¿ÉÒÔ²»ÓÃÃÜÂë½øÐеǼ¡£ÕâÊÇÈÏÖ¤·½Ê½³ÆΪOSÈÏÖ¤¡£
ÕâÖֵǼ·½Ê½µÄ¿ØÖÆ£¬ÊÇͨ¹ý$ORACLE_HOME/network/admin/sqlnet.oraÖеģº
SQLNET.AUTH ......

Oracle job ¹ÜÀí£¨×ªÔØ£©


Oracle job ¹ÜÀí
 
 
SVRMGR> select * from dba_jobs;
³õʼ»¯Ïà¹Ø²ÎÊýjob_queue_processes
alter system set job_queue_processes=39 scope=spfile;//×î´óÖµ²»Äܳ¬¹ý1000  ;job_queue_interval = 10  //µ÷¶È×÷ҵˢÐÂƵÂÊÃëΪµ¥Î»
DBA_JOBS describes all jobs in the database.
USER_JO ......

ORACLE¹ØÓÚÊý¾Ý×ÖµäµÄÀ§»ó~

×î½üÔÚÂÛ̳ÉÏÒ»Ö±¿´µ½ÓÐÅóÓѶÔÊý¾Ý×ÖµäÀïµÄÄÚÈݸ㲻̫Çå³þ£¬±ÈÈç˵V$¡¢V_$¡¢GV$µÈµÈ£¬µ½µ×ÄĸöÊÇͬÒå´Ê£¬ÄĸöÊÇÊÓͼ£¬Äĸö»ùÓÚÄĸö´´½¨¡£½ñÌìÕýºÃ¿´µ½¸Ç¹úÇ¿µÄ¡¶ÉîÈëdz³öORACLE¡·µÚÈýÕ½²µ½Õâ·½ÃæÄÚÈÝ£¬×ܽáһϣ¬Ò²·½±ã´ó¼Òѧϰ¡£
 
Êý¾Ý×ÖµäÓÉËIJ¿·Ö×é³É£º
1¡¢ÄÚ²¿RDBMS(X$)±í
X$ÊÇOracleÊý¾Ý¿âµÄºËÐIJ¿·Ö£¬ÕâЩ ......

Oracle·ÖÒ³´æ´¢¹ý³Ì¼°javaµÄ¾ßÌåµ÷Ó÷½·¨

--°ü
create or replace package pkg_query as
  type cur_query is ref cursor;
end pkg_query;
--¹ý³Ì
CREATE OR REPLACE  PROCEDURE "PRC_QUERY" (p_tableName  
        in  varchar2,   --±íÃû
      & ......

[·ÖÏí]OracleÊý¾Ýµ¼Èëµ¼³öimp/expÃüÁî

OracleÊý¾Ýµ¼Èëµ¼³öimp/expÃüÁî
    Oracle Êý¾Ýµ¼Èëµ¼³öimp/exp¾ÍÏ൱ÓÚoracleÊý¾Ý»¹Ô­Ó뱸·Ý¡£expÃüÁî¿ÉÒÔ°ÑÊý¾Ý´ÓÔ¶³ÌÊý¾Ý¿â·þÎñÆ÷µ¼³öµ½±¾µØµÄdmpÎļþ£¬impÃüÁî¿ÉÒÔ°Ñ dmpÎļþ´Ó±¾µØµ¼Èëµ½Ô¶´¦µÄÊý¾Ý¿â·þÎñÆ÷ÖС£ ÀûÓÃÕâ¸ö¹¦ÄÜ¿ÉÒÔ¹¹½¨Á½¸öÏàͬµÄÊý¾Ý¿â£¬Ò»¸öÓÃÀ´²âÊÔ£¬Ò»¸öÓÃÀ´ÕýʽʹÓá£
Ö´Ðл ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ