探索Oracle之資料庫升級四 11.2.0.4.0 PSU 11.2.0.4.3

dbhelper發表於2015-01-17


探索Oracle之資料庫升級四
11.2.0.4.0 PSU 11.2.0.4.3

一、  檢查當前資料庫PSU:


  1. [oracle@db01 ~]$ cd /DBSoft/Product/11.2.4/db_1/OPatch/
  2. [oracle@db01 OPatch]$ ls
  3. crs docs emdpatch.pl jlib ocm opatch opatch.bat opatchdiag opatchdiag.bat opatch.ini opatch.pl opatchprereqs oplan
  4. [oracle@db01 OPatch]$ ./opatch version
  5. OPatch Version: 11.2.0.3.4
  6. OPatch succeeded.
  7. [oracle@db01 OPatch]$
  8. [oracle@db01 OPatch]$ ./opatch lsinventory
  9. Oracle Interim Patch Installer version 11.2.0.3.4
  10. Copyright (c) 2012, Oracle Corporation. All rights reserved.
  11. Oracle Home : /DBSoft/Product/11.2.4/db_1
  12. Central Inventory : /DBSoft/oraInventory
  13.    from : /DBSoft/Product/11.2.4/db_1/oraInst.loc
  14. OPatch version : 11.2.0.3.4
  15. OUI version : 11.2.0.4.0
  16. Log file location : /DBSoft/Product/11.2.4/db_1/cfgtoollogs/opatch/opatch2014-10-04_05-20-14AM_1.log
  17. Lsinventory Output file location : /DBSoft/Product/11.2.4/db_1/cfgtoollogs/opatch/lsinv/lsinventory2014-10-04_05-20-14AM.txt
  18. --------------------------------------------------------------------------------
  19. Installed Top-level Products (1):
  20. Oracle Database 11g 11.2.0.4.0
  21. There are 1 products installed in this Oracle Home.
  22. There are no Interim patches installed in this Oracle Home.
  23. --------------------------------------------------------------------------------
  24. OPatch succeeded.
  25. [oracle@db01 OPatch]$

二、  關閉資料庫:



  1. SQL> shutdown immediate
  2. Database closed.
  3. Database dismounted.
  4. ORACLE instance shut down.
  5. SQL> host lsnrctl stop
  6. LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 04-OCT-2014 05:47:04
  7. Copyright (c) 1991, 2013, Oracle. All rights reserved.
  8. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
  9. The command completed successfully
  10. SQL>

三、  上傳新下載的PSU 11.2.0.4.3補丁包並解壓



  1. ##PSU 11.2.0.4.3 補丁下載參考:18522509.8
  2. [oracle@db01 ~]$ ll p18522509_112040_Linux-x86-64.zip
  3. -rw-r--r-- 1 oracle oinstall 25449098 Oct 4 05:22 p18522509_112040_Linux-x86-64.zip
  4. [oracle@db01 ~]$ unzip p18522509_112040_Linux-x86-64.zip
  5. ##解壓完之後將會多出18522509目錄
  6. [oracle@db01 ~]$ ll
  7. total 107544
  8. drwxrwxr-x 5 oracle oinstall 4096 Jun 30 23:15 18522509
  9. drwxr-xr-x 2 oracle oinstall 4096 Oct 3 23:44 Desktop
  10. -rw-r--r-- 1 oracle oinstall 25449098 Oct 4 05:22 p18522509_112040_Linux-x86-64.zip

四、進入18522509目錄進行PSU升級



  1. [oracle@db01 ~]$ ls
  2. 18522509 Desktop p18522509_112040_Linux-x86-64.zip PatchSearch.xml upgrade.log
  3. [oracle@db01 ~]$ cd 18522509/
  4. [oracle@db01 18522509]$ ls
  5. 17478514 18031668 18522509 patchmd.xml README.html README.txt
  6. [oracle@db01 18522509]$ /DBSoft/Product/11.2.4/db_1/OPatch/opatch apply
  7. Oracle Interim Patch Installer version 11.2.0.3.4
  8. Copyright (c) 2012, Oracle Corporation. All rights reserved.
  9. Oracle Home : /DBSoft/Product/11.2.4/db_1
  10. Central Inventory : /DBSoft/oraInventory
  11.    from : /DBSoft/Product/11.2.4/db_1/oraInst.loc
  12. OPatch version : 11.2.0.3.4
  13. OUI version : 11.2.0.4.0
  14. Log file location : /DBSoft/Product/11.2.4/db_1/cfgtoollogs/opatch/opatch2014-10-04_05-25-14AM_1.log
  15. Verifying environment and performing prerequisite checks...
  16. Prerequisite check \

