打psu学习处理

补丁基础知识补充
opatch 信息:
$GI_HOME/OPatch/opatch  lsinventory -detail
$ORACLE_HOME/OPatch/opatch  lsinventory -detail

几种补丁类型的介绍:

PSR补丁:是在大版本上发布的补丁集,修复了较多的Bug,可能会包含一些增强功能(Enhancement)。比如11.2是一个大版本,那么11.2.0.2就 是一个Patch set。这种补丁集经过了严格的集成测试,也是累积型的。所以我们总是推荐安装最新的 Patch Set。

PSU补丁:每季度发布一次,修复比较严重的一些问题,包含每季的CPU,是累积型的。虽然在描述PSU的时候会用到数 据库版本第5位,比如DatabasePSU 11.2.0.3.5,但实际上打完PSU后并不会真正改变数据库的版本,从v$version中看到的版本还是4位的(11.2.0.3.0),第5位 仍然是0。注意,Windows上没有CPU和PSU,Oracle的集群软件和数据库软件使用不同的PSU

CPU补丁类型:每季度发布一次,用来修复安全方面的一些补丁,是累积型的。目前已经更名为Security Patch Update (SPU)

小补丁:是我们常说的小补丁,为了修复某(几)个Bug而发布的补丁。这种补丁推荐在测试库上测试无误后再安装在生产库上


补丁安装文档及相关信息子在下载之后都会有一个相应的readme文档,可仔细阅读

打补丁要要特别注意:Opatch的版本,你可以通过opatch version命令查看Oracle Home当前的OPatch版本,如果低于Readme规定的最低版本,一定要先升OPatch才能打补丁

补丁安装前期准备:
1.下载11.0.2.3.0 升级到11.0.2.3.5的psu

29540871_144895653002MO.png

2.检查环境变量 添加$ORACLE_HOME/OPatch 到$path下 

29540871_14489565306H9O.png

3.上传升级包并解压到oracle/home下


29540871_1448956530ZxFZ.png



4.更新opatch工具 
方法 在metlink 上 搜 6880880 
29540871_1448956531UHsA.png




点击连接地址下载需要的最新的 Opatch 版本 注意  实验证实下班最新版本 可能遇到JDK版本过低。注意 

查询当前opatch版本
29540871_1448956531knsA.png

上传下载好的软件包 并解压
29540871_14489565317KGY.png

用 已解压好的 opatch替换ORACLE_HOME下的 opatch文件夹,将之前的 opatch文件夹重命名为其他名,然后mv解压后的opatch 文件夹到$ORACLE_HOME

29540871_1448956531w0k7.png

双节点rac  每个节点有oracle、grid 两个用户 所以总计要做四遍操作
查看当前版本  现实 已经更新成功 

补丁的安装步骤:
1 ,补丁安装前的检查:


查看实例名:
SQL> select instance_name,status from gv$instance;

INSTANCE_NAME    STATUS
---------------- ------------
rac2             OPEN
rac1             OPEN

查看数据库版本:
SQL> select * from v$version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE    11.2.0.3.0      Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production

查看数据库大小:

SQL> select sum(bytes)/1024/1024||'M' from dba_segments;

SUM(BYTES)/1024/1024||'M'
-----------------------------------------
1445.8125M

查看组建信息:
SQL> select COMP_ID,COMP_NAME,VERSION,STATUS from DBA_REGISTRY;

