oracle 119(11.2.0.4),Oracle 11G R2(11.0.2.4.0)单实例DB打PSU(11.2.0.4.180116)

1.DB源库oracle_home备份

1.1. 创建backup与patch目录.

[oracle@ecdb ~]$ cd /u01/app/

[oracle@ecdb app]$

[oracle@ecdb app]$ mkdir backup

[oracle@ecdb app]$ mkdir patch

[oracle@ecdb app]$ pwd

/u01/app

[oracle@ecdb app]$ ll -athr

total 28K

drwxrwxr-x. 4 oracle oinstall 4.0K Jan 17 17:12 ..

drwxrwxr-x. 3 oracle oinstall 4.0K Jan 17 17:18 install

drwxrwx---. 5 oracle oinstall 4.0K Jan 17 17:24 oraInventory

drwxrwxr-x. 9 oracle oinstall 4.0K Jan 17 17:34 oracle

drwxr-xr-x. 2 oracle oinstall 4.0K Jan 18 10:48 backup

drwxr-xr-x. 2 oracle oinstall 4.0K Jan 18 10:48 patch

drwxrwxr-x. 7 oracle oinstall 4.0K Jan 18 10:48 .

1.2. 下载patch

[oracle@ecdb patch]$ ftp 10.138.25.250

ftp> cd iso/database/Patch

250 CWD command successful.

ftp> pwd

257 "/iso/database/Patch" is current directory.

ftp> ls -l

227 Entering Passive Mode (10,138,25,250,229,104).

125 Data connection already open; Transfer starting.

01-18-2018  10:41AM      

12-28-2017  10:49AM            133259658 p26392168_112040_Linux-x86-64.zip

11-20-2017  10:45AM            775179252 p26635745_112040_Linux-x86-64.zip

01-18-2018  10:46AM            137382058 p26925576_112040_Linux-x86-64.zip

11-20-2017  10:10AM            106060978 p6880880_112000_Linux-x86-64.zip

226-Directory has 25,067,819,008 bytes of disk space available.

226 Transfer complete.

ftp>

ftp>

ftp> mget p26925576_112040_Linux-x86-64.zip p6880880_112000_Linux-x86-64.zip

mget p26925576_112040_Linux-x86-64.zip? y

227 Entering Passive Mode (10,138,25,250,229,107).

125 Data connection already open; Transfer starting.

226 Transfer complete.

137382058 bytes received in 0.686 secs (200351.86 Kbytes/sec)

mget p6880880_112000_Linux-x86-64.zip? y

227 Entering Passive Mode (10,138,25,250,229,108).

125 Data connection already open; Transfer starting.

226 Transfer complete.

106060978 bytes received in 1.88 secs (56410.58 Kbytes/sec)

ftp> quit

1.3. DB家目录备份

[oracle@ecdb ~]$ echo $ORACLE_HOME

/u01/app/oracle/product/11.2.0/db_1

[oracle@ecdb ~]$

[oracle@ecdb ~]$ cd /u01/app/backup/

[oracle@ecdb backup]$ nohup tar -cvf  db_1.tar   /u01/app/oracle/product/11.2.0/db_1  &

2.  OPatch Utility

You must use the OPatch utility version 11.2.0.3.6 or later to apply this patch.

Oracle recommends that you use the latest released OPatch version for 11.2,

which is available for download from My Oracle Support patch 6880880 by selecting the 11.2.0.0.0 release.

2.1. 查询当前DB opatch version

[oracle@ecdb ~]$ cd /u01/app/oracle/product/11.2.0/db_1/OPatch/

[oracle@ecdb OPatch]$ ./opatch version

OPatch Version: 11.2.0.3.4

OPatch succeeded.

当前opatch version版本过低,需要更新opatch utility.

2.2. 更新opatch utility

[oracle@ecdb patch]$ cd $ORACLE_HOME

