ÈçºÎ²é¿´ºÍÇå³ýoracleÎÞÓõÄÁ¬½Ó½ø³Ì
DBAÒª¶¨Ê±¶ÔÊý¾Ý¿âµÄÁ¬½ÓÇé¿ö½øÐмì²é£¬¿´ÓëÊý¾Ý¿â½¨Á¢µÄ»á»°ÊýÄ¿ÊDz»ÊÇÕý³££¬Èç¹û½¨Á¢Á˹ý¶àµÄÁ¬½Ó£¬»áÏûºÄÊý¾Ý¿âµÄ×ÊÔ´¡£Í¬Ê±£¬¶ÔһЩ“¹ÒËÀ”µÄÁ¬½Ó£¬¿ÉÄÜ»áÐèÒªDBAÊÖ¹¤½øÐÐÇåÀí¡£
ÒÔϵÄSQLÓï¾äÁгöµ±Ç°Êý¾Ý¿â½¨Á¢µÄ»á»°Çé¿ö:
select sid,serial#,username,program,machine,status
from v$session;
Êä³ö½á¹ûΪ:
SID SERIAL# USERNAME PROGRAM MACHINE STATUS
---- ------- ---------- ----------- --------------- --------
1 1 ORACLE.EXE WORK3 ACTIVE
2 1 ORACLE.EXE WORK3 ACTIVE
3 1 ORACLE.EXE WORK3 ACTIVE
4 1 ORACLE.EXE WORK3 ACTIVE
5 3 ORACLE.EXE WORK3 ACTIVE
6 1 ORACLE.EXE WORK3 ACTIVE
7 1 ORACLE.EXE WORK3 ACTIVE
8 27 SYS SQLPLUS.EXE WORKGROUP\WORK3 ACTIVE
11 5 DBSNMP dbsnmp.exe WORKGROUP\WORK3 INACTIVE
IXDBA.NETÉçÇøÂÛ̳
ÆäÖУ¬
SID »á»°(session)µÄIDºÅ;
SERIAL# »á»°µÄÐòÁкţ¬ºÍSIDÒ»ÆðÓÃÀ´Î¨Ò»±êʶһ¸ö»á»°;
USERNAME ½¨Á¢¸Ã»á»°µÄÓû§Ãû;
PROGRAM Õâ¸ö»á»°ÊÇÓÃʲô¹¤¾ßÁ¬½Óµ½Êý¾Ý¿âµÄ;
STATUS µ±Ç°Õâ¸ö»á»°µÄ״̬£¬ACTIVE±íʾ»á»°ÕýÔÚÖ´ÐÐijЩÈÎÎñ£¬INACTIVE±íʾµ±Ç°»á»°Ã»ÓÐÖ´ÐÐÈκβÙ×÷;
Èç¹ûDBAÒªÊÖ¹¤¶Ï¿ªÄ³¸ö»á»°£¬ÔòÖ´ÐÐ:
alter system kill session 'SID,SERIAL#';
×¢Ò⣬ÉÏÀýÖÐSIDΪ1µ½7(USERNAMEÁÐΪ¿Õ)µÄ»á»°£¬ÊÇOracleµÄºǫ́½ø³Ì£¬²»Òª¶ÔÕâЩ»á»°½øÐÐÈκβÙ×÷¡£
Ïà¹ØÎĵµ£º
ËäȻѧϰJavaºÜ¾ÃÁË£¬×Ô¼ºÒ²Á¬½Ó¹ýһЩÊý¾Ý¿â£¬±ÈÈçmysqlÖ®ÀàµÄ£¬Èç½ñÄØ£¬Ò²Ñ§Ï°ÁËÒ»¶Îʱ¼äµÄOracle£¬È»¶øÄØ£¬½ñÌìÊÇÎÒµÚÒ»´ÎÁ¬½ÓOracle£¬ºÙºÙ£¬Ó¦¸Ã»¹²»ËãÌ«³Ù°É¡£
½ñÌìÄØ£¬Óе㱿׾£¬´ó¼ÒĪЦ£¡
ÎÒÕâÊÇÒ»¸ö²éѯÀý×Ó
Ê×ÏÈ£¬Ô ......
Ò».×ÊÔ´ÐèÒª£º
ÖÁÉÙ1024 MBÎïÀíÄÚ´æ
1024£2048 Ðè1.5±¶µÄ½»»¥¿Õ¼ä
2048£8192 Ðè1±¶µÄ½»»¥¿Õ¼ä
8192£ Ðè0.75±¶µÄ½»»¥¿Õ¼ä
ÖÁÉÙ400 MB /tmp ÁÙʱĿ¼¿Õ¼ä
oracleÈí¼þÐèÒª1.5 GB µ½ 3.5 GB ´ÅÅ̿ռä
ĬÈÏÊý¾Ý¿âÐèÒª1.2 GB
¶þ.²é¿´ÏµÍ³×ÊÔ´Ïà¹ØÓï ......
ÈçºÎÔ¶³ÌÅжÏOracleÊý¾Ý¿âµÄ°²×°Æ½Ì¨
select * from v$version;
²é¿´±í¿Õ¼äµÄʹÓÃÇé¿ö
select sum(bytes)/(1024*1024) as free_space,tablespace_name
from dba_free_space
group by tablespace_name;
SELECT A.TABLESPACE_NAME,A.BYTES TOTAL,B.BYTES USED, C.BYTES FREE,
(B.BYTES*100)/A.BYTES "% USED",(C.BYTES ......
select r.rollid as rollid from zh1_rool r where r.date_p >=to_date('2009-11-26 23:59:59','yyyy-mm-dd hh24:mi:ss') and rollid not in
(select t.lot_number as rollid
from inv.mtl_onhand_quantities_detail t
left join mtl_system_items_b mi
on t.inventory_item_id = mi.inventory_ ......
²éѯ±íempÖÐËùÓÐÊý¾Ý
select emp_id,rownum from emp
µÚÒ»²½£¬²éѯ½á¹û,rownum´ý¶¨
emp_id rownum
1 ? 1
2 ? 2
3 ? 3
4&n ......