COMP_ID              COMP_NAME                                          VERSION                        STATUS
-------------------- -------------------------------------------------- ------------------------------ ----------------------
OWB                   OWB                                                11.2.0.3.0                     VALID
APEX                  Oracle Application Express                  3.2.1.00.12                    VALID
EM                     Oracle Enterprise Manager                  11.2.0.3.0                     VALID
AMD                   OLAP Catalog                                     11.2.0.3.0                     VALID
SDO                   Spatial                                               11.2.0.3.0                     VALID
ORDIM                Oracle Multimedia                              11.2.0.3.0                     VALID
XDB                    Oracle XML Database                         11.2.0.3.0                     VALID
CONTEXT            Oracle Text                                       11.2.0.3.0                     VALID
EXF                    Oracle Expression Filter                       11.2.0.3.0                     VALID
RUL                    Oracle Rules Manager                         11.2.0.3.0                     VALID
OWM                  Oracle Workspace Manager                 11.2.0.3.0                     VALID
CATALOG            Oracle Database Catalog Views            11.2.0.3.0                     VALID
CATPROC            Oracle Database Packages and Types   11.2.0.3.0                     VALID
JAVAVM              JServer JAVA Virtual Machine               11.2.0.3.0                     VALID
XML                    Oracle XDK                                         11.2.0.3.0                     VALID
CATJAVA             Oracle Database Java Packages            11.2.0.3.0                     VALID
APS                    OLAP Analytic Workspace                     11.2.0.3.0                     VALID
XOQ                   Oracle OLAP API                                  11.2.0.3.0                     VALID
RAC                    Oracle Real Application Clusters            11.2.0.3.0                     VALID

查看补丁情况:
SQL> select ACTION_TIME, ACTION, COMMENTS from sys.DBA_REGISTRY_HISTORY;

ACTION_TIME                                        ACTION   COMMENTS
28-JUL-14 12.27.17.484533 PM                 APPLY    Patchset 11.2.0.2.0

查看无效对象:

SQL> select count(*) from dba_objects where status<>'VALID';

  COUNT(*)
----------
         0

SQL> select object_name,object_type,owner,status from dba_objects where status<>'VALID';

no rows selected


如果在生产环境中,最好在操作升级前 做好备份(数据库和软件)。本次实验不做备份。

检查是否存在有冲突的psu:

[oracle@rac1 14727310]$  $ORACLE_HOME/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       : /u01/app/oracle/product/11.2.0/db
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/11.2.0/db/oraInst.loc
OPatch version    : 11.2.0.3.6
OUI version       : 11.2.0.3.0
Log file location : /u01/app/oracle/product/11.2.0/db/cfgtoollogs/opatch/opatch2014-08-04_23-23-59PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.

停监听,停crs,停数据库,以上三停在两节点分别做

检查是否还有ora进程  有则杀掉,做完以上操作建议重新用crt连接数据库  释放sqlplus 占用进程



2.安装oracle软件部分补丁

安装顺序 先grid后oracle,先一节点后二节点, opatch apply -local ,避免自动cp出错

上传补丁包,并解压(因为本次实验是手动打psu,所以这个操作要做四遍,两个节点上的两个用户。)但接下来展示的例子中是首先做的一节点grid用户的。


实验第一次



[oracle@rac1 ~]$ ls
14727310  database  jdk-7u65-linux-i586  jdk-7u65-linux-i586.rpm  offexit.lst  p14727310_112030_Linux-x86-64.zip  sshUserSetup.sh
[oracle@rac1 ~]$ cd 14727310
[oracle@rac1 14727310]$ pwd
/home/oracle/14727310

关闭监听;

[oracle@rac1 14727310]$ su - grid
Password:
[grid@rac1 ~]$ lsnrctl stop

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 05-AUG-2014 02:31:42

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
The command completed successfully

关闭实例:

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down


停CRS (root)用户



开始执行 :(一路y下去 就成功了)

[grid@rac1 14727310]$ opatch apply
Oracle Interim Patch Installer version 11.2.0.3.6
Copyright (c) 2013, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/11.2.0/grid
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/11.2.0/grid/oraInst.loc
OPatch version    : 11.2.0.3.6
OUI version       : 11.2.0.3.0
Log file location : /u01/app/11.2.0/grid/cfgtoollogs/opatch/opatch2014-08-05_02-03-07AM_1.log

Verifying environment and performing prerequisite checks...
OPatch continues with these patches:   13343438  13696216  13923374  14275605  14727310 

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 http://www.oracle.com/support/policies.html 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



This node is part of an Oracle Real Application Cluster.
Remote nodes: 'rac2'
Local node: 'rac1'
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/11.2.0/grid')


Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying sub-patch '13343438' to OH '/u01/app/11.2.0/grid'

Patching component oracle.rdbms.rsf, 11.2.0.3.0...

