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

OracleÖÐKill sessionµÄÑо¿

ÎÒÃÇÖªµÀ,ÔÚOracleÊý¾Ý¿âÖÐ,¿ÉÒÔͨ¹ýkill sessionµÄ·½Ê½À´ÖÕÖ¹Ò»¸ö½ø³Ì,Æä»ù±¾Óï·¨½á¹¹Îª:
alter system kill session 'sid,serial#' ;
 
±»killµôµÄsession,״̬»á±»±ê¼ÇΪkilled,Oracle»áÔÚ¸ÃÓû§ÏÂÒ»´ÎtouchʱÇå³ý¸Ã½ø³Ì.
ÎÒÃÇ·¢ÏÖµ±Ò»¸ösession±»killµôÒԺ󣬸ÃsessionµÄpaddr±»Ð޸ģ¬Èç¹ûÓжà¸ösession±»kill£¬ÄÇô¶à¸ösession
µÄpaddr¶¼±»¸ü¸ÄΪÏàͬµÄ½ø³ÌµØÖ·:
 
SQL> select saddr,sid,serial#,paddr,username,status from v$session where username is not null;
SADDR SID SERIAL# PADDR USERNAME STATUS
-------- ---------- ---------- -------- ------------------------------ --------
542E0E6C 11 314 542B70E8 EYGLE INACTIVE
542E5044 18 662 542B6D38 SYS ACTIVE
SQL> alter system kill session '11,314';
System altered.
SQL> select saddr,sid,serial#,paddr,username,status from v$session where username is not null;
SADDR SID SERIAL# PADDR USERNAME STATUS
-------- ---------- ---------- -------- ------------------------------ --------
542E0E6C 11 314 542D6BD4 EYGLE KILLED
542E5044 18 662 542B6D38 SYS ACTIVE
SQL> select saddr,sid,serial#,paddr,username,status from v$session where username is not null;
SADDR SID SERIAL# PADDR USERNAME STATUS
-------- ---------- ---------- -------- ------------------------------ --------
542E0E6C 11 314 542D6BD4 EYGLE KILLED
542E2AA4 14 397 542B7498 EQSP INACTIVE
542E5044 18 662 542B6D38 SYS ACTIVE
SQL> alter system kill session '14,397';
System altered.
SQL> select saddr,sid,serial#,paddr,username,status from v$session where username is not null;
SADDR SID SERIAL# PADDR USERNAME STATUS
--


Ïà¹ØÎĵµ£º

¹ØÓÚ IBM Tivoli Storage ManagerÔÚOracleÖеÄÓ¦ÓÃ

¡¶oracle´óÐÍÊý¾Ý¿âϵͳÔÚAIX/unixÉϵÄʵսÏê½â¡·ÌÖÂÛ23£º¹ØÓÚTivoli storage manage¡£ÎÄƽ Õâ¶ÎÈÕ×Ó¼äÓÐÈô¸ÉÕâ±¾ÊéµÄÅóÓÑÀ´ÓʼþÌÖÂÛTSMµÄÎÊÌ⣬ÒÔ¼°ÊDz»ÊÇÒªÉÏTSM±¸·ÝϵͳµÄÎÊÌâ¡£ÉõÖÁ°Ñ·½°¸·¢¹ýÀ´ÇëÎÒ¿´¿´£¬°Ñ¹Ø£¡Ð»Ð»Ð»Ð»´ó¼ÒµÄÐÅÈΣ¬¶ÔÕâ¸ö¶«Î÷ÎÒÒ²ÊÇÕ¾ÔÚ×îÖÕÓû§µÄ½Ç¶ÈÀ´¿´µÄ£¬ÕâÀïÎÒÃÇÌÖÂÛÌÖÂÛ£¬ÁÄÁÄ¡£ ÏÔÈ»£¬ºÃµÄ¼ ......

OracleÖÐNOT INµÄÎÊÌâ

     ½ñÌìÔÚ¿ª·¢µÄʱºòÐèÒª²éѯÊý¾Ý¿âÖÐÄÄЩѧÉúÓжà¸öѧºÅ£¬Ð´µÄsqlÈçÏ£º
     select * from(
  select count(t1.xh) as xhs,t2.uuid,t3.xm as xsxm,t3.sfzjh, t1.xjzt as xjzt from hust_xs_jb t1
   INNER JOIN hust_xx_identity t2 on t1.sfid ......

Oracle¸ü¸ÄÊý¾ÝÎļþλÖÃ


·½·¨Ò»£ºoffline±í¿Õ¼ä
1¡¢offline±í¿Õ¼ä£ºalter tablespace tablespace_name offline£»
2¡¢¸´ÖÆÊý¾ÝÎļþµ½ÐµÄĿ¼£»
3¡¢renameÐ޸ıí¿Õ¼ä£¬²¢Ð޸ĿØÖÆÎļþ£»
4¡¢online±í¿Õ¼ä£»
1¡¢offline±í¿Õ¼äzerone
SQL> select name from v$datafile;
NAME
--------------------------------------------------------- ......

ORACLEÖеÄdefault role£¬set role

oracleȨÏÞÌåϵÖÐÓиödefault role£¬±È½ÏÄÑÒÔÀí½â¡£ÏÂÃæÓÃʵÀý˵Ã÷Ò»ÏÂ×÷Óá£
ÎÒÃÇ¿ÉÒÔ¸øij¸öÓû§·ÖÅäһЩ½ÇÉ«£¬±ÈÈçrole r1,r2,r3,r4£¬¶øÆäÖпÉÒÔ½«Ä³Ð©½ÇÉ«±ÈÈçr1ÉèÖÃΪdefault role£¬ÆäËûµÄ²»ÉèÖóÉdefault role£¬ÕâÑù£¬µ±¸ÃÓû§µÇ¼ʱ£¬×Ô¶¯¾ßÓÐdefault roleÖÐËù°üº¬µÄȨÏÞ£¬ÆäËûµÄ½ÇÉ«Ëù¾ßÓеÄȨÏÞҪͨ¹ýset role ½ÇÉ ......

oracleÊý¾Ý¿âͨ¹ýÃüÁîµÇ¼£¬Ö´ÐÐSQLÓï¾ä

¡¡¡¡¡¡
        һֱûÓÐÍæ¹ýͨ¹ýÃüÁîÔÚDOSÏÂÖ´ÐÐoracleÊý¾Ý¿â,ËäÈ»¸ã¿ª·¢2ÄêÁË£¬»òÐíÕâƪÎÄÕÂдµÃ±È½Ï·ôdz£®µ«»òÐí¶ÔÄÄЩ¸Õ¸ÕѧORACLEµÄÅóÓÑ»¹ÊÇÓÐÒ»¶¨°ïÖúµÄ£®
¡¡¡¡¡¡Í¨¹ýÃüÁîÄܹ»ºÜºÃµÄÖ´ÐдóÅúÁ¿Êý¾Ý½Å±¾£§½Å±¾£®sql£§£®±ÜÃâͨ¹ýPLSQL DeveloperÖ´ÐÐÅúÁ¿Êý¾ÝÔì³ÉµÄËÀ»úÇé¿ö£®
¶þ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