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

Unix For Oracle DBA

     ¶ÔÓÚ¸Õ½Ó´¥unixµÄÈ˶øÑÔ,ÀûÓùܵÀ½«¸÷ÖÖÃüÁî×éºÏÔÚÒ»ÆðÀ´ÊµÏÖij¸ö¹¦ÄÜ,ÊDZȽÏÄÑÊÊÓ¦µÄÒ»¼þÊÂÇé,ÏÂÃ棬ÎÒ¾ÍÓÃÒ»¸ö¾ßÌåµÄÀý×Ó,Ïêϸ½²ÏÂ×ÅÀïÃæµÄÓ÷¨ºÍ˼·.¿´¿´µ½µ×ÎÒÃÇ°ÑÃüÁ°óÔÚÒ»Æð,unix¶¼×öÁËʲô.
     ¾ÍÓÃÒ»¸öoracle¹ÜÀíÖÐ,¿ÉÄÜ»áÓöµ½µÄÀý×Ó°É,Èç¹ûoracle¹ÒÁË£¬ÎÒÃÇͨ¹ýËùÓÐÕý³£·½·¨¶¼ÎÞ·¨½«ÆäÕý³£¹Ø±Õ,°üÀ¨shutdown abort¶¼ÎÞЧ,ÀàËÆÕâÖÖÇé¿ö,ÓпÉÄܾÍos×ÊÔ´ÅäÖóöÁËÎÊÌâ,µ¼ÖÂoracleµÄij¸öºËÐÄprocess¹Òס¶øµ¼ÖµÄ,ÄÇÕâ¸öʱºò£¬ÎÒÃǾÍÒª²ÉÈ¡±©Á¦´ëÊ©,Ôõô±©Á¦ÄØ£¬¾ÍÊÇͨ¹ýunixµÄkillÃüÁîÖ±½Ó½áÊøos¼¶±ðµÄprocessÀ´Ç¿ÖƽáÊøoracle,µ±È»,Èç¹ûÓöµ½oracleµÄpmonûÓм°Ê±ÇåÀísessionµÄ×ÊÔ´£¬ÎÒÃÇÒ²¿ÉÒÔ²ÉÈ¡ÀàËƵķ½·¨,ÔÚºóÃæ»á¶Ô´Ë½øÐÐ˵Ã÷.
     Ê×ÏÈ¿´¿´Õâ¸öÃüÁî :   ps -ef|grep "ora_"|grep -v grep|awk '{ print $2 }'|xargs kill -9
     Õâ¸öÃüÁîËùÒªÍê³ÉµÄÈÎÎñ£¬¾ÍÊǰѵ±Ç°ÏµÍ³ÖÐËùÓÐoracleµÄprocessÈ«²¿É±µô,ÀïÃæÓõ½ÁËps , grep , awk , xargs , killÕ⼸¸öÃüÁî.ÆäÖÐawkÊǸöºÃ¶«Î÷,ºÇºÇ,²»ÖªµÀ´ó¼ÒÖª²»ÖªµÀregular expressionÕâ¸ö¶«Î÷,ÖÐÎÄ·­Òë³ÉÕýÔò±í´ïʽ,ÎÒÒ»Ö±¾õµÃ²»ÊÇÊ®·Ö׼ȷ,¿ÉÒ²²»ÖªµÀ¸Ã·­Òë³Éʲô²Å¾«È·£¬¾ÍÓÃÓ¢ÎÄ°É,ºÇºÇ,¼ò³ÆRE.ÎÒÕâÀïÏÈÌáÒ»ÏÂ,µÈ˵ÍêÕâ¸öÀý×Óºó,ÔÚÉÔ΢½²Ò»Ï¹ØÓÚREµÄ¶«Î÷£¬ÉîÈëµÄ£¬»¹ÊÇÒª¿¿´ó¼ÒÑо¿£¬O'ReillyÓб¾ÊéÊÇרÃŽ²Õâ¸öµÄ£¬¿ÉÒԲο¼,ºÃÑÔ¹éÕý´«.ÎÒÃÇÀ´·ÖÎöÒ»ÏÂ,ΪʲôÕâ¸öÃüÁî´®¿ÉÒÔ´ïµ½Õâ¸öÄ¿µÄ.
     killÊÇunixÖÐÖÕÖ¹processµÄÃüÁî,ͨ³££¬ÎÒÃÇÈç¹ûÖªµÀÒ»¸öprocessµÄpid,Èç¹ûÏëÖÕÖ¹Ëü,¾Í¿ÉÒÔÓà kill -9 pidÀ´ÊµÏÖ,ÄÇͬÑù,¼ÈÈ»oracleÊÇ͸¹ý¸÷ÖÖprocessÔËÐÐÔÚosÉϵģ¬ÎÒÃÇÊDz»ÊÇÒ²¿ÉÒÔͬÑùÀ´¶Ô´ýËüÄØ£¬´ð°¸Êǿ϶¨µÄ,ÎÒÃÇ¿ÉÒÔÓÃkill -9 pidµÄ·½Ê½À´ÖÕÖ¹oracle½ø³Ì,ok,»Øµ½ÎÒÃǵÄÀý×ÓÖÐ,ÎÒÃÇÒѾ­ÖªµÀÁËÇå³ýoracle processµÄ·½·¨£¬ÏÖÔھͲîoracle process µÄpid ÁË,Ö»ÒªÄÜ°ÑËûÃÇÕÒ³öÀ´£¬¾ÍÍòÊ´ó¼ªÁË.
     ÈçºÎÈ¥ÕÒËüµÄpidÄØ,Õâʱºò,ps¾ÍµÇ³¡ÁË,psÕâ¸öÃüÁî,ÊÇÓÃÀ´²é¿´µ±Ç°ÏµÍ³ÔËÐеÄprocessµÄ,×î³£ÓõIJÎÊýÊÇ-eºÍ-f,Á¬ÔÚÒ»Æð¾ÍÊÇps -ef ,ÎÒÃÇÔÚunixÏÂÔËÐÐ,ÆÁÄ»ÉϾͻáÏÔʾ³öµ±Ç°ÏµÍ³ÔËÐеÄprocess:
   [oracle@blade /etc]$ ps -ef
     UID   PID  PPID  C    STIME


