ÔÚLinuxÃüÁîÐÐϰ²×°Oracle 10g
Oracle 10gÖ§³ÖÔÚÃüÁîÐÐÏÂÓþ²Ä¬Ä£Ê½(Silent)°²×°£¬¸øÄÇЩûÓа²×°Í¼ÐνçÃæµÄLinuxϵͳÌṩÁ˼«´óµÄ±ãÀû¡£
ÏÂÃæÒÔFedora Core 6ΪÀý£¬½éÉÜÔÚÃüÁîÐÐϰ²×°OracleOracle 10gµÄ·½·¨¡£
1 °²×°Ç°µÄ×¼±¸
×¼±¸¹¤×÷ÒªÓõǼΪrootÓû§À´½øÐС£
1.1 Ñ¡Ôñ°²×°»·¾³µÄÓïÑÔ
Oracle°²×°Ê±¿ÉÒÔͨ¹ý»·¾³±äÁ¿LANGÖ¸¶¨°²×°ÓïÑÔ£¬Èç¹ûLinuxÃüÁîÐв»ÄÜÏÔʾÖÐÎÄ£¬¾ÍÒª½«ÓïÑÔ»·¾³ÉèÖÃΪӢÓï¡£
ÀýÈ磺export LANG=en_US.UTF-8
1.2 ÐÞ¸Ägennttab
Oracle 10gÔÚһЩLinuxϵͳϰ²×°¿ÉÄܻᱻÖжϣ¬ÔÚ°²×°ÈÕÖ¾Îļþ
$ORACLE_HOME/install/make.log
Àï¿ÉÒÔ¿´¼ûÒÔÏ´íÎóÐÅÏ¢
/bin/sed: -e expression #1, char 7: unterminated `s' command
Òª½â¾öÕâ¸öÎÊÌâ¾Í±ØÐë±à¼Îļþ gennttab¡£
ÏȽâѹOracle°²×°Ä¿Â¼Ï嵀 stage/Components/oracle.network.rsf/10.2.0.1.0/1/DataFiles/filegroup6.jar£¬¿ÉÒÔÓÃÒÔÏ·½·¨Ö®Ò»½øÐнâѹ
ÓÃjar½âѹ£ºjar -xf filegroup6.jar bin/gennttab
ÓÃunzip½âѹ£ºunzip filegroup6.jar bin/gennttab
ÔÙÓÃÎı¾±à¼Æ÷£¨ÀýÈçvi£©´ò¿ª½âѹ³öÀ´µÄ gennttab£¬½«ÒÔÏÂÄÚÈÝ
LIB=`$ECHO ${TtoLIB} | $SED 's/ /\\
/g' | $GREP "^${T}:" | $AWK -F: '{print $2}'`
INI=`$ECHO ${TtoINI} | $SED 's/ /\\
/g' | $GREP "^${T}:" | $AWK -F: '{print $2}'`
BAS=`$ECHO ${TtoBAS} | $SED 's/ /\\
/g' | $GREP "^${T}:" | $AWK -F: '{print $2}'`
¸ÄΪ
LIB=`$ECHO ${TtoLIB} | $SED 's/ /\n/g' | $GREP "^${T}:" | $AWK -F:
'{print $2}'`
INI=`$ECHO ${TtoINI} | $SED 's/ /\n/g' | $GREP "^${T}:" | $AWK -F:
'{print $2}'`
BAS=`$ECHO ${TtoBAS} | $SED 's/ /\n/g' | $GREP "^${T}:" | $AWK -F:
'{print $2}'`
±£´æºóÔÙÓý«gennttab¸üе½filegroup6.jarÀïÃæ£¬¿ÉÒÔÓÃÒÔÏ·½·¨Ö®Ò»½øÐиüÐÂ
ÓÃjar¸üУºjar -uvf filegroup6.jar bin/gennttab
ÓÃzip¸üУºzip -vu filegroup6.jar bin/gennttab
1.3 ÐÞ¸ÄÄں˲ÎÊý
±à¼Îļþ /etc/sysctl.conf£¬ÐÞ¸ÄÒÔÏÂÏîÄ¿£¬Èç¹ûûÓпÉÒÔ×Ô¼ºÌí¼Ó¡£
kernel.shmall = 2097152 # ¿ÉÒÔʹÓõĹ²ÏíÄÚ´æµÄ×ÜÁ¿¡£
kernel.shmmax = 2147483648 # ×î´ó¹²ÏíÄÚ´æ¶Î´óС¡£
kernel.shmmni = 4096 # Õû¸öϵͳ¹²ÏíÄÚ´æ¶ÎµÄ×î´óÊýÄ¿¡£
kernel.sem = 250 32000 100 128 # ÿ¸öÐźŶÔÏ󼯵Ä×î´óÐźŶÔÏóÊý£»ÏµÍ³·¶Î§ÄÚ×î´óÐźŶÔÏóÊý£»Ã¿¸öÐźŶÔÏóÖ§³ÖµÄ×î´ó²Ù×÷Êý£»ÏµÍ³·¶Î§ÄÚ×î´óÐźŶÔÏó¼¯Êý¡£
fs.file-max =
Ïà¹ØÎĵµ£º
ORACLEÀïËøÓÐÒÔϼ¸ÖÖģʽ:
0£ºnone
1£ºnull ¿Õ
2£ºRow-S Ðй²Ïí(RS)£º¹²Ïí±íËø£¬sub share
3£ºRow-X ÐжÀÕ¼(RX)£ºÓÃÓÚÐеÄÐ޸ģ¬sub exclusive
4£ºShare ¹²ÏíËø(S)£º×èÖ¹ÆäËûDML²Ù×÷£¬share
5£ºS/Row-X ¹²ÏíÐжÀÕ¼(SRX)£º×èÖ¹ÆäËûÊÂÎñ²Ù×÷£¬share/sub exclusive
6£ºexclusive ¶ÀÕ¼(X)£º¶ÀÁ¢·ÃÎÊʹÓã¬exclusive
......
Tablespace
ORACLEÖУ¬±í¿Õ¼äÊÇÊý¾Ý¹ÜÀíµÄ»ù±¾·½·¨£¬ËùÓÐÓû§µÄ¶ÔÏóÒª´æ·ÅÔÚ±í¿Õ¼äÖУ¬Ò²¾ÍÊÇÓû§ÓпռäµÄʹÓÃȨ£¬²ÅÄÜ´´½¨Óû§¶ÔÏó£®·ñÔòÊDz»³äÐí´´½¨¶ÔÏó£¬ÒòΪ¾ÍÊÇÏë´´½¨¶ÔÏó,Èç±í,Ë÷ÒýµÈ£¬Ò²Ã»Óеط½´æ·Å,Oracle»áÌáʾ:ûÓд洢Åä¶î£®
¡¡¡¡Òò´Ë£¬ÔÚ´´½¨¶ÔÏó֮ǰ£¬Ê×ÏÈÒª·ÖÅä´æ´¢¿Õ¼ä£®¡¡¡¡
·ÖÅä´æ ......
1. ²éѯÊý¾Ý¿âÏÖÔڵıí¿Õ¼ä
select tablespace_name, file_name, sum(bytes)/1024/1024 table_size from dba_data_files group by tablespace_name,file_name;
2. ½¨Á¢±í¿Õ¼ä
CREATE TABLESPACE data01 DATAFILE '/oracle/ ......
Oracle Database 10g ÌṩÁËÒ»¸öÏÔÖø¸Ä½øµÄ¹¤¾ß£º×Ô¶¯¹¤×÷¸ºÔØÐÅÏ¢¿â (AWR:Automatic Workload Repository)¡£Oracle ½¨ÒéÓû§ÓÃÕâ¸öÈ¡´ú Statspack¡£AWR ʵÖÊÉÏÊÇÒ»¸ö Oracle µÄÄÚÖù¤¾ß£¬Ëü²É¼¯ÓëÐÔÄÜÏà¹ØµÄͳ¼ÆÊý¾Ý£¬²¢´ÓÄÇЩͳ¼ÆÊý¾ÝÖе¼³öÐÔÄÜÁ¿¶È£¬ÒÔ¸ú×ÙDZÔÚµÄÎÊÌâ¡£Óë Statspack ²»Í¬£¬¿ìÕÕÓÉÒ»¸ö³ÆÎª MMON µÄеĺó ......
HWMÊÇoracleÖÐblockÓÐûÓÐʹÓõķֽçÏߣ¬Ëü»áËæ×ÅÊý¾ÝµÄinsert¶øÉÏÉý£¬µ«Ëü²¢²»»áËæÊý¾ÝµÄdelete¶øÏ½µ£¬Òò´ËÈ«±íɨÃèµÄʱ¼ä²¢²»ÒòÊý¾ÝµÄdelete¶ø¼õÉÙ£¬Ïà·´¿ÉÄÜÓÉÓÚ¿éÇå³ý·´¶øÈ«±íɨÃèʱ¼äÔö¼Ó£¬¿ÉÒÔÓÃÏÂÃæ·½·¨µÄÈÎÒ»Ò»ÖÖÀ´½µµÍHWM£º
µÚÒ»ÖÖ£ºshrink
ÊÊÓÃÓÚ10gÒÔºóµÄ°æ±¾£¬Ç°ÌáÊÇÕâ¸ö±í£¬Ë÷Òý£¬ÎﻯÊÓͼ»òÎﻯÊÓͼlogËùÔ ......