ÔÚRedhat 5 ÉÏ°²×°Oracle 10g
³õѧlinux+oracle£¬²ÉÓõı¾µØÐéÄâ»ú°²×°linuxµÄ·½Ê½£¬°æ±¾ÊÇRed Hat 5£¬Î¨Ò»¸úÐéÄâ»ú°²×°ÆäËûϵͳ²»Í¬µÄÊÇ£º¶¨ÖÆ£¬Ñ¡IDEÓ²ÅÌ£¬·ñÔò°²×°¹ý³ÌÌáʾÕÒ²»µ½Ó²ÅÌʧ°Ü¡£
±¾ÎÄÖصãÊÇOracle°²×°¹ý³Ì£¬°æ±¾ 10.1.0¡£
3¡¢°²×°Ïà¹ØµÄ¿ª·¢°ü£¨rpm°ü£©£º
rpm -q binutils compat-db control-center gcc gcc-c++ glibc libXp libstdc++ \
libstdc++-devel make openmotif \
setarch compat-gcc compat-libstdc++ compat-libstdc++-devel compat-gcc-c++
¹âÅÌÉϵݲװ°ü:
libgomp-4.4.0-6.el5.i386.rpm
gcc-4.1.2-46.el5.i386.rpm
compat-db-4.2.52-5.1.i386.rpm
libstdc++-devel-4.1.2-46.el5.i386.rpm
gcc-c++-4.1.2-46.el5.i386.rpm
libXp-1.0.0-8.1.el5.i386.rpm
libstdc++-4.1.2-46.el5.i386.rpm
libstdc++-4.1.2-46.el5.i386.rpm
openmotif-2.3.1-2.el5.i386.rpm
ÏÂÔصݲװ°ü:
compat-gcc-7.3-2.96.122
compat-libstdc++-7.3-2.96.122
compat-libstdc++-devel-7.3-2.96.122
compat-gcc-c++-7.3-2.96.122
×¢:°²×°Ê§°ÜµÄ»°,ÏÈжÔØÀÏ°æ±¾µÄÏà¹Ø²å¼þ°ü
4¡¢ÐÞ¸ÄϵͳÄںˣº
vi /etc/sysctl.conf
ÔÚÎļþÖÐÌí¼ÓÈçÏÂÄÚÈÝ£º
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
ÆäÖÐkernel.shmallºÍkernel.shmmax ÔÚ¸ÃÎļþÖÐÒÑ´æÔÚ£¬½«ÒÑ´æÔÚµÄ×¢Ê͵ô¼´¿É¡£
sysctl -p #ʹÉèÖÃÉúЧ
5¡¢vi /etc/security/limits.conf
Ìí¼ÓÈçÏÂÄÚÈÝ£º
* soft nproc 2047
* hard nproc 16384
* soft nofile 1024
* hard nofile 65536
6¡¢vi /etc/pam.d/login
Ìí¼ÓÈçÏÂÄÚÈÝ£º
session required /lib/security/pam_limits.so
7¡¢vi /etc/selinux/config
SELINUX=disabled #¹Ø±Õselinux
vi /etc/redhat-release
Red Hat Enterprise Linux Server release 4 (Tikanga)
½«ÔÀ´µÄ°æ±¾ 5.1 ¸Ä³ÉÁËÏÖÔÚµÄ4
8¡¢´´½¨OracleÓû§×éºÍ±ØÐëµÄĿ¼
£¨1£©¡¢´´½¨Óû§×é
/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba
£¨2£©¡¢Ìí¼ÓoracleÓû§
/usr/sbin/useradd -m -g oinstall -G dba oracle
id oracle
passwd oracle
£¨3£©¡¢´´½¨oracleµÄ°²×°Ä¿Â¼
# mkdir -p /u01/app/oracle
# mkdir -p /u02/oradata
# chown -R oracle:oi
Ïà¹ØÎĵµ£º
°´ÕÕOracleDocumentÖеÄÃèÊö£¬v$sysstat´æ´¢×ÔÊý¾Ý¿âʵÀýÔËÐÐÄÇ¿ÌÆð¾Í¿ªÊ¼ÀÛ¼ÆȫʵÀý(instance-wide)µÄ×ÊԴʹÓÃÇé¿ö¡£
ÀàËÆÓÚv$sesstat£¬¸ÃÊÓͼ´æ´¢ÏÂÁеÄͳ¼ÆÐÅÏ¢£º
1>.ʼþ·¢Éú´ÎÊýµÄͳ¼Æ(È磺user commits)
2>.Êý¾Ý²úÉú£¬´æÈ¡»òÕß²Ù×÷µÄtotalÁÐ(È磺redo size)
3>.Èç¹ûTIMED_STATISTICSֵΪtrue,Ôòͳ¼Æ»¨·Ñ ......
ÓÃdateÐÍ×ֶνøÐÐÊý¾Ý¼ìË÷ʱÐèҪעÒ⣺Êý¾Ý¸ñʽ»¯£¡
´ËÊý¾Ý¸ñʽ»¯²»Í¬ÓÚÓÃSimpleDateFormat("yyyy-MM-dd")¶ÔÏó½øÐиñʽ»¯£¬¶øÊÇÓÃOracleµÄÄÚÖú¯Êýto_date()
»ò±êʶ·ûdateÀ´¸ñʽ»¯¡£
ÀýÈ磺
Óиö×Ö¶ÎÊÇdateÊý¾Ý£¬ÎÒÏë²éѯijijÄê¶ÈµÄÊý¾Ý¡£
´íÎóд·¨£ºs ......
ÓÐÁ½ÖÖº¬ÒåµÄ±í´óС¡£Ò»ÖÖÊÇ·ÖÅä¸øÒ»¸ö±íµÄÎïÀí¿Õ¼äÊýÁ¿£¬¶ø²»¹Ü¿Õ¼äÊÇ·ñ±»Ê¹Ó᣿ÉÒÔÕâÑù²éѯ»ñµÃ×Ö½ÚÊý£º
select segment_name, bytes
from user_segments
where segment_type = 'TABLE';
»òÕß
Select Segment_Name,Sum(bytes)/1024/1024 from User_Extents Group By Segment_Name
ÁíÒ»ÖÖ±íÊ ......
Oracle ·ÖÎöº¯ÊýʹÓýéÉÜ
·ÖÎöº¯ÊýÊÇoracle816ÒýÈëµÄÒ»¸öȫеĸÅÄî,ΪÎÒÃÇ·ÖÎöÊý¾ÝÌṩÁËÒ»ÖÖ¼òµ¥¸ßЧµÄ´¦Àí·½Ê½.ÔÚ·ÖÎöº¯Êý³öÏÖÒÔÇ°,ÎÒÃDZØÐëʹÓÃ×ÔÁª²éѯ,×Ó²éѯ»òÕßÄÚÁªÊÓͼ,ÉõÖÁ¸´ÔӵĴ洢¹ý³ÌʵÏÖµÄÓï¾ä,ÏÖÔÚÖ»ÒªÒ»Ìõ¼òµ¥µÄsqlÓï¾ä¾Í¿ÉÒÔʵÏÖÁË,¶øÇÒÔÚÖ´ÐÐЧÂÊ·½ÃæÒ²ÓÐÏ൱´óµÄÌá¸ß.ÏÂÃæÎÒ½«Õë¶Ô·ÖÎöº¯ ......
Stream ÊÇOracle µÄÏûÏ¢¶ÓÁÐ(Ò²½ÐOracle Advanced Queue)¼¼ÊõµÄÒ»ÖÖÀ©Õ¹Ó¦ÓᣠOracle µÄÏûÏ¢¶ÓÁÐÊÇͨ¹ý·¢²¼/¶©Ôĵķ½Ê½À´½â¾öʼþ¹ÜÀí¡£Á÷¸´ÖÆ(Stream replication)Ö»ÊÇ»ùÓÚËüµÄÒ»¸öÊý¾Ý¹²Ïí¼¼Êõ£¬Ò²¿ÉÒÔ±»ÓÃ×÷Ò»¸ö¿ÉÁé»î¶¨ÖƵĸ߿ÉÓÃÐÔ·½°¸¡£ Ëü¿ÉÒÔʵÏÖÁ½¸öÊý¾Ý¿âÖ®¼äÊý¾Ý¿â¼ ......