ÈçºÎ²é¿´ºÍÇå³ý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µÄºǫ́½ø³Ì£¬²»Òª¶ÔÕâЩ»á»°½øÐÐÈκβÙ×÷¡£
Ïà¹ØÎĵµ£º
oracle±í¿Õ¼ä²Ù×÷Ïê½â
1
2
3×÷Õߣº À´Ô´£º ¸üÐÂÈÕÆÚ£º2006-01-04
5
6
7½¨Á¢±í¿Õ¼ä
8
9CREATE TABLESPACE data01
10DATAFILE '/ora ......
ËäȻѧϰJavaºÜ¾ÃÁË£¬×Ô¼ºÒ²Á¬½Ó¹ýһЩÊý¾Ý¿â£¬±ÈÈçmysqlÖ®ÀàµÄ£¬Èç½ñÄØ£¬Ò²Ñ§Ï°ÁËÒ»¶Îʱ¼äµÄOracle£¬È»¶øÄØ£¬½ñÌìÊÇÎÒµÚÒ»´ÎÁ¬½ÓOracle£¬ºÙºÙ£¬Ó¦¸Ã»¹²»ËãÌ«³Ù°É¡£
½ñÌìÄØ£¬Óе㱿׾£¬´ó¼ÒĪЦ£¡
ÎÒÕâÊÇÒ»¸ö²éѯÀý×Ó
Ê×ÏÈ£¬Ô ......
ʹÓÃÄ£ºý²éѯ£º
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-mm-dd");
Date startdate = sdf.parse(start_date);
Date enddate = sdf.parse(end_date);
List list = sess.createCriteria(MyTabel.class)
.add( ......
select * from ( select tb1.rollid from (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') ) tb1
¡¡¡¡where tb1.rowid !=
¡¡¡¡(
select max(tb2.rown) from (select t.rowid as rown,t.lot_number as rollid
from inv.mtl_onh ......