Ïà¹ØÎĵµ£º

Oracle ²»Ê¹ÓÃË÷Òý£¬Ë÷ÒýʧЧµÄ¼¸ÖÖÇé¿ö

1,<>
2,µ¥¶ÀµÄ>,<,(ÓÐʱ»áÓõ½£¬ÓÐʱ²»»á)
3,like "%_" °Ù·ÖºÅÔÚÇ°.
4,±íû·ÖÎö.
5,µ¥¶ÀÒýÓø´ºÏË÷ÒýÀï·ÇµÚһλÖõÄË÷ÒýÁÐ.
6,×Ö·ûÐÍ×Ö¶ÎΪÊý×ÖʱÔÚwhereÌõ¼þÀï²»Ìí¼ÓÒýºÅ.
7,¶ÔË÷ÒýÁнøÐÐÔËËã.ÐèÒª½¨Á¢º¯ÊýË÷Òý.
8,not in ,not exist.
9,µ±±äÁ¿²ÉÓõÄÊÇtimes±äÁ¿£¬¶ø±íµÄ×ֶβÉÓõÄÊÇdate±äÁ¿Ê±.»òÏà· ......

OracleµÄÍⲿ±í

Íⲿ±í×÷ÓÃ:¼ÓÔغÍжÔØÊý¾Ý
Íⲿ±í¶¼ÊÇÖ»¶Á±í,²»ÄܽøÐÐupdate,insert,delete²Ù×÷.
Oracle ÌṩÁ½ÖÖ·ÃÎÊÇý¶¯: ORACLE_LOADER, ORACLE_DATAPUMP(oracle 10.2ºóÐÂÔöµÄÇý¶¯)
ORACLE_LOADER:    ËüÀûÓÃoracle loader¼¼Êõ´ÓÍⲿ±í¶ÁÈ¡Êý¾Ý. Ëü»¹¾ßÓÐÀàËÆSQL*Loader¹¤¾ß¿ØÖÆÎļþÓï·¨µÄÊý¾ÝÓ³ÉäÄÜÁ¦.
ORACLE_DAT ......

Oracle ´æ´¢¹ý³Ì ¶¨Òå ºÍ Óŵã

 
¶¨Ò壺
´æ´¢¹ý³Ì£¨Stored Procedure £©ÊÇÒ»×éΪÁËÍê³ÉÌض¨¹¦ÄܵÄSQL Óï¾ä¼¯£¬¾­±àÒëºó´æ´¢ÔÚÊý¾Ý¿âÖС£Óû§Í¨¹ýÖ¸¶¨´æ´¢¹ý³ÌµÄÃû×Ö²¢¸ø³ö²ÎÊý£¨Èç¹û¸Ã´æ´¢¹ý³Ì´øÓвÎÊý£©À´Ö´ÐÐËü¡£´æ´¢¹ý³ÌÊÇÊý¾Ý¿âÖеÄÒ»¸öÖØÒª¶ÔÏó£¬ÈκÎÒ»¸öÉè¼ÆÁ¼ºÃµÄÊý¾Ý¿âÓ¦ÓóÌÐò¶¼Ó¦¸ÃÓõ½´æ´¢¹ý³Ì¡£ ´æ´¢¹ý³ÌÊÇÓÉÁ÷¿ØÖƺÍSQL Óï¾äÊéдµÄ¹ý ......

Oracle DropÃüÁî

--ɾ³ý¿ÕµÄ±í¿Õ¼ä£¬µ«ÊDz»°üº¬ÎïÀíÎļþ
drop tablespace tablespace_name;
--ɾ³ý·Ç¿Õ±í¿Õ¼ä£¬µ«ÊDz»°üº¬ÎïÀíÎļþ
drop tablespace tablespace_name including contents;
--ɾ³ý¿Õ±í¿Õ¼ä£¬°üº¬ÎïÀíÎļþ
drop tablespace tablespace_name including datafiles;
--ɾ³ý·Ç¿Õ±í¿Õ¼ä£¬°üº¬ÎïÀíÎļþ
drop tablespace table ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