在打patch的时候,特别是有些新申请的merge patch,我们需要注意在opatch的readme文档说明,因为有的时候,使用自带版本的opatch,会发生一些千奇百怪的问题。
如下面的这个log中,我们看到,这是一个for 10.2.0.3.3的做db replay的patch,由于db replay需要使用一些package,但是在打这个patch的时候,只有删除这些脚本的操作,没有看到这些脚本从patch目录拷贝到$ORACLE_HOME/rdbms/admin的操作。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
$ $ORACLE_HOME/OPatch/opatch apply -invPtrLoc $ORACLE_BASE/../oraInst.loc Invoking OPatch 10.2.0.3.3 Oracle interim Patch Installer version 10.2.0.3.3 Copyright (c) 2007, Oracle Corporation. All rights reserved.. Oracle Home : /aabb/qb/modb/data/app/oracle/product/10.2.0 Central Inventory : /aabb/qb/modb/data/app/oracle/oraInventory from : /aabb/qb/modb/data/app/oracle/../oraInst.loc OPatch version : 10.2.0.3.3 OUI version : 10.2.0.3.0 OUI location : /aabb/qb/modb/data/app/oracle/product/10.2.0/oui Log file location : /aabb/qb/modb/data/app/oracle/product/10.2.0/cfgtoollogs/opatch/opatch2014-09-22_19-43-43PM.log ApplySession applying interim patch '19562235' to OH '/aabb/qb/modb/data/app/oracle/product/10.2.0' ApplySession: Optional component(s) [ onewaycopy, ] not present in the Oracle Home or a higher version is found. Subset patches: 7282696, 6933567, 6982841, 6474712, 6023472, 5933477, 5998544, 5363584, 4899479, 4336528 The fixes for Patch 7282696, 6933567, 6982841, 6474712, 6023472, 5933477, 5998544, 5363584, 4899479, 4336528 are included in the patch currently being installed (19562235). If you continue, they will be rolled back and the new patch (19562235) will be installed. Invoking fuser to check for active processes. Invoking fuser on "/aabb/qb/modb/data/app/oracle/product/10.2.0/bin/oracle" OPatch detected non-cluster Oracle Home from the inventory and will patch the local system only. Please shutdown Oracle instances running out of this ORACLE_HOME on the local system. (Oracle Home = '/aabb/qb/modb/data/app/oracle/product/10.2.0') Is the local system ready for patching? Do you want to proceed? [y|n] y ... Patching component oracle.rdbms, 10.2.0.3.0... Updating archive file "/aabb/qb/modb/data/app/oracle/product/10.2.0/lib/libserver10.a" with "lib/libserver10.a/aud.o" Updating archive file "/aabb/qb/modb/data/app/oracle/product/10.2.0/lib/libserver10.a" with "lib/libserver10.a/kspare.o" Updating archive file "/aabb/qb/modb/data/app/oracle/product/10.2.0/lib/libserver10.a" with "lib/libserver10.a/kza.o" Deleting "lib/libserver10.a/kzam.o" from archive "/aabb/qb/modb/data/app/oracle/product/10.2.0/lib/libserver10.a" Updating archive file "/aabb/qb/modb/data/app/oracle/product/10.2.0/lib/libserver10.a" with "lib/libserver10.a/kzax.o" Updating archive file "/aabb/qb/modb/data/app/oracle/product/10.2.0/lib/libserver10.a" with "lib/libserver10.a/kzft.o" Updating archive file "/aabb/qb/modb/data/app/oracle/product/10.2.0/lib/libserver10.a" with "lib/libserver10.a/psdsys.o" Updating archive file "/aabb/qb/modb/data/app/oracle/product/10.2.0/lib/libserver10.a" with "lib/libserver10.a/szaud.o" Updating archive file "/aabb/qb/modb/data/app/oracle/product/10.2.0/lib/libserver10.a" with "lib/libserver10.a/zlle.o" Deleting file "/aabb/qb/modb/data/app/oracle/product/10.2.0/rdbms/admin/catamgt.sql" <<<<只有删除,没有copy动作 Copying file to "/aabb/qb/modb/data/app/oracle/product/10.2.0/rdbms/admin/catlbacs.sql" Copying file to "/aabb/qb/modb/data/app/oracle/product/10.2.0/rdbms/admin/catnools.sql" Deleting file "/aabb/qb/modb/data/app/oracle/product/10.2.0/rdbms/admin/dbmsamgt.sql"<<<<只有删除,没有copy动作 Copying file to "/aabb/qb/modb/data/app/oracle/product/10.2.0/rdbms/admin/prvtlsby.plb" Deleting file "/aabb/qb/modb/data/app/oracle/product/10.2.0/rdbms/admin/prvtamgt.plb" <<<<只有删除,没有copy动作 RollbackSession removing interim patch '6023472' from inventory ApplySession rolling back interim patch '5933477' from OH '/aabb/qb/modb/data/app/oracle/product/10.2.0' |
后来和研发一起看了这个问题,他说在log中,有提到oneway copy:
1 |
ApplySession: Optional component(s) [ onewaycopy, ] not present in the Oracle Home or a higher version is found. |
在新版本opatch才能用到这个功能,当时数据库所在的opatch版本是没有这个功能的,所以才导致copy动作不完整。
解决方法:
下载最新opatch之后,问题解决,打patch不再报错。
一条评论
打补丁时,用最新的opatch一般都不会报错的!