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

¹ØÓÚOracleµÄsession

¹ØÓÚOracleµÄsession
      1.ÈçºÎ²é¿´session¼¶µÄµÈ´ýʼþ£¿
µ±ÎÒÃǶÔÊý¾Ý¿âµÄÐÔÄܽøÐе÷Õûʱ£¬Ò»¸ö×îÖØÒªµÄ²Î¿¼Ö¸±ê¾ÍÊÇϵͳµÈ´ýʼþ¡£$system_event,v$session_event,v$session_waitÕâÈý¸öÊÓͼÀï¼Ç¼µÄ¾ÍÊÇϵͳ¼¶ºÍsession¼¶µÄµÈ´ýʼþ£¬Í¨¹ý²éѯÕâЩÊÓͼÄã¿ÉÒÔ·¢ÏÖÊý¾Ý¿âµÄһЩ²Ù×÷µ½µ×Ôڵȴýʲô£¿ÊÇ´ÅÅÌI/O£¬»º³åÇø棬»¹ÊDzåËøµÈµÈ¡£
ͨ¹ýÈçÏÂsqlÄã¿ÉÒÔ²éѯÄãµÄÿ¸öÓ¦ÓóÌÐòµ½µ×Ôڵȴýʲô£¬´Ó¶øÕë¶ÔÕâЩÐÅÏ¢¶ÔÊý¾Ý¿âµÄÐÔÄܽøÐе÷Õû¡£
Select s.username,s.program,s.status,se.event,se.total_waits,se.total_timeouts,se.time_waited,se.average_wait
from v$session s, v$session_event se
Where s.sid=se.sid  And se.event not like 'SQl*Net%'  And s.status ='ACTIVE'  And s.username is not null
2.oracleÖвéѯ±»ËøµÄ±í²¢ÊÍ·Åsession
SELECT A.OWNER,A.OBJECT_NAME,B.XIDUSN,B.XIDSLOT,B.XIDSQN,B.SESSION_ID,B.ORACLE_USERNAME, B.OS_USER_NAME,B.PROCESS, B.LOCKED_MODE, C.MACHINE,C.STATUS,C.SERVER,C.SID,C.SERIAL#,C.PROGRAM
from ALL_OBJECTS A,V$LOCKED_OBJECT B,SYS.GV_$SESSION C
WHERE ( A.OBJECT_ID = B.OBJECT_ID ) AND (B.PROCESS = C.PROCESS ) ORDER BY 1,2
ÊÍ·Åsession Sql:
alter system kill session 'sid, serial#'
alter system kill session '379, 21132'
alter system kill session '374, 6938'
3.²é¿´Õ¼ÓÃϵͳio½Ï´óµÄsession
SELECT se.sid,se.serial#,pr.SPID,se.username,se.status,se.terminal,se.program,se.MODULE,se.sql_address,st.event,st.p1text,si.physical_reads,si.block_changes
from v$session se,¡¡v$session_wait st,v$sess_io si,v$process pr
WHERE st.sid=se.sid ¡¡AND st.sid=si.sid AND se.PADDR=pr.ADDR AND se.sid>6¡¡AND st.wait_time=0 AND st.event NOT LIKE '%SQL%' ORDER BY physical_reads DESC
4.ÕÒ³öºÄcpu½Ï¶àµÄsession
select a.sid,spid,status,substr(a.program,1,40) prog,a.terminal,osuser,value/60/100 value
    from v$session a,v$process b,v$sesstat c
    where c.statistic#=12 and c.sid=a.sid and a.paddr=b.addr order by value desc
5.²éѯsession±»ËøµÄsql¿ÉÒÔÓÃÒ»ÏÂÓï¾ä


Ïà¹ØÎĵµ£º

orale tablespace&datafile oracle±í¿Õ¼ä

ÔÚÇ°ÃæѧϰOracleÊý¾Ý¿â»ù´¡¼Ü¹¹Ê±£¬ÒѾ­Á˽âÁËOracleµÄ´æ´¢½á¹¹£¬Âß¼­ÉÏ£¬OracleµÄÊý¾Ý´æ·ÅÔÚtablespacesÖУ¬ÎïÀíÉÏ´æ·ÅÔÚdatafilesÖС£Ò»¸ötablespaceÖ»ÄÜÊôÓÚÒ»¸öÊý¾Ý¿â(Ò»¸öÊý¾Ý¿â¿É°üÀ¨¶à¸ötablespace)£¬°üÀ¨ÁË1¸ö»ò¶à¸öÊý¾ÝÎļþ¡£Tablespace¿É½øÒ»²½·ÖΪsegments¡¢extentsºÍblocks¡£Ò»¸ödatafileÖ»ÊôÓÚÒ»¸öÊý¾Ý¿âµÄÒ» ......

Oracle Data Gurad ÀíÂÛ֪ʶ


RAC£¬ Data Gurad£¬ Stream ÊÇOracle ¸ß¿ÉÓÃÐÔÌåϵÖеÄÈýÖÖ¹¤¾ß£¬Ã¿¸ö¹¤¾ß¼´¿ÉÒÔ¶ÀÁ¢Ó¦Óã¬Ò²¿ÉÒÔÏ໥ÅäºÏ¡£ ËûÃǸ÷×ԵIJàÖص㲻ͬ£¬ÊÊÓó¡¾°Ò²²»Í¬¡£
RAC ËüµÄÇ¿ÏîÔÚÓÚ½â¾öµ¥µã¹ÊÕϺ͸ºÔؾùºâ£¬Òò´ËRAC ·½°¸³£ÓÃÓÚ7*24 µÄºËÐÄϵͳ£¬µ«RAC ·½°¸ÖеÄÊý¾ÝÖ»ÓÐÒ»·Ý£¬¾¡¹ ......

ÈçºÎ¿´¶®ORACLEÖ´Ðмƻ®

ÈçºÎ¿´¶®ORACLEÖ´Ðмƻ®
Ò»¡¢Ê²Ã´ÊÇÖ´Ðмƻ®
An explain plan is a representation of the access path that is taken when a query is executed within Oracle.
¶þ¡¢ÈçºÎ·ÃÎÊÊý¾Ý
At the physical level Oracle reads blocks of data. The smallest amount of data read is a single Oracle block, the largest is con ......

oracleÁ·Ï°Ì⣨mldnÊÓƵ£©Ò»

1,Áгö×îµÍн½ð´óÓÚ1500µÄ¸÷ÖÖ¹¤×÷¼°´ÓÊ´˹¤×÷µÄÈ«²¿¹ÍÔ±ÈËÊý¡£
select job,count(empno) from emp
where job in(select job from emp group by job having min(sal)>1500)
group by job;
2£¬Áгöн½ð¸ßÓÚ¹«Ë¾Æ½¾ùн½ðµÄËùÓÐÔ±¹¤ËùÔÚ²¿ÃÅ£¬Éϼ¶Áìµ¼£¬¹«Ë¾µÄ¹¤×ʵȼ¶¡£
select e.ename,d.dname,m.ename,e.sal,sa. ......

OracleÖÐÌí¼ÓJob

OracleÖÐÌí¼ÓJob
 --ÿ15·ÖÖÓ trunc(sysdate+1/96,'MI')/*5:Mins*/ sysdate + 5/(60*24)
SQL> variable jobno number;
SQL> begin
  2  dbms_job.submit(:jobno,'´æ´¢¹ý³ÌÃû;',sysdate,'/*1:Hr*/ sysdate + 1/24' );
  3  commit;
  4  end;
  5  /
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