Oracle »µ¿é ×ܽá
OracleÊý¾Ý¿â³öÏÖ»µ¿éÏÖÏóÊÇÖ¸£ºÔÚOracleÊý¾Ý¿âµÄÒ»¸ö»ò¶à¸öÊý¾Ý¿é£¨Ò»¸öÊý¾Ý¿éµÄÈÝÁ¿ÔÚ´´½¨Êý¾Ý¿âʱÓÉdb_block_size²ÎÊýÖ¸¶¨£¬È±Ê¡Îª8K£©ÄÚ³öÏÖÄÚÈÝ»ìÂÒµÄÏÖÏó¡£ÓÉÓÚÕý³£µÄÊý¾Ý¿é¶¼Óй̶¨µÄºÏ·¨ÄÚÈݸñʽ£¬»µ¿éµÄ³öÏÖ£¬µ¼ÖÂÊý¾Ý¿â½ø³ÌÎÞ·¨Õý³£½âÎöÊý¾Ý¿éµÄÄÚÈÝ£¬½ø¶øʹÊý¾Ý¿â½ø³Ì±¨´íÄËÖÁ¹ÒÆ𣬲¢¼¶Áªµ¼ÖÂÕû¸öÊý¾Ý¿âʵÀý³öÏÖÒì³£¡£
Ò»£®»µ¿éµÄ²úÉúÔÒò
»µ¿é²úÉúµÄÔÒò´óÖÂÓÐÒÔϼ¸ÖÖ£º
1.1 Ó²¼þÎÊÌâ
Oracle½ø³ÌÔÚ´¦ÀíÒ»¸öÊý¾Ý¿éʱ£¬Ê×ÏȽ«Æä¶ÁÈëÎïÀíÄÚ´æ¿Õ¼ä£¬ÔÚ´¦ÀíÍê³Éºó£¬ÔÙÓÉÌض¨½ø³Ì½«Æäд»Ø´ÅÅÌ£»Èç¹ûÔÚÕâ¸ö¹ý³ÌÖУ¬³öÏÖÄÚ´æ¹ÊÕÏ£¬CPU¼ÆËãʧÎ󣬶¼»áµ¼ÖÂÄÚ´æÊý¾Ý¿éµÄÄÚÈÝ»ìÂÒ£¬×îºó·´Ó³µ½Ð´»Ø´ÅÅ̵ÄÊý¾Ý¿éÄÚÈÝÓÐÎó¡£Í¬Ñù£¬Èç¹û´æ´¢×Óϵͳ³öÏÖÒì³££¬Êý¾Ý¿éËð»µÒ²¾ÍËæÖ®³öÏÖÁË¡£
1.2 ²Ù×÷ϵͳBUG
ÓÉÓÚOracle½ø³Ì¶ÔÊý¾Ý¿éµÄ¶Áд£¬¶¼ÊÇÒÔ²Ù×÷ϵͳÄں˵÷Óã¨system call£©µÄ·½Ê½Íê³ÉµÄ£¬Èç¹û²Ù×÷ϵͳÔÚÄں˵÷ÓôæÔÚÎÊÌ⣬±ØÈ»µ¼ÖÂOracle½ø³ÌдÈë·Ç·¨µÄÄÚÈÝ¡£
1.3 ²Ù×÷ϵͳµÄI/O´íÎó»ò»º³åÎÊÌâ
1.4 ÄÚ´æ»òpagingÎÊÌâ
OracleÈí¼þBUG
OracleÈí¼þÌض¨°æ±¾ÉÏ£¬¿ÉÄܳöÏÖµ¼ÖÂÊý¾Ý¿éµÄÄÚÈݳöÏÖÒì³£BUG¡£
1.5 ·ÇOracle½ø³ÌÈÅÂÒOracle¹²ÏíÄÚ´æÇøÓò
ÈçÉÏÎÄËùÊö£¬ÔÚµ±Êý¾Ý¿éµÄÄÚÈݱ»¶ÁÈëÖ÷»úµÄÎïÀíÄÚ´æʱ£¬Èç¹ûÆäËû·ÇOracle½ø³Ì£¬¶ÔOracleʹÓõĹ²ÏíÄÚ´æÇøÓòÐγÉÁËÈÅÂÒ£¬×îÖÕµ¼ÖÂд»Ø´ÅÅ̵ÄÊý¾Ý¿éÄÚÈÝ»ìÂÒ¡£
1.6 Òì³£¹Ø»ú£¬µôµç£¬ÖÕÖ¹·þÎñ
Òì³£¹Ø»ú£¬µôµç£¬ÖÕÖ¹·þÎñʹ½ø³ÌÒì³£ÖÕÖ¹£¬¶øÆÆ»µÊý¾Ý¿éµÄÍêÕûÐÔ£¬µ¼Ö»µ¿é²úÉú¡£
×¢£ºÕâÒ²ÊÇΪʲôͻȻ¶Ïµç»áµ¼ÖÂÊý¾Ý¿âÎÞ·¨Æô¶¯
ÓÉÉϿɼû£¬»µ¿éµÄÐγÉÔÒò¸´ÔÓ¡£µ±³öÏÖ»µ¿éʱ£¬ÎªÁËÕÒµ½È·ÇеÄÔÒò£¬ÐèÒª´óÁ¿µÄ·ÖÎöʱ¼äºÍÅŲé²Ù×÷£¬ÉõÖÁÐèÒª¶à´ÎÖØÏÖ²ÅÄÜÕÒ³ö¸ù±¾ÔÒò¡£µ«µ±¹ÊÕÏ·¢ÉúÔÚÉú²úϵͳÉÏ£¬ÎÒÃÇΪÁ˼õÉÙÍ£»úʱ¼ä£¬»á¾¡¿ìʵʩӦ¼±È¨±ä´ëÊ©ÒÔ±£Ö¤ÏµÍ³µÄ¿ÉÓÃÐÔ£¬ÕâÑù¾ÍÆÆ»µÁ˹ÊÕÏÏÖ³¡£¬¶Ô¸ù±¾ÔÒòµÄ·ÖÎöÒò¶øÒ²¸ü¼ÓÀ§ÄÑÁË¡£
¶þ£®»µ¿éµÄÔ¤·À
»µ¿éÎÊÌâÆÆ»µÐԴ󣬵«²¢·Ç²»¿ÉÔ¤·À¡£
2.1 ÔÚMetalink.oracle.comÍøÕ¾£¬Oracle¶¨ÆÚ·¢²¼»ùÓÚÌض¨Èí¼þ°æ±¾µÄ“ÒÑÖªÎÊÌâ(known issues)˵Ã÷”¡£¶ÔÓÚ¿ÉÄܵ¼Ö»µ¿éµÄOracleÈí¼þBUG£¬ÔÚOracle¹«Ë¾ÄÚ²¿£¬ÊÇ×÷Ϊ¸ßÑÏÖؼ¶±ðµÄÎÊÌâ½øÐд¦Àí£¬ÔÚ“ÒÑÖªÎÊÌâ(known issues)˵Ã÷”ÖУ¬ÕâЩBUGÒÔÑÏÖØ£¨Noticable£©ÎÊÌâ±ê³ö(±ê¼ÇΪ*»ò+)£¬²¿·ÖÎÊÌ⣬Ora
Ïà¹ØÎĵµ£º
Ó¦¸¶Ä£¿éµÄ¶àÊýÒµÎñ»ùÓڲɹººÍ¿â´æµÄ²Ù×÷£¬Òò´ËÓ¦¸¶Ä£¿éµÄÔ½áÓ¦¸ÃÔڲɹºÄ£¿éºÍ¿â´æÄ£¿éÔ½áºó²ÅÄܹرջá¼ÆÆÚ¡£
Ô½ᲽÖè
ÔÚÿ¸ö»á¼ÆÆÚÄ©£¬Ó¦¸¶Ä£¿éµÄÔ½áÓ¦×ñÑÒÔÏÂÁ÷³Ì£º
1.¼ì²éÒµÎñÊÇ·ñÈ«²¿Â¼Èë;
2.¼ì²éÊÇ·ñÓÐδÑéÖ¤¡¢Ôݹҷ¢Æ±;
3.¸üе½ÆÚµÄÔ¶ÆÚ¸¶¿î״̬;
4.¼ì²éÓ¦¸¶ÒµÎñÊÇ·ñÉú³É·Ö¼;
5.Ó¦¸¶ÒµÎñ´«Ë͵½×ÜÕÊ;
6 ......
ÎÒÃÇÔÚ´´½¨±í½á¹¹µÄ¹ý³ÌÖУ¬¿ÉÄÜ»áÓÉÓÚʧÎó£¬Ôì³É±íÖÐÁÐÃû´íÎó£¬ÈçºÎ¸ü¸ÄÄØ£¬Äã¿ÉÄÜ»á»Ø´ð£¬Ê¹ÓÃOEM»òÕßPL/SQL£¬³ýÁËÕâÁ½ÖÖ·½·¨£¬ÎÒÃÇ¿ÉÒÔʹÓÃÃüÁ
ALTER TABLE ±íÃû rename column ÁÐÃû to ÐÂÁÐÃû ×¢ÒâcolumnÊǹؼü×Ö /*ÖØÃüÃûÁÐÃû*/
ALTE ......
OracleÓû§½âËø
¡¡¡¡Ã¿µ±ÎÒÃÇа²×°ÁËoracleºó,µÚÒ»´ÎÔËÐж¼»á³öÏÖÒ»¸öÓû§±»ËøµÄ´íÎóÌáʾ,´ËʱÐèÒªÎÒÃÇÊÖ¶¯½øÐÐÓû§½âËø,ÏÂÃæÒÔ½âËøscottÓû§ÎªÀý: Ê×ÏÈÔÚÃüÁîÐд°¿ÚÖÐÊäÈë sqlplus sys/sys as sysdba ÕâÀïµÄsysÊÇϵͳÕ˺Å,oracle×Ô´øµÄ,ºóÃæµÄsysÊÇÃÜÂë,Õâ¸öÃÜÂëÔÚÄ㰲װʱÉèÖúõÄ. as sysdba Òâ˼¾ÍÊÇÒÔÕâ¸öÓû§×öΪÊý ......
1.»ù±¾½á¹¹
CREATE OR REPLACE PROCEDURE ´æ´¢¹ý³ÌÃû×Ö
(
²ÎÊý1 IN NUMBER,
²ÎÊý2 IN NUMBER
) IS
±äÁ¿1 INTEGER :=0;
±äÁ¿2 DATE;
BEGIN
END ´æ´¢¹ý³ÌÃû×Ö
2.SELECT INTO STATEMENT
½«select²éѯµÄ½á¹û´æÈëµ½±äÁ¿ÖУ¬¿ÉÒÔͬʱ½«¶à¸öÁд洢¶à¸ö±äÁ¿ÖУ¬±ØÐëÓÐÒ»Ì ......
Êý¾ÝÀàÐÍ
²ÎÊý
ÃèÊö
char(n)
n=1 to 2000×Ö½Ú
¶¨³¤×Ö·û´®£¬n×Ö½Ú³¤£¬Èç¹û²»Ö¸¶¨³¤¶È£¬È±Ê¡Îª1¸ö×Ö½Ú³¤£¨Ò»¸öºº×ÖΪ2×Ö½Ú£©
varchar2(n)
n=1 to 4000×Ö½Ú
¿É±ä³¤µÄ×Ö·û´®£¬¾ßÌ嶨ÒåʱָÃ÷×î´ó³¤¶Èn£¬
ÕâÖÖÊý¾ÝÀàÐÍ¿ÉÒÔ·ÅÊý×Ö¡¢×ÖĸÒÔ¼°ASCIIÂë×Ö·û¼¯(»òÕßEBCDICµÈÊý¾Ý¿âϵͳ½ÓÊܵÄ×Ö·û¼¯±ê×¼)ÖеÄËùÓзûºÅ¡£
Èç¹ ......