五、OPatch應用報錯,檢查日誌:



  1. [oracle@db01 admin]$ cat /DBSoft/Product/11.2.4/db_1/cfgtoollogs/opatch/opatch2014-10-04_05-25-14AM_1.log |grep failed

    [Oct 4, 2014 5:25:18 AM]     Prerequisite check "CheckMinimumOPatchVersion" failed.

    [Oct 4, 2014 5:25:18 AM]     OUI-67073:UtilSession failed: Prerequisite check "CheckMinimumOPatchVersion" failed.

    [Oct 4, 2014 5:25:18 AM]     Stack Description: java.lang.RuntimeException: Prerequisite check "CheckMinimumOPatchVersion" failed.

    [oracle@db01 admin]$

    ##檢查後,發現是Opatch版本的問題,先更新opatch ,下並解壓縮。

    [oracle@db01 ~]$ ll p6880880_112000_Linux-x86-64.zip

    -rw-r--r-- 1 oracle oinstall 33020933 Oct  4 05:29 p6880880_112000_Linux-x86-64.zip

    [oracle@db01 ~]$ unzip p6880880_112000_Linux-x86-64.zip

     

    ##檢視最新Opatch版本號:

    [oracle@db01 OPatch]$ ./opatch version

    OPatch Version: 11.2.0.3.6

    OPatch succeeded.

    [oracle@db01 OPatch]$

    ##再執行一次安裝前的檢查:

    [oracle@db01 18522509]$ /home/oracle/OPatch/opatch  prereq CheckConflictAgainstOHWithDetail -ph ./

    Oracle Interim Patch Installer version 11.2.0.3.6

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

    PREREQ session

    Oracle Home       : /DBSoft/Product/11.2.4/db_1

    Central Inventory : /DBSoft/oraInventory

       from           : /DBSoft/Product/11.2.4/db_1/oraInst.loc

    OPatch version    : 11.2.0.3.6

    OUI version       : 11.2.0.4.0

    Log file location : /DBSoft/Product/11.2.4/db_1/cfgtoollogs/opatch/opatch2014-10-04_05-43-23AM_1.log

    Invoking prereq "checkconflictagainstohwithdetail"

    Prereq "checkConflictAgainstOHWithDetail" passed.

    OPatch succeeded.



六、透過新版本Opatch安裝PSU


  1. [oracle@db01 ~]$ cd 18522509/

    [oracle@db01 18522509]$ ls

    17478514  18031668  18522509  patchmd.xml  README.html  README.txt

    [oracle@db01 18522509]$ /home/oracle/OPatch/opatch apply

    Oracle Interim Patch Installer version 11.2.0.3.6

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

    Oracle Home       : /DBSoft/Product/11.2.4/db_1

    Central Inventory : /DBSoft/oraInventory

       from           : /DBSoft/Product/11.2.4/db_1/oraInst.loc

    OPatch version    : 11.2.0.3.6

    OUI version       : 11.2.0.4.0

    Log file location : /DBSoft/Product/11.2.4/db_1/cfgtoollogs/opatch/opatch2014-10-04_05-36-04AM_1.log

    Verifying environment and performing prerequisite checks...

    OPatch continues with these patches:   17478514  18031668  18522509 

    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 = '/DBSoft/Product/11.2.4/db_1')

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

    y

    User Responded with: Y

    Backing up files...

    Applying sub-patch '17478514' to OH '/DBSoft/Product/11.2.4/db_1'

    Patching component oracle.rdbms, 11.2.0.4.0...

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

    Patching component oracle.sdo, 11.2.0.4.0...

    Patching component oracle.sysman.agent, 10.2.0.4.5...

    Patching component oracle.xdk, 11.2.0.4.0...

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

    Patching component oracle.sdo.locator, 11.2.0.4.0...

    Patching component oracle.nlsrtl.rsf, 11.2.0.4.0...

    Patching component oracle.xdk.rsf, 11.2.0.4.0...

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

    Verifying the update...

    Applying sub-patch '18031668' to OH '/DBSoft/Product/11.2.4/db_1'

    Patching component oracle.rdbms, 11.2.0.4.0...

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

    Patching component oracle.ldap.rsf, 11.2.0.4.0...

    Patching component oracle.rdbms.crs, 11.2.0.4.0...

    Patching component oracle.precomp.common, 11.2.0.4.0...

    Patching component oracle.ldap.rsf.ic, 11.2.0.4.0...

    Patching component oracle.rdbms.deconfig, 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...

    Verifying the update...

    Applying sub-patch '18522509' to OH '/DBSoft/Product/11.2.4/db_1'

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

    Patching component oracle.rdbms, 11.2.0.4.0...

    Patching component oracle.precomp.common, 11.2.0.4.0...

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

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

    Patching component oracle.rdbms.deconfig, 11.2.0.4.0...

    Verifying the update...

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

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

    Stderr output:

    ins_emagent.mk:113: warning: overriding commands for target `nmosudo'

    ins_emagent.mk:52: warning: ignoring old commands for target `nmosudo'

    /DBSoft/Product/11.2.4/db_1/sysman/lib/ins_emagent.mk:113: warning: overriding commands for target `nmosudo'

    /DBSoft/Product/11.2.4/db_1/sysman/lib/ins_emagent.mk:52: warning: ignoring old commands for target `nmosudo'

    Composite patch 18522509 successfully applied.

    OPatch Session completed with warnings.

    Log file location: /DBSoft/Product/11.2.4/db_1/cfgtoollogs/opatch/opatch2014-10-04_05-36-04AM_1.log

    OPatch completed with warnings.