Patching component oracle.rdbms, 11.2.0.3.0...

Patching component oracle.rdbms.dbscripts, 11.2.0.3.0...

Verifying the update...
Applying sub-patch '13696216' to OH '/u01/app/11.2.0/grid'
ApplySession: Optional component(s) [ oracle.sysman.console.db, 11.2.0.3.0 ] , [ oracle.sysman.oms.core, 10.2.0.4.4 ]  not present in the Oracle Home or a higher version is found.

Patching component oracle.rdbms.rsf, 11.2.0.3.0...

Patching component oracle.rdbms, 11.2.0.3.0...

Patching component oracle.sdo.locator, 11.2.0.3.0...

Verifying the update...
Applying sub-patch '13923374' to OH '/u01/app/11.2.0/grid'
ApplySession: Optional component(s) [ oracle.sysman.console.db, 11.2.0.3.0 ] , [ oracle.network.cman, 11.2.0.3.0 ]  not present in the Oracle Home or a higher version is found.

Patching component oracle.rdbms.rsf, 11.2.0.3.0...

Patching component oracle.rdbms, 11.2.0.3.0...

Patching component oracle.rdbms.dbscripts, 11.2.0.3.0...

Patching component oracle.network.rsf, 11.2.0.3.0...

Patching component oracle.network.listener, 11.2.0.3.0...

Verifying the update...
Applying sub-patch '14275605' to OH '/u01/app/11.2.0/grid'
ApplySession: Optional component(s) [ oracle.precomp.common, 11.2.0.3.0 ] , [ oracle.precomp.lang, 11.2.0.3.0 ]  not present in the Oracle Home or a higher version is found.

Patching component oracle.network.client, 11.2.0.3.0...

Patching component oracle.network.rsf, 11.2.0.3.0...

Patching component oracle.rdbms, 11.2.0.3.0...

Patching component oracle.rdbms.dbscripts, 11.2.0.3.0...

Patching component oracle.rdbms.rman, 11.2.0.3.0...

Patching component oracle.rdbms.rsf, 11.2.0.3.0...

Patching component oracle.rdbms.util, 11.2.0.3.0...

Verifying the update...
Applying sub-patch '14727310' to OH '/u01/app/11.2.0/grid'
ApplySession: Optional component(s) [ oracle.sysman.console.db, 11.2.0.3.0 ] , [ oracle.sysman.oms.core, 10.2.0.4.4 ]  not present in the Oracle Home or a higher version is found.

Patching component oracle.rdbms, 11.2.0.3.0...

Patching component oracle.rdbms.dbscripts, 11.2.0.3.0...

Patching component oracle.rdbms.deconfig, 11.2.0.3.0...

Patching component oracle.rdbms.rsf, 11.2.0.3.0...

Patching component oracle.sdo.locator, 11.2.0.3.0...

Verifying the update...

Patching in rolling mode.

************************************************************************************************************
这里注意了  由于我们执行的是opatch apply   没有只想能够 opatch apply -local  默认的 就是同步到2节点  所以 下面这堆可以忽略
************************************************************************************************************
The node 'rac2' will be patched next.


Please shutdown Oracle instances running out of this ORACLE_HOME on 'rac2'.
(Oracle Home = '/u01/app/11.2.0/grid')

Is the node ready for patching? [y|n]
y
User Responded with: Y
Updating nodes 'rac2'

   Apply-related files are:
     FP = "/u01/app/11.2.0/grid/.patch_storage/NApply/2014-08-05_02-03-07AM/rac/copy_files.txt"
     DP = "/u01/app/11.2.0/grid/.patch_storage/NApply/2014-08-05_02-03-07AM/rac/copy_dirs.txt"
     MP = "/u01/app/11.2.0/grid/.patch_storage/NApply/2014-08-05_02-03-07AM/rac/make_cmds.txt"
     RC = "/u01/app/11.2.0/grid/.patch_storage/NApply/2014-08-05_02-03-07AM/rac/remote_cmds.txt"

