Oracle 安裝補丁

Michael_DD發表於2015-01-23
Oracle 安裝補丁


1 下載補丁p6880880_112000_Linux-x86-64.zip

2 將補丁上傳至/app/soft/grid 下
[root@exadata ~]#
[root@exadata ~]# cd /app/soft/grid/
[root@exadata grid]# ll
total 989476
drwxr-xr-x 8 grid oinstall      4096 Jan 22 09:20 grid
-rwxr-xr-x 1 grid oinstall 979195792 Jan 16 14:45 p10404530_112030_Linux-x86-64_3of7.zip
-rw-r--r-- 1 root root      33020933 Apr 14  2014 p6880880_112000_Linux-x86-64.zip
[root@exadata grid]#


2.1:opatch 安裝(grid 與oracle 使用者都需要安裝)
root 使用者登入,
[root@exadata grid]# cd /app/grid/grid11g/
[root@exadata grid11g]# ll | grep OPatch
drwxr-xr-x  7 grid oinstall  4096 Jan 22 11:08 OPatch
[root@exadata grid11g]# mv OPatch/ OPatch.bak
[root@exadata grid11g]# cp /app/soft/grid/p6880880_112000_Linux-x86-64.zip ./
[root@exadata grid11g]# unzip p
p6880880_112000_Linux-x86-64.zip  plsql/                            
perl/                             precomp/                          
[root@exadata grid11g]# unzip p6880880_112000_Linux-x86-64.zip

[root@exadata grid11g]# chown -R grid:oinstall OPatch
(如寫入許可權不足,則使用root 執行)

[root@exadata grid11g]# su - grid
[grid@exadata ~]$ . pro_asm

[grid@exadata ~]:+ASM> opatch version
OPatch Version: 11.2.0.3.6

OPatch succeeded.

[grid@exadata ~]:+ASM>

oracle 使用者登入,
[grid@exadata ~]:+ASM> su - oracle
Password:
[oracle@exadata ~]$
[oracle@exadata ~]$ . pro_exadata
[oracle@exadata ~]:exadata> cd $ORACLE_HOME

[oracle@exadata ora11g]:exadata> ll | grep OPatch
drwxr-xr-x  7 oracle oinstall  4096 Jan 22 12:21 OPatch
[oracle@exadata ora11g]:exadata> mv OPatch/ OPatch.bak

[oracle@exadata ora11g]:exadata> cp /app/soft/grid/p6880880_112000_Linux-x86-64.zip ./
[oracle@exadata ora11g]:exadata> unzip p6880880_112000_Linux-x86-64.zip
[oracle@exadata ora11g]:exadata> opatch version
OPatch Version: 11.2.0.3.3
OPatch succeeded.
[oracle@exadata ora11g]:exadata>

2.2:生成OCM response file
Grid 使用者登入
[oracle@exadata ora11g]:exadata> su - grid
Password:
[grid@exadata ~]$
[grid@exadata ~]$ . pro_asm
[grid@exadata ~]:+ASM> export JAVA_HOME=$ORACLE_HOME/jdk


[grid@exadata ~]:+ASM> $ORACLE_HOME/OPatch/ocm/bin/emocmrsp -no_banner -output /app/grid/ocm.rsp
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit for details.
Email address/User Name: dong.du@123456.com
Provide your My Oracle Support password to receive security updates via your My Oracle Support account.
Password (optional):          
Unable to establish a network connection to Oracle. Specify the URL for an
Oracle Support Hub in this format:
    http[s]://:
If you do not wish to configure OCM through an Oracle Support Hub, enter NONE
Oracle Support Hub URL: NONE

Unable to establish a network connection to Oracle. If your systems require a
proxy server for outbound Internet connections, enter the proxy server details
in this format:
    [@][:]
If you want to remain uninformed of critical security issues in your
configuration, enter NONE
Proxy specification: NONE

The OCM configuration response file (/app/grid/ocm.rsp) was successfully created.


[grid@sztestdb1 oracle]:+ASM> $ORACLE_HOME/OPatch/ocm/bin/emocmrsp -no_banner
-output /app/grid/ocm.rsp
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit for details.
Email address/User Name:
You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]: y
The OCM configuration response file (/app/grid/ocm.rsp) was successfully created.
[grid@sztestdb1 oracle]:+ASM >





[grid@exadata ~]:+ASM> $ORACLE_HOME/OPatch/ocm/bin/emocmrsp -no_banner
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit for details.
Email address/User Name: NONE
Invalid email address.

Email address/User Name: dong.du@123456.com
Provide your My Oracle Support password to receive security updates via your My Oracle Support account.
Password (optional):           
Unable to establish connection to Oracle Configuration Manager server.
Hostname () is unknown.

Unable to establish a network connection to Oracle. Specify the URL for an
Oracle Support Hub in this format:
    http[s]://:
If you do not wish to configure OCM through an Oracle Support Hub, enter NONE
Oracle Support Hub URL: NONE

Unable to establish a network connection to Oracle. If your systems require a
proxy server for outbound Internet connections, enter the proxy server details
in this format:
    [@][:]
If you want to remain uninformed of critical security issues in your
configuration, enter NONE
Proxy specification: NONE

The OCM configuration response file (ocm.rsp) was successfully created.
[grid@exadata ~]:+ASM>






2.3: 安裝PSU 補丁

Root 使用者執行:
su – root
cd /app/soft/grid
mkdir patch
mv p14727347_112030_Linux-x86-64.zip patch
cd patch
unzip p14727347_112030_Linux-x86-64.zip
chmod -R 755 /app/soft/grid/patch
export PATH=$PATH:/app/grid/grid11g/OPatch
執行安裝:
cd /app/soft/grid/patch
opatch auto /app/soft/grid/patch -ocmrf /app/grid/ocm.rsp
如果執行報錯:檢視日誌。
較多的錯誤是因為/app/grid/grid11g/lib/libclntsh.so.11.1 導致的,解決方法如下:
停止:crs
crsctl stop res -all
執行:/sbin/fuser /app/grid/grid11g/lib/libclntsh.so.11.1
停止CRS 之後,正常情況下只查到一個程式,如下方示例當中,如果有其它程式,則KILL 掉,
之後啟動CRS,重新執行補丁程式。
[root@exadata lib]# /sbin/fuser /app/grid/grid11g/lib/libclntsh.so.11.1
/app/grid/grid11g/lib/libclntsh.so.11.1: 25080m
[root@exadata lib]# ps -ef|grep 25080
grid 25080 1 0 23:32 ? 00:00:00 /app/grid/grid11g/bin/ohasd.bin reboot
grid 26588 6639 0 23:36 pts/6 00:00:00 grep 25080
crsctl stop res -all
opatch auto /app/soft/grid/patch -ocmrf /app/grid/ocm.rsp



oracle 使用者下執行
1. cd $ORACLE_HOME/rdbms/admin
2. sqlplus “/as sysdba”
3. SQL> STARTUP
4. SQL> @catbundle.sql psu apply
5. SQL> QUIT

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29500582/viewspace-1412083/,如需轉載,請註明出處,否則將追究法律責任。

相關文章