OracleÄÚ´æ·ÖÅ佨Òé
¹ØÓÚSGAÉèÖõÄÒ»µã×ܽá
±¾×ܽ᲻Õë¶ÔÌØÀý£¬½ö¶Ô·þÎñÆ÷Ö»´æÔÚOS + ORACLE ΪÀý£¬Èç¹û´æÔÚÆäËûÓ¦ÓÃÇë×ÃÇ鿼ÂÇ
дÕâ¸öÒ²ÊÇÒòΪ½üÀ´ÕâÖÖÖظ´ÐÔµÄÎÊÌâ·¢ÉúµÄÌ«¶àËùµ¼ÖµÄ
Ê×ÏȲ»ÒªÃÔÐÅSTS,SG,OCP,EXPERT µÈ¸ø³öµÄÈκν¨Òé¡¢ÄÚ´æ°Ù·Ö±ÈµÄ˵·¨
»ù±¾ÕÆÎÕµÄÔÔòÊÇ£¬ data buffer ͨ³£¿ÉÒÔ¾¡¿ÉÄܵĴó£¬shared_pool_size ÒªÊʶȣ¬log_buffer ͨ³£´óµ½¼¸°ÙKµ½1M¾Í²î²»¶àÁË
ÉèÖÃ֮ǰ£¬Ê×ÏÈÒªÃ÷È·2¸öÎÊÌâ
1£º ³ýÈ¥OSºÍһЩÆäËû¿ªÏú£¬ÄܸøORACLEʹÓõÄÄÚ´æÓжà´ó
2£ºoracleÊÇ64bit or 32 bit,32bit ͨ³£ SGAÓÐ 1.7G µÄÏÞÖÆ(ijЩOSµÄ´¦Àí»òÕßWINDOWSÉÏÓÐÌض¨É趨¿ÉÒÔÖ§³Öµ½2GÒÔÉÏÉõÖÁ´ïµ½3.7G£¬±¾ÈËÎÞÕâ·½Ãæ¾Ñé)
ÏÂÃæÊÇÎÒµÄwindows2000ϵÄoracle :
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production
PL/SQL Release 8.1.7.0.0 - Production
CORE 8.1.7.0.0 Production
TNS for 32-bit Windows: Version 8.1.7.0.0 - Production
NLSRTL Version 3.4.1.0.0 - Production
SQL>
windowsÉÏ´æÔÚ32bitµÄÏÞÖÆ£¬ÈçAIX¡¢HP UNIX µÈÓÐÃ÷È·µÄ64BIT OS and ORACLEµÄ°æ±¾£¬32bit oracle¿ÉÒÔ×°ÔÚ64bit os ÉÏ£¬64 bit oracle²»ÄÜ×°ÔÚ32 bit OSÉÏ
²»¹ÜoracleÊÇ32 bit ORACLE»¹ÊÇ 64 bit µÄ,¼Ù¶¨Ó¦ÓôæÔÚûÓкܺõÄʹÓÃbind var µÄÇé¿ö£¬Ò²²»ÄÜÉèÖà shared_pool_size ¹ý´ó£¬Í¨³£Ó¦¸Ã¿ØÖÆÔÚ200M--300M,Èç¹ûÊÇ ORACLE ERP Ò»ÀàµÄʹÓÃÁ˺ܶà´æ´¢¹ý³Ìº¯Êý¡¢°ü £¬»òÕߺܴóµÄϵͳ£¬¿ÉÒÔ¿¼ÂÇÔö´óshared_pool_size ,µ«ÊÇÈç¹û³¬¹ý500M¿ÉÄÜÊÇΣÏյģ¬´ïµ½1G¿ÉÄÜ»áÔì³ÉCPUµÄÑÏÖظºµ££¬ÏµÍ³ÉõÖÁ̱»¾¡£ËùÒÔshared_pool_size Èç¹û³¬¹ý300M»¹ÃüÖÐÂʲ»¸ß£¬ÄÇôӦ¸Ã´ÓÓ¦ÓÃÉÏÕÒÔÒò¶ø²»ÊÇһζµÄÔö¼ÓÄڴ棬shared_pool_size ¹ý´óÖ÷ÒªÔö¼ÓÁ˹ÜÀí¸ºµ£ºÍlatch µÄ¿ªÏú¡£
log_buffer : 128K ---- 1M Ö®¼äͨ³£ÎÊÌâ²»´ó£¬²»Ó¦¸ÃÌ«´ó
large_pool_size :Èç¹û²»ÉèÖÃMTS£¬Í¨³£ÔÚ RMAN ¡¢OPQ »áʹÓõ½£¬µ«ÊÇÔÚ10M --- 50M Ó¦¸Ã²î²»¶àÁË¡£¼ÙÈçÉèÖà MTS,ÔòÓÉÓÚ UGA ·Åµ½large_pool_size µÄÔµ¹Ê£¬Õâ¸öʱºòÒÀ¾Ý session×î´óÊýÁ¿ºÍ sort_ares_size µÈ²ÎÊýÉèÖ㬱ØÐëÔö´ólarge_pool_size µÄÉèÖ㬿ÉÒÔ¿¼ÂÇΪ session * (sort_area_size + 2M)¡£ÕâÀïÒªÌáÐÑÒ»µã£¬²»ÊDZØÐëʹÓÃMTS£¬ÎÒÃǶ¼²»Ö÷ÕÅʹÓÃMTS£¬ÓÈÆäͬʱÔÚÏßÓû§ÊýСÓÚ500µÄÇé¿öÏ¡£
java_pool_size : Èô²»Ê¹ÓÃjav
Ïà¹ØÎĵµ£º
1. ´´½¨±í¿Õ¼äʾÀýÈçÏÂ
CREATE TABLESPACE "SAMPLE"
LOGGING
DATAFILE 'D:\ORACLE\ORADATA\ORA92\LUNTAN.ora' SIZE 5M
REUSE AUTOEXTEND
ON NEXT 51200K MAXSIZE 3900M
EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO
ÉÏÃæ ......
Ë÷ÒýÌøԾʽɨÃè(index skip scan)ÊÇOracle9iµÄÒ»¸öеÄÖ´ÐÐÌØÐÔ£¬ÓÈÆäÊÊÓÃÓÚʹÓÃÁ¬½ÓË÷ÒýºÍ·ÃÎʶàÖµË÷ÒýµÄOracle²éѯ¡£
Ë÷ÒýÌøԾʽɨÃè(index skip scan)ÊÇOracle9iµÄÒ»¸öеÄÖ´ÐÐÌØÐÔ£¬ÓÈÆäÊÊÓÃÓÚʹÓÃÁ¬½ÓË÷ÒýºÍ·ÃÎʶàÖµË÷ÒýµÄOracle²éѯ¡£ÈÃÎÒÃÇ¿´ÒÔϵķ¶Àý¡£Çë×¢Òâ ......
²éѯ¼°É¾³ýÖظ´¼Ç¼µÄSQLÓï¾ä
1¡¢²éÕÒ±íÖжàÓàµÄÖظ´¼Ç¼£¬Öظ´¼Ç¼ÊǸù¾Ýµ¥¸ö×ֶΣ¨peopleId£©À´ÅжÏ
select * from people
where peopleId in (select peopleId from people group by peopleId having count(peopleId) > 1)
2¡¢É¾³ý±íÖжàÓàµÄÖظ´¼Ç¼£¬Öظ´¼Ç¼ÊÇ ......
¸ù¾Ý±í½á¹¹Éú³ÉJavaÎļþµÄ¹¤¾ß£¬ÔÚÈ¡µÃ±íµÄ×Ö¶ÎʱÈçºÎÈ¡µÃ±íµÄ¸÷ÖÖÐÅÏ¢ºÍ×¢ÊÍ£¬¾¶à·½ËÑÑ°ÕÒµ½ÈçÏÂ×ÊÁϱ¸Ó㺠oracle£º
user_tab_comments;±í×¢ÊÍ
user_col_comments;±í×Ö¶Î×¢ÊÍ
Ò ......
³£ÓõÄÊý¾Ý¿â×Ö¶ÎÀàÐÍÈçÏ£º
×Ö¶ÎÀàÐÍ ÖÐÎÄ˵Ã÷ ÏÞÖÆÌõ¼þ ÆäËü˵Ã÷
CHAR ¹Ì¶¨³¤¶È×Ö·û´® ×î´ó³¤¶È2000 bytes
VARCHAR2 ¿É±ä³¤¶ÈµÄ×Ö·û´® ×î´ó³¤¶È4000 bytes ¿É×öË÷ÒýµÄ×î´ó³¤¶È749
NCHAR ¸ù¾Ý×Ö·û¼¯¶ø¶¨µÄ¹Ì¶¨³¤¶È×Ö·û´® ×î´ó³¤¶È2000 bytes
NVARCHAR2 ¸ù¾Ý×Ö·û¼¯¶ø¶¨µÄ¿É±ä³¤¶È×Ö·û´® ×î´ó³¤¶È4000 bytes
DATE È ......