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
Ïà¹ØÎĵµ£º
¹ØÓÚ´æ´¢¹ý³ÌºÍº¯ÊýµÄ¶¨ÒåÍøÉÏÒ»ËÑÒ»´ó°Ñ£¬ÕâÀï¾Í²»ÌØÊâ½éÉÜÁË£¬ÕâÀï¾ÍÖ»¶ÔÎÒ×Ô¼ºÐ´µÄ¼¸ÖÖ¸ñʽµÄ´æ´¢¹ý³ÌºÍº¯Êý×öһЩ×ܽᣬϣÍû¶Ô´ó¼ÒÓеã°ïÖú¡£
Ò»£º´æ´¢¹ý³Ì
1£º×îÆÕͨµÄÒ»ÖÖ¡££¨´«²Î£¬²éѯÓαִ꣬ÐУ¬Ñ»·Óαê×ö²åÈ붯×÷£©¡£
create or replace procedure zy2040_sirole(rolekey in varchar2) ......
declare
msg varchar(1000); --¶¨ÒåÒ»¸ö±äÁ¿ÓÃÓÚÏÔʾ´«³öµÄÐÅÏ¢
begin
PRO_TACCOUNT_RECOUNT ('B9D2B59A955541298D59EA8C35668CFD',msg); --Ö´Ðд洢¹ý³Ì
dbms_output.put_line(msg); --Êä³ö±äÁ¿
end; ......
½çÃ濪·¢ÈËÔ±±¨ÓкܶàÖظ´Êý¾ÝÔÚÓû§È¨ÏÞ±í¡£È»ºóÎÒɾ³ýÁ˱íÊý¾Ýdelete ·½Ê½£¬ÐÞ¸ÄÁ˶ÔÓ¦µÄ´æ´¢¹ý³Ìʹ֮²»Öظ´£¡
ºóÀ´·¢ÏÖ ÖØÐÂÀ»ØµÄÊý¾ÝûȨÏÞ¡£ Ö»ºÃÉÁ»Øµ½½ñÌìÁ賿ÁË£¡
SQL> ALTER TABLE BA.T_POWER_ADMIN ENABLE ROW MOVEMENT;
Table altered
SQL> flashback table ba.t_Power_Admin to tim ......
¡¡¡¡Ò»¡¢Ê²Ã´ÊÇMTS
¡¡¡¡MTS = Multi-Threaded ServerMTSÊÇORACLE SERVERµÄÒ»¸ö¿ÉÑ¡µÄÅäÖÃÑ¡Ôñ£¬ÊÇÏà¶ÔDEDICATE·½Ê½¶øÑÔ£¬Ëü×î´óµÄÓŵãÊÇÔÚÒÔ²»ÓÃÔö¼ÓÎïÀí×ÊÔ´(ÄÚ´æ)µÄÇ°ÌáÏÂÖ§³Ö¸ü¶àµÄ²¢·¢µÄÁ¬½Ó¡£Joseph C.JohnsonÒԲ͹ݸø³öÒ»¸öMTSµÄÐÎÏóµÄ±ÈÓ÷
¡¡¡¡¼ÙÉèORACLEÊÇÒ»¼Ò²Í¹Ý£¬µ±Äã×ß½øÒ»¼Ò²Í¹ÝʱÄã¸Ð¾õ×îÊæ·þµÄ·þÎñ·½Ê½¾ÍÊ ......
¡¡¡¡oracle% sqlplus /nolog
¡¡¡¡SQL> conn / as sysdba
¡¡¡¡Êý¾Ý¿âµÄÎïÀíÎļþ
¡¡¡¡Êý¾ÝÎļþ
¡¡¡¡select file_name from dba_data_files;
¡¡¡¡¿ØÖÆÎļþ
¡¡¡¡select name from v$controlfile;
¡¡¡¡ÈÕÖ¾Îļþ
¡¡¡¡select member from v$logfile;
¡¡¡¡---------------------------------------------------------
......