七、檢查Opatch是否已經完成:


  1. [oracle@db01 18522509]$ /home/oracle/OPatch/opatch lsinventory

    Oracle Interim Patch Installer version 11.2.0.3.6

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

    Oracle Home       : /DBSoft/Product/11.2.4/db_1

    Central Inventory : /DBSoft/oraInventory

       from           : /DBSoft/Product/11.2.4/db_1/oraInst.loc

    OPatch version    : 11.2.0.3.6

    OUI version       : 11.2.0.4.0

    Log file location : /DBSoft/Product/11.2.4/db_1/cfgtoollogs/opatch/opatch2014-10-04_05-40-12AM_1.log

    Lsinventory Output file location : /DBSoft/Product/11.2.4/db_1/cfgtoollogs/opatch/lsinv/lsinventory2014-10-04_05-40-12AM.txt

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

    Installed Top-level Products (1):

    Oracle Database 11g                                                  11.2.0.4.0

    There are 1 product(s) installed in this Oracle Home.

    Interim patches (1) :

    Patch  18522509     : applied on Sat Oct 04 05:37:21 CST 2014

    Unique Patch ID:  17604597

    Patch description:  "Database Patch Set Update : 11.2.0.4.3 (18522509)"

       Created on 30 Jun 2014, 08:14:42 hrs PST8PDT

    Sub-patch  18031668; "Database Patch Set Update : 11.2.0.4.2 (18031668)"

    Sub-patch  17478514; "Database Patch Set Update : 11.2.0.4.1 (17478514)"

       Bugs fixed:

         17752995, 17288409, 16392068, 17205719, 17811429, 17767676, 17614227

         17040764, 17381384, 17754782, 17726838, 13364795, 17311728, 17389192

         17006570, 17612828, 17284817, 17441661, 13853126, 17721717, 13645875

         18203837, 17390431, 16542886, 16992075, 16043574, 17446237, 16863422

         14565184, 17071721, 17610798, 17468141, 17786518, 17375354, 17397545

         18203838, 16956380, 17478145, 16360112, 17235750, 17394950, 13866822

         17478514, 17027426, 12905058, 14338435, 16268425, 13944971, 18247991

         14458214, 16929165, 17265217, 13498382, 17786278, 17227277, 17546973

         14054676, 17088068, 16314254, 17016369, 14602788, 17443671, 16228604

         16837842, 17332800, 17393683, 13951456, 16315398, 18744139, 17186905

         16850630, 17437634, 19049453, 17883081, 15861775, 17296856, 18277454

         16399083, 16855292, 18018515, 10136473, 16472716, 17050888, 17865671

         17325413, 14010183, 18554871, 17080436, 16613964, 17761775, 16721594

         17588480, 17551709, 17344412, 18681862, 15979965, 13609098, 18139690

         17501491, 17239687, 17752121, 17602269, 18203835, 17297939, 17313525

         16731148, 17811456, 14133975, 17600719, 17385178, 17571306, 16450169

         17655634, 18094246, 17892268, 17165204, 17011832, 17648596, 16785708

         17477958, 16180763, 16220077, 17465741, 17174582, 18522509, 16069901

         16285691, 17323222, 18180390, 17393915, 16875449, 18096714, 17238511

         17596908, 17811438, 17811447, 18031668, 16912439, 18061914, 17622427

         17545847, 16943711, 17082359, 17346671, 18996843, 14852021, 17783588

         16618694, 17672719, 17614134, 17341326, 17546761, 17716305

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

    OPatch succeeded.

    [oracle@db01 18522509]$ /home/oracle/OPatch/opatch lspatches

    18522509;Database Patch Set Update : 11.2.0.4.3 (18522509)