Instantiating the file "/u01/app/11.2.0/grid/.patch_storage/NApply/2014-08-05_02-03-07AM/rac/copy_files.txt.instantiated" by replacing $ORACLE_HOME in "/u01/app/11.2.0/grid/.patch_storage/NApply/2014-08-05_02-03-07AM/rac/copy_files.txt" with actual path.
Propagating files to remote nodes...

OPatch failed to copy files to remote nodes 'rac2' .  Detail: Error while copying files inside directory '/u01/app/11.2.0/grid' based on listed file '/u01/app/11.2.0/grid/.patch_storage/NApply/2014-08-05_02-03-07AM/rac/copy_files.txt.instantiated' to nodes 'rac2'. [PRKC-1073 : Failed to transfer directory "/u01/app/11.2.0/grid/.patch_storage/NApply/2014-08-05_02-03-07AM/rac/copy_files.txt.instantiated" to any of the given nodes "rac2 ".
Error on node rac2:/bin/tar: ./.patch_storage/interim_inventory.txt: Cannot open: No such file or directory
/bin/tar: ./lib/libgeneric11.a: Cannot open: File exists
/bin/tar: ./lib/libcommon11.a: Cannot open: File exists
/bin/tar: ./lib/libserver11.a: Cannot open: File exists
/bin/tar: ./bin/asmcmdcore: Cannot open: File exists
/bin/tar: ./psu/11.2.0.3.1/catpsu.sql: Cannot open: No such file or directory
/bin/tar: ./psu/11.2.0.3.1/catpsu_rollback.sql: Cannot open: No such file or directory
/bin/tar: ./psu/11.2.0.3.2/catpsu.sql: Cannot open: No such file or directory
/bin/tar: ./psu/11.2.0.3.2/catpsu_rollback.sql: Cannot open: No such file or directory
/bin/tar: ./lib/libordsdo11.a: Cannot open: File exists
/bin/tar: ./lib/libnid.a: Cannot open: File exists
/bin/tar: ./psu/11.2.0.3.3/catpsu.sql: Cannot open: No such file or directory
/bin/tar: ./psu/11.2.0.3.3/catpsu_rollback.sql: Cannot open: No such file or directory
/bin/tar: ./psu/scripts/bug9858539.sql: Cannot open: No such file or directory
/bin/tar: ./lib/libn11.a: Cannot open: File exists
/bin/tar: ./bin/adapters: Cannot open: File exists
/bin/tar: ./bin/gennttab: Cannot open: File exists
/bin/tar: ./psu/11.2.0.3.4/catpsu.sql: Cannot open: No such file or directory
/bin/tar: ./psu/11.2.0.3.4/catpsu_rollback.sql: Cannot open: No such file or directory
/bin/tar: ./patch/scripts/bug12904308.sql: Cannot open: No such file or directory
/bin/tar: ./lib/libpls11.a: Cannot open: File exists
/bin/tar: ./lib/libclient11.a: Cannot open: File exists
/bin/tar: ./lib/libpls11_pic.a: Cannot open: File exists
/bin/tar: ./lib/libasmclnt11.a: Cannot open: File exists
/bin/tar: ./lib/libasmclntsh11.a: Cannot open: File exists
/bin/tar: ./psu/11.2.0.3.5/catpsu.sql: Cannot open: No such file or directory
/bin/tar: ./psu/11.2.0.3.5/catpsu_rollback.sql: Cannot open: No such file or directory
/bin/tar: Exiting with failure status due to previous errors]

