ÔÚubuntu Ï°²×°Oracle 11g
root@hardy:~# cd /bin
root@hardy:/bin# ls -l /bin/sh
lrwxrwxrwx 1 root root 4 2008-04-28 19:59 /bin/sh -> dash
root@hardy:/bin# ln -sf bash /bin/sh
root@hardy:/bin# ls -l /bin/sh
lrwxrwxrwx 1 root root 4 2008-05-01 22:51 /bin/sh -> bash
# echo "Red Hat Linux release 4" > /etc/redhat-release
root@hardy:/bin# cd
root@hardy:~# pwd
/root
root@hardy:~# addgroup oinstall
Adding group `oinstall' (GID 1001) ...
Done.
root@hardy:~# addgroup dba
Adding group `dba' (GID 1002) ...
Done.
root@hardy:~# addgroup nobody
Adding group `nobody' (GID 1003) ...
Done.
root@hardy:~# usermod -g nobody nobody
root@hardy:~# useradd -g oinstall -G dba -p password -d /home/oracle -s /bin/bash oracle
root@hardy:~# passwd -l oracle
Password changed.
root@hardy:~# mkdir /home/oracle
root@hardy:~# chown -R oracle:dba /home/oracle
root@hardy:~# ln -s /usr/bin/awk /bin/awk
root@hardy:~# ln -s /usr/bin/rpm /bin/rpm
root@hardy:~# ln -s /usr/bin/basename /bin/basename
root@hardy:~# mkdir /etc/rc.d
root@hardy:~# for i in 0 1 2 3 4 5 6 S ; do ln -s /etc/rc$i.d /etc/rc.d/rc$i.d ; done
root@hardy:~# mkdir -p /u01/app/oracle
root@hardy:~# chown -R oracle:dba /u01
root@hardy:~#
ÐÞ¸Äetc/sysctl.confÎļþ,ÔÚĩβÔö¼Ó£º
fs.file-max = 65535
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65535
net.core.rmem_default = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144
ÐÞ¸Ä/etc/security/limits.confÎļþ,ÔÚĩβÔö¼Ó£º
oracle soft nproc 2047
oracle hard nproc 16383
oracle soft nofile 1023
oracle hard nofile 65535
ΪÁËÇ¿ÖÆʹÓøղÅÎÒÃÇÔö¼ÓµÄ¶«Î÷£¬ÐÞ¸Ä/etc/pam.d/loginÎļþĩβ£º
session required /lib/security/pam_limits.so
session required pam_limits.so
# sysctl -p
ÏÖÔÚ½«oracle11gµÄ°²×°°ü½âѹµ½/home/oracle/install/Ŀ¼Ï¡£È»ºó½øÈ
Ïà¹ØÎĵµ£º
Ëæ×Åʱ¼äºÍÁ¬½Ó£¬OracleµÄlistener.log»á²»¶ÏÔö³¤,Õâʱ¾ÍÐèÒªÎÒÃǶÔÆä½øÐд¦Àí¡£ÈôÊÔͼֱ½ÓÔÚlistenerÆô¶¯Ê±Ö±½Óɾ³ý£¬¿ÉÄÜ»áÊÕµ½±¨´íÐÅÏ¢ÀàËÆ£ºThe process cannot access the file because it is being used by another process¡£ÈôÖ±½ÓÍ£µô¼àÌýÔÙɾ³ý£¬¶ÔÓÚÉú²ú¿â,Õâ»ù±¾ÊDz»±»ÔÊÐíµÄ²Ù×÷,ÔÚUnixÏÂÃ浱Ȼ¿ÉÒÔrm,µ«Õâ¸öÎÄ ......
¹ý³Ì¡¢º¯Êý¡¢³ÌÐò°ü¡¢´¥·¢Æ÷
1 ¹ý³Ì
£¨1£©¶¨ÒåÓï·¨
create [or replace ] procedure ¹ý³ÌÃû
[(²ÎÊý1 [in | out | in out] ²ÎÊýÀàÐÍ£¬
²ÎÊý2 [in | out | in out] ²ÎÊýÀàÐÍ£¬
……)]
is | as
begin
Ö´Ðв¿·Ö
exception
Òì³£´¦Àí²¿·Ö
end [¹ý³ÌÃû];
¹ý³ÌÖÐûÓÐdeclare²¿·Ö£¬ÉùÃ÷²¿ ......
--ÈçºÎÔÚoracleÖе¼ÈëdmpÊý¾Ý¿âÎļþ£¿
2006/2/16 zhanghua first create
Êý¾Ýµ¼Èëµ¼³öimp/exp¾ÍÏ൱ÓÚora ......
¾¹ýÁ½ÌìµÄµ¹ÌÚÖÕÓÚÔÚmacÉÏ×°ºÃoracle10g ÁË¡£ÕâÏÂÍêÃÀÁË++
½Ì³ÌÍøÉÏÓкܺã¬×Ô¼ºÒ²²»¼ÇµÃ²ÎÕÕ¹ý¶àÉÙƪÁË¡£
Ö»¼ÇÏÂ×Ô¼ºÅöµ½µÄÎÊÌâµã¡£
1,×éÎÊÌâ¡£
ÍêÈ«ÊǸöÈËʹÓã¬ËùÒÔÎÒûÓл¨ÄǸöÏй¤·òȥн¨Ò»´ó¶Ñ×éºÍÓû§£¬
Ïà·´£¬ÎÒ¾ÍÊÇÄõ±Ç°Óû§×°µÄ£¬Ö»²»¹ý£¬°Ñµ±Ç°Óû§Ò²¼ÓÈëÁËROOT×飬Õâ¸ö±È½ÏºÝ¡£
2£¬ÓеĽ ......
ÍêÈ«¸ÉµôOracleËÀËø½ø³Ì
1.²éÄĸö¹ý³Ì±»Ëø:
²éV$DB_OBJECT_CACHEÊÓͼ:SELECT * from V$DB_OBJECT_CACHE WHERE OWNER='¹ý³ÌµÄËùÊôÓû§' AND CLOCKS!='0';
2. ²éÊÇÄÄÒ»¸öSID,ͨ¹ýSID¿ÉÖªµÀÊÇÄĸöSESSION:
²éV$ACCESSÊÓͼ:SELECT * from V$ACCESS WHERE OWNER='¹ý³ÌµÄËùÊôÓû§' AND NAME='¸Õ²Å²éµ½µÄ¹ý³ÌÃû';
3. ²é³öSI ......