[oracle@ecdb patch]$ mv OPatch/ OPatch_20180118

[oracle@ecdb patch]$ cd /u01/app/patch/

[oracle@ecdb patch]$ unzip p6880880_112000_Linux-x86-64.zip -d $ORACLE_HOME

[oracle@ecdb ~]$ cd /u01/app/oracle/product/11.2.0/db_1/OPatch

[oracle@ecdb OPatch]$ ./opatch version

OPatch Version: 11.2.0.3.17

OPatch succeeded.

3. Installation

3.1 Environment Checks

Ensure that the $PATH definition has the following executables: make, ar, ld, and nm.

[oracle@ecdb patch]$ which make  ar  ld  nm

/usr/bin/make

/usr/bin/ar

/usr/bin/ld

/usr/bin/nm

3.2 One-off Patch Conflict Detection and Resolution

3.2.1. Determine whether any currently installed one-off patches conflict with the PSU patch as follows:

[oracle@ecdb patch]$ unzip -d p26925576_112040_Linux-x86-64.zip

[oracle@ecdb patch]$ cd 26925576/

[oracle@ecdb 26925576]$ /u01/app/oracle/product/11.2.0/db_1/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./

Oracle Interim Patch Installer version 11.2.0.3.17

Copyright (c) 2018, Oracle Corporation.  All rights reserved.PREREQ session

Oracle Home       : /u01/app/oracle/product/11.2.0/db_1

Central Inventory : /u01/app/oraInventory

from           : /u01/app/oracle/product/11.2.0/db_1/oraInst.loc

OPatch version    : 11.2.0.3.17

OUI version       : 11.2.0.4.0

Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/

opatch2018-01-18_11-23-44AM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.

3.2.3. If this is not a Oracle RAC environment, shut down all instances and listeners associated with the

Oracle home that you are updating.

[oracle@ecdb ~]$ lsnrctl stop

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 18-JAN-2018 11:26:05

Copyright (c) 1991, 2013, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.138.46.32)(PORT=1521)))

The command completed successfully

[oracle@ecdb ~]$