OPatch failed to copy files to remote nodes 'rac2' .
Do you want to proceed? [y|n]
n
User Responded with: N
UtilSession failed: Error while copying files inside directory '/u01/app/11.2.0/grid' based on listed file '/u01/app/11.2.0/grid/.patch_storage/NApply/2014-08-05_02-03-07AM/rac/copy_files.txt.instantiated' to nodes 'rac2'. [PRKC-1073 : Failed to transfer directory "/u01/app/11.2.0/grid/.patch_storage/NApply/2014-08-05_02-03-07AM/rac/copy_files.txt.instantiated" to any of the given nodes "rac2 ".
Error on node rac2:/bin/tar: ./.patch_storage/interim_inventory.txt: Cannot open: No such file or directory
/bin/tar: ./lib/libgeneric11.a: Cannot open: File exists
/bin/tar: ./lib/libcommon11.a: Cannot open: File exists
/bin/tar: ./lib/libserver11.a: Cannot open: File exists
/bin/tar: ./bin/asmcmdcore: Cannot open: File exists
/bin/tar: ./psu/11.2.0.3.1/catpsu.sql: Cannot open: No such file or directory
/bin/tar: ./psu/11.2.0.3.1/catpsu_rollback.sql: Cannot open: No such file or directory
/bin/tar: ./psu/11.2.0.3.2/catpsu.sql: Cannot open: No such file or directory
/bin/tar: ./psu/11.2.0.3.2/catpsu_rollback.sql: Cannot open: No such file or directory
/bin/tar: ./lib/libordsdo11.a: Cannot open: File exists
/bin/tar: ./lib/libnid.a: Cannot open: File exists
/bin/tar: ./psu/11.2.0.3.3/catpsu.sql: Cannot open: No such file or directory
/bin/tar: ./psu/11.2.0.3.3/catpsu_rollback.sql: Cannot open: No such file or directory
/bin/tar: ./psu/scripts/bug9858539.sql: Cannot open: No such file or directory
/bin/tar: ./lib/libn11.a: Cannot open: File exists
/bin/tar: ./bin/adapters: Cannot open: File exists
/bin/tar: ./bin/gennttab: Cannot open: File exists
/bin/tar: ./psu/11.2.0.3.4/catpsu.sql: Cannot open: No such file or directory
/bin/tar: ./psu/11.2.0.3.4/catpsu_rollback.sql: Cannot open: No such file or directory
/bin/tar: ./patch/scripts/bug12904308.sql: Cannot open: No such file or directory
/bin/tar: ./lib/libpls11.a: Cannot open: File exists
/bin/tar: ./lib/libclient11.a: Cannot open: File exists
/bin/tar: ./lib/libpls11_pic.a: Cannot open: File exists
/bin/tar: ./lib/libasmclnt11.a: Cannot open: File exists
/bin/tar: ./lib/libasmclntsh11.a: Cannot open: File exists
/bin/tar: ./psu/11.2.0.3.5/catpsu.sql: Cannot open: No such file or directory
/bin/tar: ./psu/11.2.0.3.5/catpsu_rollback.sql: Cannot open: No such file or directory
/bin/tar: Exiting with failure status due to previous errors]
Log file location: /u01/app/11.2.0/grid/cfgtoollogs/opatch/opatch2014-08-05_02-03-07AM_1.log

OPatch failed with error code 73



测试一下 成功了 。一个节点:

[grid@rac1 14727310]$ opatch apply
Oracle Interim Patch Installer version 11.2.0.3.6
Copyright (c) 2013, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/11.2.0/grid
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/11.2.0/grid/oraInst.loc
OPatch version    : 11.2.0.3.6
OUI version       : 11.2.0.3.0
Log file location : /u01/app/11.2.0/grid/cfgtoollogs/opatch/opatch2014-08-05_02-32-52AM_1.log

Verifying environment and performing prerequisite checks...
All of the constituents of the composite patch are already installed in the Oracle Home. No need to apply this patch.
Log file location: /u01/app/11.2.0/grid/cfgtoollogs/opatch/opatch2014-08-05_02-32-52AM_1.log

OPatch succeeded.

本次从一节点开始打起grid 开始打但是到二姐点就开始报错了,尝试很多办法,没有成功一不小心删了几个文件没有做备份。重新搭环境再测。。。。。。

建议用vm上的 快照功能在虚拟机状态良好时候做个快照。然后就折腾吧  怎么祸害都没事了 。搞碎了就恢复
opatch rollback -id 14727310


第二次测试:

环境于之前相同,操作流程

关闭listener,关闭crs,关闭实例,两个节点grid,oracle的Optach工具全部升级到OPatch Version: 11.2.0.3.6 。

开始做rac1 grid 用户。