8、更新dba_registry_history檢視最新PSU資訊


  1. SQL> startup
  2. ORACLE instance started.
  3. Total System Global Area 2872786944 bytes
  4. Fixed Size 2256712 bytes
  5. Variable Size 2634023096 bytes
  6. Database Buffers 218103808 bytes
  7. Redo Buffers 18403328 bytes
  8. Database mounted.
  9. Database opened.
  10. SQL> !lsnrctl start
  11. LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 04-OCT-2014 06:34:29
  12. Copyright (c) 1991, 2013, Oracle. All rights reserved.
  13. Starting /DBSoft/Product/11.2.4/db_1/bin/tnslsnr: please wait...
  14. TNSLSNR for Linux: Version 11.2.0.4.0 - Production
  15. System parameter file is /DBSoft/Product/11.2.4/db_1/network/admin/listener.ora
  16. Log messages written to /DBSoft/diag/tnslsnr/db01/listener/alert/log.xml
  17. Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  18. Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=db01)(PORT=1521)))
  19. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
  20. STATUS of the LISTENER
  21. ------------------------
  22. Alias LISTENER
  23. Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
  24. Start Date 04-OCT-2014 06:34:29
  25. Uptime 0 days 0 hr. 0 min. 0 sec
  26. Trace Level off
  27. Security ON: Local OS Authentication
  28. SNMP OFF
  29. Listener Parameter File /DBSoft/Product/11.2.4/db_1/network/admin/listener.ora
  30. Listener Log File /DBSoft/diag/tnslsnr/db01/listener/alert/log.xml
  31. Listening Endpoints Summary...
  32.   (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  33.   (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=db01)(PORT=1521)))
  34. The listener supports no services
  35. The command completed successfully
  36. SQL> alter system register;
  37. System altered.
  38. SQL> @?/rdbms/admin/catbundle.sql psu apply


九、確認更新後的dba_registry_history檢視資訊


  1. SQL> col action_time format a35
  2. SQL> col action format a15
  3. SQL> col namespace format a10
  4. SQL> col version format a10
  5. SQL> select action_time,action,namespace,version,id from dba_registry_history
  6. ACTION_TIME ACTION NAMESPACE VERSION ID
  7. ----------------------------------- --------------- ---------- ---------- ----------
  8. 17-SEP-11 10.21.11.595816 AM APPLY SERVER 11.2.0.3 0
  9. 04-OCT-14 12.16.44.664335 AM APPLY SERVER 11.2.0.3 0
  10. 04-OCT-14 04.01.36.022121 AM VIEW INVALIDATE 8289601
  11. 04-OCT-14 04.01.36.121141 AM UPGRADE SERVER 11.2.0.4.0
  12. 04-OCT-14 06.35.32.745430 AM APPLY SERVER 11.2.0.4 3
  13. SQL> select action,comments from registry$history
  14. ACTION COMMENTS
  15. --------------- ------------------------------
  16. APPLY Patchset 11.2.0.2.0
  17. APPLY Patchset 11.2.0.2.0
  18. VIEW INVALIDATE view invalidation
  19. UPGRADE Upgraded from 11.2.0.3.0
  20. APPLY PSU 11.2.0.4.3
  21. ROLLBACK PSU 11.2.0.4.3
  22. APPLY Patchset 11.2.0.2.0
  23. APPLY PSU 11.2.0.4.3
  24. APPLY PSU 11.2.0.4.3
  25. SQL> SELECT * FROM PRODUCT_COMPONENT_VERSION
  26. PRODUCT VERSION STATUS
  27. ---------------------------------------- ---------- ------------------------------
  28. NLSRTL 11.2.0.4.0 Production
  29. Oracle Database 11g Enterprise Edition 11.2.0.4.0 64bit Production
  30. PL/SQL 11.2.0.4.0 Production
  31. TNS for Linux: 11.2.0.4.0 Production

至此,PSU已經完成。



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

相關文章