Oracle¶¯Ì¬ÐÔÄܱí
(1) v$sql
¡¡¡¡Ò»ÌõÓï¾ä¿ÉÒÔÓ³Éä¶à¸öcursor,ÒòΪ¶ÔÏóËùÖ¸µÄcursor¿ÉÒÔÓв»Í¬Óû§(ÈçÀý1)¡£Èç¹ûÓжà¸öcursor(×ÓÓαê)´æÔÚ£¬ÔÚV$SQLAREAΪËùÓÐcursorÌṩ¼¯ºÏÐÅÏ¢¡£
Àý1£º
ÕâÀï½éÉÜÒÔÏÂchild cursor
user A: select * from tbl
user B: select * from tbl
´ó¼ÒÈÏΪÕâÁ½ÌõÓï¾äÊDz»ÊÇÒ»ÑùµÄ°¡£¬¿ÉÄÜ»áÓкܶàÈË»á˵ÊÇÒ»ÑùµÄ£¬µ«ÎÒ¸æËßÄã²»Ò»¶¨£¬ÄÇÎªÊ²Ã´ÄØ£¿
Õâ¸ötblA¿´ÆðÀ´ÊÇÒ»ÑùµÄ£¬µ«ÊDz»Ò»¶¨Å¶£¬Ò»¸öÊÇAÓû§µÄ, Ò»¸öÊÇBÓû§µÄ£¬ÕâʱËûÃǵÄÖ´Ðмƻ®·ÖÎö´úÂë²î±ð¿ÉÄܾʹóÁËŶ£¬¸ÄÏÂд·¨´ó¼Ò¾ÍÃ÷°×ÁË:
select * from A.tbl
select * from B.tbl
¡¡¡¡ÔÚ¸ö±ðcursorÉÏ£¬v$sql¿É±»Ê¹Ó᣸ÃÊÓͼ°üº¬cursor¼¶±ð×ÊÁÏ¡£µ±ÊÔͼ¶¨Î»session»òÓû§ÒÔ·ÖÎöcursorʱ±»Ê¹Óá£
¡¡¡¡PLAN_HASH_VALUEÁд洢µÄÊÇÊýÖµ±íʾµÄcursorÖ´Ðмƻ®¡£¿É±»ÓÃÀ´¶Ô±ÈÖ´Ðмƻ®¡£PLAN_HASH_VALUEÈÃÄã²»±ØÒ»ÐÐÒ»ÐжԱȼ´¿ÉÇáËɼø±ðÁ½ÌõÖ´Ðмƻ®ÊÇ·ñÏàͬ¡£
V$SQLÖеÄÁÐ˵Ã÷£º
l SQL_TEXT£ºSQLÎı¾µÄǰ1000¸ö×Ö·û
l SHARABLE_MEM£ºÕ¼ÓõĹ²ÏíÄÚ´æ´óС(µ¥Î»£ºbyte)
l PERSISTENT_MEM£ºÉúÃüÆÚÄڵĹ̶¨ÄÚ´æ´óС(µ¥Î»£ºbyte)
l RUNTIME_MEM£ºÖ´ÐÐÆÚÄڵĹ̶¨ÄÚ´æ´óС
l SORTS£ºÍê³ÉµÄÅÅÐòÊý
l LOADED_VERSIONS£ºÏÔʾÉÏÏÂÎĶÑÊÇ·ñÔØÈ룬1ÊÇ0·ñ
l OPEN_VERSIONS£ºÏÔʾ×ÓÓαêÊÇ·ñ±»Ëø£¬1ÊÇ0·ñ
l USERS_OPENING£ºÖ´ÐÐÓï¾äµÄÓû§Êý
l FETCHES£ºSQLÓï¾äµÄfetchÊý¡£
l EXECUTIONS£º×ÔËü±»ÔØÈ뻺´æ¿âºóµÄÖ´ÐдÎÊý
l USERS_EXECUTING£ºÖ´ÐÐÓï¾äµÄÓû§Êý
l LOADS£º¶ÔÏó±»ÔØÈë¹ýµÄ´ÎÊý
l FIRST_LOAD_TIME£º³õ´ÎÔØÈëʱ¼ä
l INVALIDATIONS£ºÎÞЧµÄ´ÎÊý
l &n
Ïà¹ØÎĵµ£º
package¾ÍÊÇÓÃÀ´·â×°¹ý³Ì£¬º¯ÊýÓõġ£
Ò»¸öpackage¿ÉÒÔ´æ·Å¶à¸ö¹ý³Ì£¬º¯Êý¡£
µ÷ÓÃÊÇ£º
°üÃû.¹ý³ÌÃû1
°üÃû.¹ý³ÌÃû2
http://hank4ever.javaeye.com/blog/472336
°ü (package)
¡¡¡¡(1)°üµÄÒâÒå
¡¡¡¡pl/sqlΪÁËÂú×ã³ÌÐòÄ£¿é»¯µÄÐèÒª,³ýÁË¿é(block)ºÍ×Ó³ÌÐò½á¹¹Íâ,»¹ÒýÈëÁ˰üµÄ¹¹Ôì¡£
¡¡¡¡°üÊÇÒ»ÖÖÊý¾Ý¿â¶ÔÏó,½«Â ......
ĬÈϵÄÇé¿öÏ£¬Èç¹ûûÓÐÅäÖÃѹËõ±¸·Ý£¬»òÕß±¸·ÝµÄʱºòûÓз¢³öcompressed ÃüÁÄÇôORACLE»á²ÉÓÃNULLÊý¾Ý¿éµÄѹËõ·½·¨À´±¸·ÝÊý¾Ý¿â£¬²ÉÓÃÕâÖÖ·½·¨±¸·Ý£¬ORACLE¾Í²»»á±¸·Ý´ÓδʹÓùýµÄÊý¾Ý¿é¡£ÁíÍâÒ»ÖÖ±¸·Ý¾ÍÊDzÉÓÃcompressedÃüÁîѹËõ±¸·Ý£¬²ÉÓÃÕâÖÖ·½·¨£¬ORACLE»áʹÓÃѹËõËã·¨À´±¸·ÝÊý¾Ý£¬Í¨³£»á ......
ÍêÈ«Ð¶ÔØOracle·½·¨£º
Èí¼þ»·¾³£º
1¡¢Windows XP + Oracle 10g
2¡¢Oracle°²×°Â·¾¶Îª£ºd:\Oracle
1¡¢Èç¹ûÊý¾Ý¿âÅäÖÃÁË×Ô¶¯´æ´¢¹ÜÀí(ASM),Ó¦¸ÃÏÈɾ³ý¾Û¼¯Í¬²½·þÎñCSS£¨cluster Synchronization Services).ɾ³ýCSS·þÎñµÄ·½·¨ÊÇÔÚDOSÃüÁîÐÐÖÐÖ´ÐÐÈçÏÂÃüÁ localconfig delete
2¡¢ÔÚ“·þÎñ”´°¿ÚÖÐÍ£ ......
oracle Âß¼±¸·ÝÃüÁîEXP/IMP²ÎÊý²Î¿¼ÊÖ²á
°ïÖúÃüÁexp help=y
Export: Release 10.2.0.1.0 - Production on Thu Jul 20 10:39:50 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
You can let Export prompt you for parameters by entering the EXP
command followed b ......
1. SQL Óï¾äÓëSQL*Plus ÃüÁî
SQL
SQL*Plus
Ò»ÖÖÓïÑÔ
Ò»ÖÖ»·¾³
ANSI±ê×¼
Oracle µÄÌØÐÔÖ®Ò»
¹Ø¼ü×Ö²»ÄÜËõд
¹Ø¼ü×Ö¿ÉÒÔËõд
ʹÓÃÓï¾ä¿ØÖÆÊý¾Ý¿âÖеıíµÄ¶¨ÒåÐÅÏ¢
ºÍ±íÖеÄÊý¾Ý
ÃüÁî²»ÄܸıäÊý¾Ý¿âÖеÄÊý¾ÝµÄÖµ
¼¯ÖÐÔËÐÐ
2.ÒÔϼ¸¸ö²éѯºÜÖØÒª£¬×ÐϸÌå»á
1 (ÓÐÔ±¹¤µÄ³ ......