[grid@rac1 14727310]$ opatch apply -local
Oracle Interim Patch Installer version 11.2.0.3.6
Copyright (c) 2013, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/11.2.0/grid
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/11.2.0/grid/oraInst.loc
OPatch version    : 11.2.0.3.6
OUI version       : 11.2.0.3.0
Log file location : /u01/app/11.2.0/grid/cfgtoollogs/opatch/opatch2014-08-07_02-31-53AM_1.log

Verifying environment and performing prerequisite checks...
All of the constituents of the composite patch are already installed in the Oracle Home. No need to apply this patch.
Log file location: /u01/app/11.2.0/grid/cfgtoollogs/opatch/opatch2014-08-07_02-31-53AM_1.log

OPatch succeeded.

rac2  grid用户:
[grid@rac2 14727310]$ opatch apply -local
Oracle Interim Patch Installer version 11.2.0.3.6
Copyright (c) 2013, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/11.2.0/grid
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/11.2.0/grid/oraInst.loc
OPatch version    : 11.2.0.3.6
OUI version       : 11.2.0.3.0
Log file location : /u01/app/11.2.0/grid/cfgtoollogs/opatch/opatch2014-08-07_02-32-05AM_1.log

Verifying environment and performing prerequisite checks...
All of the constituents of the composite patch are already installed in the Oracle Home. No need to apply this patch.
Log file location: /u01/app/11.2.0/grid/cfgtoollogs/opatch/opatch2014-08-07_02-32-05AM_1.log

OPatch succeeded.

rac1 oracle:

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_precomp.mk:19: warning: overriding commands for target `pcscfg.cfg'
/u01/app/oracle/product/11.2.0/db/precomp/lib/env_precomp.mk:2160: warning: ignoring old commands for target `pcscfg.cfg'
/u01/app/oracle/product/11.2.0/db/precomp/lib/ins_precomp.mk:19: warning: overriding commands for target `pcscfg.cfg'
/u01/app/oracle/product/11.2.0/db/precomp/lib/env_precomp.mk:2160: warning: ignoring old commands for target `pcscfg.cfg'


Composite patch 14727310 successfully applied.
OPatch Session completed with warnings.
Log file location: /u01/app/oracle/product/11.2.0/db/cfgtoollogs/opatch/opatch2014-08-07_02-33-03AM_1.log

OPatch completed with warnings.


这段warning 忽略  ,依然是安装成功的。

rac2 oracle

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_precomp.mk:19: warning: overriding commands for target `pcscfg.cfg'
/u01/app/oracle/product/11.2.0/db/precomp/lib/env_precomp.mk:2160: warning: ignoring old commands for target `pcscfg.cfg'
/u01/app/oracle/product/11.2.0/db/precomp/lib/ins_precomp.mk:19: warning: overriding commands for target `pcscfg.cfg'
/u01/app/oracle/product/11.2.0/db/precomp/lib/env_precomp.mk:2160: warning: ignoring old commands for target `pcscfg.cfg'


Composite patch 14727310 successfully applied.
OPatch Session completed with warnings.
Log file location: /u01/app/oracle/product/11.2.0/db/cfgtoollogs/opatch/opatch2014-08-07_02-45-04AM_1.log

OPatch completed with warnings.

补丁已经更新成功现在执行脚本更新视图,应用升级变更。
oracle@rac1 14727310]$ cd $ORACLE_HOME/rdbms/admin
[oracle@rac1 admin]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Thu Aug 7 03:57:19 2014

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

Connected to an idle instance.

SQL> startup
ORA-01078: failure in processing system parameters
ORA-01565: error in identifying file '+DATA/rac/spfilerac.ora'
ORA-17503: ksfdopn:2 Failed to open file +DATA/rac/spfilerac.ora
ORA-29701: unable to connect to Cluster Synchronization Service

。。。。。。遇见了错误 。解决吧。。。。