[oracle@ecdb ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Thu Jan 18 11:26:16 2018

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

[oracle@ecdb ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Thu Jan 18 11:26:16 2018

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL>

[oracle@ecdb ~]$ ps -ef |grep ora_

oracle    2134 32429  0 11:27 pts/0    00:00:00 grep ora_

3.2.4. opatch apply

[oracle@ecdb 26925576]$ pwd

/u01/app/patch/26925576

[oracle@ecdb 26925576]$

[oracle@ecdb 26925576]$ /u01/app/oracle/product/11.2.0/db_1/OPatch/opatch apply

Oracle Interim Patch Installer version 11.2.0.3.17

Copyright (c) 2018, Oracle Corporation.  All rights reserved.

Oracle Home       : /u01/app/oracle/product/11.2.0/db_1

Central Inventory : /u01/app/oraInventory

from           : /u01/app/oracle/product/11.2.0/db_1/oraInst.loc

OPatch version    : 11.2.0.3.17

OUI version       : 11.2.0.4.0

Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/

opatch2018-01-18_11-28-49AM_1.log

Verifying environment and performing prerequisite checks...

OPatch continues with these patches:   17478514  18031668  18522509  19121551  19769489

20299013  20760982  21352635  21948347  22502456  23054359  24006111  24732075  25869727

26609445  26392168  26925576

Do you want to proceed? [y|n]

y

User Responded with: Y

All checks passed.

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

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.

(Oracle Home = '/u01/app/oracle/product/11.2.0/db_1')

Is the local system ready for patching? [y|n]

y

User Responded with: Y

Backing up files...

...

Patching component oracle.rdbms.rman, 11.2.0.4.0...

Applying sub-patch '26925576' to OH '/u01/app/oracle/product/11.2.0/db_1'

Patching component oracle.rdbms, 11.2.0.4.0...

Patching component oracle.rdbms.dbscripts, 11.2.0.4.0...

Patching component oracle.rdbms.rman, 11.2.0.4.0...

Patching component oracle.rdbms.rsf, 11.2.0.4.0...

OPatch found the word "error" in the stderr of the make command.

Please look at this stderr. You can re-run this make command.

Stderr output:

chmod: changing permissions of `/u01/app/oracle/product/11.2.0/db_1/bin/extjobO': Operation not permitted

make: [iextjob] Error 1 (ignored)

Composite patch 26925576 successfully applied.

OPatch Session completed with warnings.

Log file location: /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2018-01-18_11-28-49AM_1.log

OPatch completed with warnings.

(此处opatch apply error可忽略.)

3.2.5. Loading Modified SQL Files into the Database

[oracle@ecdb ~]$ lsnrctl start

cd $ORACLE_HOME/rdbms/admin

sqlplus /nolog

SQL> CONNECT / AS SYSDBA

SQL> STARTUP

SQL> @catbundle.sql psu apply

SQL> QUIT

cd $ORACLE_HOME/rdbms/admin

sqlplus /nolog

SQL> CONNECT / AS SYSDBA

SQL> @utlrp.sql

3.2.6. opatch lsinventory

SQL> select * from dba_registry_history;

ACTION_TIME                               ACTION     NAMESPACE   VERSION          ID BUNDLE_SERIES        COMMENTS

----------------------------------------------   ----------        ----------       --------------- ---------- ----------------  -------------------

24-AUG-13 12.03.45.119862 PM     APPLY      SERVER        11.2.0.4           0     PSU            Patchset 11.2.0.2.0

17-JAN-18 05.37.03.698704 PM      APPLY      SERVER        11.2.0.4           0      PSU             Patchset 11.2.0.2.0

18-JAN-18 11.53.14.641718 AM      APPLY      SERVER        11.2.0.4        180116  PSU          PSU 11.2.0.4.180116

3 rows selected.

[oracle@ecdb OPatch]$ ./opatch lsinventory

Oracle Interim Patch Installer version 11.2.0.3.17

Copyright (c) 2018, Oracle Corporation.  All rights reserved.

Oracle Home       : /u01/app/oracle/product/11.2.0/db_1

Central Inventory : /u01/app/oraInventory

from           : /u01/app/oracle/product/11.2.0/db_1/oraInst.loc

OPatch version    : 11.2.0.3.17

OUI version       : 11.2.0.4.0

Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2018-01-18_11-55-58AM_1.log

Lsinventory Output file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/lsinv/

lsinventory2018-01-18_11-55-58AM.txt

--------------------------------------------------------------------------------

Local Machine Information::

Hostname: ecdb.localhost

ARU platform id: 226

ARU platform description:: Linux x86-64

Installed Top-level Products (1):

Oracle Database 11g                                                  11.2.0.4.0

There are 1 products installed in this Oracle Home.

Interim patches (1) :

Patch  26925576     : applied on Thu Jan 18 11:39:05 CST 2018

Unique Patch ID:  21773885

Patch description:  "Database Patch Set Update : 11.2.0.4.180116 (26925576)"

Created on 5 Dec 2017, 05:23:24 hrs PST8PDT

Sub-patch  26392168; "Database Patch Set Update : 11.2.0.4.171017 (26392168)"

Sub-patch  26609445; "Database Patch Set Update : 11.2.0.4.170814 (26609445)"

Sub-patch  25869727; "Database Patch Set Update : 11.2.0.4.170718 (25869727)"

Sub-patch  24732075; "Database Patch Set Update : 11.2.0.4.170418 (24732075)"

...

21429602, 17571039, 17468141, 18436647, 17235750, 21168487, 16220077

--------------------------------------------------------------------------------

OPatch succeeded.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/28569596/viewspace-2150298/,如需转载,请注明出处,否则将追究法律责任。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值