oracle¸´Ï°£¨Ò»£© Ö®OracleÌåϵ½á¹¹
ѧϰOracle DBAÒ²°ë¸ö¶àѧÆÚÁË£¬½ñÌìÃÍÈ»²Å·¢ÏÖ£¬ÔÀ´ÎÒµÄÊ黹ÊǺÜеģ¬ÉϿβÙ×÷ʱºòÒ²Ö»ÊÇÖªµÀ´ó¸ÅÔõô×ö£¬µ«ÊÇÒªÕæµÄÈ«²¿×Ô¼º×ö£¬¶ø²»È¥·Ê黹ÊÇÓÐÒ»¶¨µÄÄѶȵģ¬ËùÒÔÄØ£¬½ñÌ쿪ʼ½«DBA´ÓÍ·¸´Ï°Ò»±é£¬Í¬Ê±ÔÙ²Ù×÷Ò»±é¡£
µÚÒ»Õ£¬Ñ§µÄÊÇOracleµÄÌåϵ½á¹¹£¬Èçͼ£º
Á˽âÁËÕâ¸öÌåϵ½á¹¹Í¼£¬µ±È»»¹ÊDz»¹»µÄ£¬ÕâÀïÃ滹ÓкܶàÊõÓïÄØ£¬²»¹ýÄØÊ×ÏÈ¿´¿´Oracle·þÎñÆ÷¡£
Oracle·þÎñÆ÷Ö÷Òª·ÖΪÒÔÏÂÈýÖÖ£º
1¡¢»ùÓÚÖ÷»ú·½Ê½
2¡¢¿Í»§¶Ë-·þÎñÆ÷£¨client-server£©£¨Á½²ãÄ£ÐÍ£©·½Ê½
3¡¢¿Í»§¶Ë-Ó¦Ó÷þÎñÆ÷£¨client-application server-server£©£¨Èý²ãÄ£ÐÍ£©
½Ó×ÅÊÇÒ»¸öOracleʵÀý
OracleʵÀýÊÇÒ»ÖÖ·ÃÎÊÊý¾Ý¿âµÄ»úÖÆ£¬ËüÓÉÄÚ´æ½á¹¹ºÍһЩºǫ́½ø³Ì×é³É¡£ËüµÄÄÚ´æ½á¹¹Ò²³ÆΪϵͳȫ¾ÖÇø£¨System global area£¬SGA£©¡£ÊµÀýµÄºǫ́ÓÐ5¸ö½ø³ÌÊDZØÐëµÄ£ºSMON¡¢PMON¡¢DBWR¡¢LGWR¡¢CKPT¡£SGAÖÐÓÖ°üº¬ÁËһϼ¸¸öÄÚ´æ½á¹¹£º¹²Ïí³Ø£¨shared pool£©¡¢Êý¾Ý¿â¸ßËÙ»º³åÇø£¨database buffer cache£©¡¢ÖØ×öÈÕÖ¾»º³åÇø£¨redo log buffer£©ºÍÆäËûµÄһЩ½á¹¹£¨ÈçËøºÍͳ¼ÆÊý¾Ý£©¡£
SGAϵͳȫ¾ÖÇø
ʵÀý
½ÓמÍ˵Ã÷OracleÊý¾Ý¿â£¬ËüÒ²³ÉΪÎïÀí£¨Íâ´æ£©½á¹¹£¬ËüΪÊý¾Ý¿âÐÅÏ¢ÌṩÁËÕæÕýµÄÎïÀí´æ´¢£¬ËüÓÉ¿ØÖÆÎļþ£¨control files£©¡¢ÖØ×öÈÕÖ¾Îļþ£¨redo log files£©¡¢Êý¾ÝÎļþ£¨data files£©3Àà²Ù×÷ϵͳÎļþ×é³É¡£
È»ºó£¬ÒªÓÃÊý¾Ý¿â£¬µ±È»»¹ÐèÒªÁ¬½Ó£¬Á¬½ÓÊÇÓû§½ø³ÌÓëOracle·þÎñÆ÷Ö®¼äµÄͨÐÅ·¾¶£¬ÆäÖÐÓÐÈýÖÖ·½Ê½£º
1¡¢»ùÓÚÖ÷»ú·½Ê½
2¡¢¿Í»§¶Ë-·þÎñÆ÷£¨client-server£©£¨Á½²ãÄ£ÐÍ£©·½Ê½
3¡¢¿Í»§¶Ë-Ó¦Ó÷þÎñÆ÷£¨client-application server-server£©£¨Èý²ãÄ£ÐÍ£©
ÕâÈýÖÖÁ¬½ÓÊÇÓû§½ø³ÌÓë·þÎñÆ÷½ø³ÌµÄÒ»¶ÔÒ»Á¬½Ó£¬Ò²³ÆΪרҵÁ¬½Ó£¨dedicated server connection£©£¬³ý´ËÖ®Í⣬ÔÚÁª»úÊÂÎñ´¦Àí£¨online transaction processing£¬OLTP£©ÏµÍ³µÄÅäÖû¹ÓÐÁíÒ»ÖÖÁ¬½Ó£¬Îª¹²Ïí·þÎñÆ÷£¨shared server£©Á¬½Ó¡£
È»ºóÒª¸´Ï°Ï·þÎñÆ÷½ø³Ì
µ±Oracle´´½¨Ò»¸ö·þÎñÆ÷½ø³ÌµÄͬʱҪΪ¸Ã·þÎñÆ÷½ø³Ì·ÖÅäÒ»¸öÄÚ´æÇø£¬¸ÃÄÚ´æÇø³ÉΪ³ÌÐòÈ«¾ÖÇø£¨Program global area£¬PGA£©.ÓëSGA²»Í¬£¬PGAÊÇÒ»¸ö˽ÓеÄÄÚ´æÇø£¬²»Äܹ²Ïí£¬ÇÒÖ»ÊôÓÚÒ»¸ö½ø³Ì¡£ËüËæ׎ø³ÌµÄ·ÖÅä¶ø·ÖÅ䣬Ëæ׎ø³ÌµÄÖ
Ïà¹ØÎĵµ£º
SQLÖеĵ¥¼Ç¼º¯Êý
1.ASCII
·µ»ØÓëÖ¸¶¨µÄ×Ö·û¶ÔÓ¦µÄÊ®½øÖÆÊý;
SQL> select ascii('A') A,ascii('a') a,ascii('0') zero,ascii(' ') space from dual;
A A ZERO ......
ÔÎĵØÖ·£ºhttp://hi.baidu.com/zengjl/blog/item/c06c8edeb2c7e45cccbf1aca.html/cmtid/305a850ea57b09ec37d1226c
1.²éѯ±íÊý¾Ý
SQL> select deptno,ename,sal
2 from emp
3 order by deptno;
DEPTNO ENAME SAL
......
oracle top N
1.ÔÚORACLEÖÐʵÏÖSELECT TOP N
ÓÉÓÚORACLE²»Ö§³ÖSELECT TOPÓï¾ä£¬ËùÒÔÔÚORACLEÖо³£ÊÇÓÃORDER BY¸úROWNUMµÄ×éºÏÀ´ÊµÏÖSELECT TOP NµÄ²éѯ¡£
¼òµ¥µØ˵£¬ÊµÏÖ·½·¨ÈçÏÂËùʾ£º
SELECT¡¡ÁÐÃû£±£®£®£®ÁÐÃû£î¡¡from
......
¹éµµÈÕÖ¾Îļþ£ºÊÇ´¦Óڷǻ£¨INACTIVE£©µÄ״̬µÄÖØ×öÈÕÖ¾ÎļþµÄ±¸·Ý¡£Ëü¶ÔORACLEÊý¾Ý¿âµÄ±¸·ÝºÍ»Ö¸´ÆðÖÁ¹ØÖØÒªµÄ×÷Óá£ÊÇÁª»úÖØ×öÈÕÖ¾ÎļþµÄÒ»¸ö¸±±¾£¬Óë±»¸´ÖƵijÉÔ±Íê³ÉÒ»Ñù£¬¼´ÖØ×ö¼Ç¼Ïàͬ£¬ÈÕÖ¾ÐòÁкÅÏàͬ¡£
Ò»¡¢Êý¾Ý¿âµÄ¹éµµÓë·Ç¹éµµÄ£Ê½£º
1£® µ±Êý¾Ý¿â´¦ÓÚNOACRCHIVELOGģʽʱ£¬²»¶ÔÖØ×öÈÕÖ¾Îļþ½ ......