怀疑升级后spfile 有了变化导致启动失败 ,问了下度娘,娘说这么干:
***************************************************************************
$ORACLE_BASE/admin/$ORACLE_SID/pfile 目录下的 init.ora.0312013174228 形式的文  * 件 copy /home/oracle/app/oracle/product/11.2.0/dbhome_1/dbs/ 目录下 inittest.ora 即可       *
**************************************************************************************
操作:[oracle@rac1 dbs]$ cd /u01/app/oracle/admin/rac/pfile
[oracle@rac1 pfile]$ ls
init.ora.77201404713
[oracle@rac1 pfile]$ cp /u01/app/oracle/admin/rac/pfile/init.ora.77201404713 /u01/app/oracle/product/11.2.0/db/dbs/initrac1.ora

然后继续 :

[oracle@rac1 pfile]$ cd
[oracle@rac1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Thu Aug 7 04:12:09 2014

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

Connected to an idle instance.

SQL> startup
ORA-29702: error occurred in Cluster Group Service operation


。。。。。果然有效可是 怎么还有个错 。继续查 。啊 。。。是要启动集群件。好把grid启动起来:

操作:

[root@rac1 bin]# ./crsctl start crs
CRS-4123: Oracle High Availability Services has been started.
[root@rac2 bin]# ./crsctl start crs
CRS-4123: Oracle High Availability Services has been started.

继续。。。。。

SQL> startup
ORACLE instance started.

Total System Global Area  672256000 bytes
Fixed Size                  2231392 bytes
Variable Size             255853472 bytes
Database Buffers          411041792 bytes
Redo Buffers                3129344 bytes
ORA-03113: end-of-file on communication channel
Process ID: 22230
Session ID: 1 Serial number: 3


。。。看到了希望耶。。。。卡。。。fuck。。又有问题了 。。。。。。

这是what?  网络终端吗  ,crt重新连接 之后发现数据库已经起来了。。。。逗我。。

SQL*Plus: Release 11.2.0.3.0 Production on Thu Aug 7 04:29:36 2014

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

SQL> select instance_name,status from gv$instance;

INSTANCE_NAME    STATUS
---------------- ------------
rac1             OPEN
rac2             OPEN
*****************************************************************************************************************
好 终于启动了  ,我们继续执行脚本 。。。。。
SQL> @catbundle.sql psu apply     《---------------------应该升级变更

执行完之后会在$ORACLE_HOME/rdbms/admin   下生成两个脚本

catbundle_PSU_RAC_APPLY.sql   ------------------这个脚本是在执行      @catbundle.sql psu apply  时候生成的 并直接被调用了  
catbundle_PSU_RAC_ROLLBACK.sql ------------------- 这个用于回滚的  

****************************************************************************************************************


检查psu级别
oracle数据库验证:
SQL> select substr(action_time,1,30) action_time,substr(id,1,8) id,substr(action,1,10) action,substr(version,1,8) version,substr(comments,1,20) comments from registry$history;

ACTION_TIME                                                  ID               ACTION               VERSION          COMMENTS
------------------------------------------------------------ ---------------- -------------------- ---------------- ----------------------------------------
07-AUG-14 01.46.52.008933 AM                                 0                APPLY                11.2.0.3         Patchset 11.2.0.2.0
07-AUG-14 04.36.59.029698 AM                                 5                APPLY                11.2.0.3         PSU 11.2.0.3.5
07-AUG-14 04.54.43.158159 AM                                 5                APPLY                11.2.0.3         PSU 11.2.0.3.5
07-AUG-14 05.07.16.310283 AM                                 5                APPLY                11.2.0.3         PSU 11.2.0.3.5

grid验证:


[grid@rac1 ~]$ $ORACLE_HOME/OPatch/opatch lsinventory
Oracle Interim Patch Installer version 11.2.0.3.6
Copyright (c) 2013, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/11.2.0/grid
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/11.2.0/grid/oraInst.loc
OPatch version    : 11.2.0.3.6
OUI version       : 11.2.0.3.0
Log file location : /u01/app/11.2.0/grid/cfgtoollogs/opatch/opatch2014-08-07_04-23-26AM_1.log

Lsinventory Output file location : /u01/app/11.2.0/grid/cfgtoollogs/opatch/lsinv/lsinventory2014-08-07_04-23-26AM.txt

--------------------------------------------------------------------------------
Installed Top-level Products (1):

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


Interim patches (1) :

Patch  14727310     : applied on Thu Aug 07 02:23:44 GMT-05:00 2014
Unique Patch ID:  15663328
Patch description:  "Database Patch Set Update : 11.2.0.3.5 (14727310)"
   Created on 27 Dec 2012, 00:06:30 hrs PST8PDT
Sub-patch  14275605; "Database Patch Set Update : 11.2.0.3.4 (14275605)"
Sub-patch  13923374; "Database Patch Set Update : 11.2.0.3.3 (13923374)"
Sub-patch  13696216; "Database Patch Set Update : 11.2.0.3.2 (13696216)"
Sub-patch  13343438; "Database Patch Set Update : 11.2.0.3.1 (13343438)"
   Bugs fixed:
     13566938, 13593999, 10350832, 14138130, 12919564, 13624984, 13588248
     13080778, 13804294, 14258925, 12873183, 13645875, 12880299, 14664355
     14409183, 12998795, 14469008, 13719081, 13492735, 12857027, 14263036
     14263073, 13742433, 13732226, 12905058, 13742434, 12849688, 12950644
     13742435, 13464002, 12879027, 13534412, 14613900, 12585543, 12535346
     12588744, 11877623, 12847466, 13649031, 13981051, 12582664, 12797765
     14262913, 12923168, 13612575, 13384182, 13466801, 13484963, 11063191
     13772618, 13070939, 12797420, 13041324, 12976376, 11708510, 13742437
     13026410, 13737746, 13742438, 13326736, 13001379, 13099577, 14275605
     13742436, 9873405, 9858539, 14040433, 12662040, 9703627, 12617123
     12845115, 12764337, 13354082, 13397104, 12964067, 13550185, 12780983
     12583611, 14546575, 13476583, 15862016, 11840910, 13903046, 15862017
     13572659, 13718279, 13657605, 13448206, 13419660, 14480676, 13632717
     14063281, 13430938, 13467683, 13420224, 14548763, 12646784, 14035825
     12861463, 12834027, 15862021, 13377816, 13036331, 14727310, 13685544
     13499128, 15862018, 12829021, 15862019, 12794305, 14546673, 12791981
     13503598, 13787482, 10133521, 12718090, 13399435, 14023636, 12401111
     13257247, 13362079, 12917230, 13923374, 14480675, 13524899, 13559697
     14480674, 13916709, 14076523, 13773133, 13340388, 13366202, 13528551
     12894807, 13343438, 13454210, 12748240, 14205448, 13385346, 15853081
     12971775, 13035804, 13544396, 13035360, 14062795, 12693626, 13332439
     14038787, 14062796, 12913474, 14841409, 14390252, 13370330, 14062797
     13059165, 14062794, 12959852, 13358781, 12345082, 12960925, 9659614
     13699124, 14546638, 13936424, 13338048, 12938841, 12658411, 12620823
     12656535, 14062793, 12678920, 13038684, 14062792, 13807411, 12594032
     13250244, 15862022, 9761357, 12612118, 13742464, 14052474, 13457582
     13527323, 15862020, 12780098, 13502183, 13705338, 13696216, 10263668
     15862023, 13554409, 15862024, 13103913, 13645917, 14063280, 13011409



Rac system comprising of multiple nodes
  Local node = rac1
  Remote node = rac2

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

OPatch succeeded.
在以下目录检查是否错误:
$ORACLE_HOME/cfgtoollogs/catbundle
$ORACLE_BASE/cfgtoollogs/catbundle

日志格式如下: 
 catbundle_PSU__APPLY_.log 
 catbundle_PSU__GENERATE_.log 
到此 PSU数据库升级完成


*******************************************************************************************************
总结一下:

手动打psu几个步骤:

下载psu>下载psu需要的最低版本以上的Opatch工具>更新Opatch版本>检查>关闭监听,crs,数据库,检查进程>检查psu冲突>开始打psu
最后检查验证

看似艰难的过程。其实很简单 看人品伴随着各种的报错不等。细心很重要。















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

转载于:http://blog.itpub.net/29540871/viewspace-1850650/

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值