RAC+ADG apply PSU+PATCH

2024-09-07 12:32
文章标签 apply rac patch psu adg

本文主要是介绍RAC+ADG apply PSU+PATCH,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

---环境------
aix rac+adg,off-line方式打补丁
----读所有patch,及PSU的readme,很重要,特别是patch,可能有的应用patch方法不应-----
----停实例,停服务,停集群,disable集群,杀进程-----
[oracle@trsendb1 /]srvctl stop instance -d xxxx -i xxxx
[oracle@trsendb1 /]srvctl stop service -d xxxx -s xxxx,xxxx,xxxx
[root@trsendb1 /]#source /home/grid/.profile
[root@trsendb1 /]#crsctl stop crs
[oracle@trsendb1 /]ps -ef|grep "(LOCAL=NO)"|grep -v grep|akw '{print $2}'|xargs kill -9

-------------查看OPatch版本
[oracle@trsendb1 /]cd $ORACLE_HOME/OPatch
[oracle@trsendb1 /]opatch version
[oracle@trsendb1 /]opatch lsinventory

------------开始工作
[root@trsendb1 /]#. /home/grid/.profile
[YOU HAVE NEW MAIL]
[root@trsendb1 /]#crsctl stop crs
[root@trsendb1 /]#cd $ORACLE_HOME
[root@trsendb1 /u01/app/11.2.0/grid]#cd crs
[root@trsendb1 /u01/app/11.2.0/grid/crs]#cd install
[root@trsendb1 /u01/app/11.2.0/grid/crs/install]#./rootcrs.pl -unlock
[root@trsendb1 /u01/app/11.2.0/grid/crs/install]#/usr/sbin/slibclean
[root@trsendb1 /tempfs/Patch]export PATH=$PATH:/tempfs/Patch/OPatch
[root@trsendb1 /tempfs/Patch]chown -R grid:oinstall OPatch 20130712
[root@trsendb1 /tempfs/Patch]chown -R grid:oinstall OPatch/
[root@trsendb1 /tempfs/Patch]chown -R grid:oinstall 13940331
[root@trsendb1 /tempfs/Patch]#ps -ef|grep d.bin

----------切换到grid用户检查PSU兼容性及nappley PSU--------
[grid@trsendb1 ~]$opatch prereq CheckConflictAgainstOHWithDetail  -phBaseDir /tempfs/Patch/20130712/16056266
[grid@trsendb1 ~]$opatch prereq CheckConflictAgainstOHWithDetail  -phBaseDir /tempfs/Patch/20130712/16315641
[grid@trsendb1 ~]$opatch napply -oh $ORACLE_HOME -local /tempfs/Patch/20130712/16056266

----切换到oracle用户检查PSU兼容性及nappley PSU-------------
[oracle@trsendb1 ~]$opatch prereq CheckConflictAgainstOHWithDetail  -phBaseDir /tempfs/Patch/20130712/16056266
[oracle@trsendb1 ~]$/tempfs/Patch/20130712/16315641/custom/server/16315641/custom/scripts/prepatch.sh -dbhome $ORACLE_HOME
/tempfs/Patch/20130712/16315641/custom/server/16315641/custom/scripts/prepatch.sh completed successfully.
[oracle@trsendb1 ~]$opatch napply -oh $ORACLE_HOME -local /tempfs/Patch/20130712/16315641/custom/server/16315641
[oracle@trsendb1 ~]$/tempfs/Patch/20130712/16315641/custom/server/16315641/custom/scripts/postpatch.sh -dbhome $ORACLE_HOME


----完成补丁----------------------------
[oracle@trsendb1 ~]$sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Fri Jul 12 22:19:25 2013
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.

-----------------检查对象有效性---------------------
--------检查-------------------------------------
[root@trsendb1 /tempfs/Patch/20130712]#ps -ef
[root@trsendb1 /tempfs/Patch/20130712]#ps -ef|grep d.bin
[root@trsendb1 /tempfs/Patch/20130712]#. /home/grid/.profile
[root@trsendb1 /tempfs/Patch/20130712]#crsctl stat res -init -t
[grid@trsendb1 /u01/app/11.2.0/grid/OPatch]$./opatch lsinventory
[root@trsendb1 /tempfs/Patch]#su - oracle
[oracle@trsendb1 ~]$cd /u01/app/oracle/db_1/OPatch/
[oracle@trsendb1 /u01/app/oracle/db_1/OPatch]$./opatch lsinventory

--------启动监听--------------
[grid@trsendb1 ~]$lsnrctl start listener_dg
------------ADG应用日志--------------
[oracle@trsendb1 ~]$sqlplus / as sysdba
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;
Database altered.
---------------启动数据库实例及相关服务---------------------------
[grid@trsendb2 /tempfs/Patch/20130712]$srvctl start instance -d xxxx -i xxxx -o xxxx

----------------应用PSU的大概步骤------------------------------------------
Note: You need to make sure that the Oracle ACFS file systems are unmounted
1、Run the pre root script. If this is a GI Home, as the root user execute:
# <GI_HOME>/crs/install/rootcrs.pl -unlock
If this is an Oracle Restart Home, as the root user execute:
# <GI_HOME>/crs/install/roothas.pl -unlock
2、Apply the CRS patch using. As the GI home owner execute:
$ <GI_HOME>/OPatch/opatch napply -oh <GI_HOME> -local <UNZIPPED_PATCH_LOCATION>/<GI_components_number>
As the GI home owner execute:
$ <GI_HOME>/OPatch/opatch apply -oh <GI_HOME> -local <UNZIPPED_PATCH_LOCATION>/<DB_PSU_number>
3、Run the pre script for DB component of the patch. As the database home owner execute:
$ <UNZIPPED_PATCH_LOCATION>/<GI_components_number>/custom/server/<GI_components_number>/custom/scripts/prepatch.sh -dbhome <ORACLE_HOME>
4、Apply the DB patch. As the database home owner execute:
$ <ORACLE_HOME>/OPatch/opatch napply -oh <ORACLE_HOME> -local <UNZIPPED_PATCH_LOCATION>/<GI_components_number>/custom/server/<GI_components_number>
$ <ORACLE_HOME>/OPatch/opatch apply -oh <ORACLE_HOME> -local <UNZIPPED_PATCH_LOCATION>/<DB_PSU_number>
5、Run the post script for DB component of the patch. As the database home owner execute:
$ <UNZIPPED_PATCH_LOCATION>/<GI_components_number>/custom/server/<GI_components_number>/custom/scripts/postpatch.sh -dbhome <ORACLE_HOME>
6、Run the post script. As the root user execute:
# <GI_HOME>/rdbms/install/rootadd_rdbms.sh
If this is a GI Home, as the root user execute:
# <GI_HOME>/crs/install/rootcrs.pl -patch
If this is an Oracle Restart Home, as the root user execute:
# <GI_HOME>/crs/install/roothas.pl -patch




---------------------下面是一个节点的gi和db的psu及db的patch应用部分日志-----------------------------
root@trsendb2 /tempfs]#source /home/grid/.profile
[YOU HAVE NEW MAIL]
root@trsendb2[+ASM2]:/tempfs$ crsctl disable crs===>disable crs
CRS-4621: Oracle High Availability Services autostart is disabled.
root@trsendb2[+ASM2]:/tempfs$ crsctl stop crs======>停crs
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'trsendb2'
CRS-2673: Attempting to stop 'ora.crsd' on 'trsendb2'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'trsendb2'
CRS-2673: Attempting to stop 'ora.trsendb2.vip' on 'trsendb2'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'trsendb2'
CRS-2673: Attempting to stop 'ora.oc4j' on 'trsendb2'
CRS-2673: Attempting to stop 'ora.cvu' on 'trsendb2'
CRS-2673: Attempting to stop 'ora.OCRDG.dg' on 'trsendb2'
CRS-2673: Attempting to stop 'ora.registry.acfs' on 'trsendb2'
CRS-2673: Attempting to stop 'ora.DATADG.dg' on 'trsendb2'
CRS-2673: Attempting to stop 'ora.INDEXDG.dg' on 'trsendb2'
CRS-2673: Attempting to stop 'ora.RECOVERYDG.dg' on 'trsendb2'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'trsendb2'
CRS-2677: Stop of 'ora.cvu' on 'trsendb2' succeeded
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'trsendb2' succeeded
CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'trsendb2' succeeded
CRS-2673: Attempting to stop 'ora.scan1.vip' on 'trsendb2'
CRS-2677: Stop of 'ora.DATADG.dg' on 'trsendb2' succeeded
CRS-2677: Stop of 'ora.trsendb2.vip' on 'trsendb2' succeeded
CRS-2673: Attempting to stop 'ora.standby1.vip' on 'trsendb2'
CRS-2677: Stop of 'ora.INDEXDG.dg' on 'trsendb2' succeeded
CRS-2677: Stop of 'ora.scan1.vip' on 'trsendb2' succeeded
CRS-2677: Stop of 'ora.RECOVERYDG.dg' on 'trsendb2' succeeded
CRS-2677: Stop of 'ora.standby1.vip' on 'trsendb2' succeeded
CRS-2677: Stop of 'ora.registry.acfs' on 'trsendb2' succeeded
CRS-2677: Stop of 'ora.oc4j' on 'trsendb2' succeeded
CRS-2677: Stop of 'ora.OCRDG.dg' on 'trsendb2' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'trsendb2'
CR

这篇关于RAC+ADG apply PSU+PATCH的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1145065

相关文章

Oracle ADG Broker主备切换报错失败处理

Oracle ADG Broker主备切换报错失败处理 问题症状解决办法 ⭐️ Oracle数据库版本为19.18。 问题症状 通过DG Broker发起主备切换: DGMGRL> show configurationConfiguration - dg_msgdbProtection Mode: MaxPerformanceMembers:msgdb_1 - Prim

基于11GR2的PSU补丁安装

基于11GR2的PSU补丁安装   场景:hp-unix新装数据库11.2.0.4.0,为了便于在线上触发此版本的一些bug而导致停机来维护,在安装后,应用MOS上提供最新的PSU补丁, 操作:利用OPatch工具来打GI和ORACLE软件的PSU 操作系统版本: $ uname -a HP-UX dbsrv B.11.31 U ia64 3837480657unlimited-use

How to apply streaming in azure openai dotnet web application?

题意:"如何在 Azure OpenAI 的 .NET Web 应用程序中应用流式处理?" 问题背景: I want to create a web api backend that stream openai completion responses. "我想创建一个 Web API 后端,用于流式传输 OpenAI 的完成响应。" How can I apply the f

python并行计算之pool.apply_async()与pool.imap()的异同点

目录 1. 框架和技术概要: 🎨🖥️2. 相似点: 🧩💡3. 不同点: 📊👣4. 使用示例: 😊👨‍💻5. 总结: 🎉 1. 框架和技术概要: 🎨🖥️ multiprocessing 模块中的 pool.apply_async() 与 pool.imap() 都用于并行处理,但它们在使用方式和返回结果上有所不同。 2. 相似点: 🧩💡 并行处理

js apply和call方法的使用说明和区别

在JavaScript中,apply和call都是函数对象的方法,它们允许你改变函数调用时的上下文(即this值),并且可以显式地传入参数。这两者的主要区别在于如何传递参数。 call 方法 call方法使用一系列的参数来传递给目标函数。 语法 func.call(thisArg, arg1, arg2, ...argN); thisArg:在函数被调用时,作为this值被传递给目标函

git生成patch和打patch

日常开发与合作过程中,对于code生成patch和打patch(应用patch)成为经常需要做的事情,使用方法(直接给出一些examples): 生成patch git diff > xxx.patch #只想 patch Test.java 文件git diff Test.java > test.patch# 把所有的修改文件打成 patchgit diff > test.patch

【Oracle点滴积累】Oracle 19c安装Critical Patch Update for January 2024

广告位招租! 知识无价,人有情,无偿分享知识,希望本条信息对你有用! 今天和大家分享如何为Oracle 19c(未启用RMAN的单实例)安装Critical Patch Update(Patch Number:35943157),本指引不包含Roll Back部分,本文仅供参考,谢谢! cd /home/oracle/NewVersion_Opatch/OPatch/./opatch v

Oracle rac模式下undo表空间爆满的解决

文章目录 前言一、确认对应实例的undo表空间二、确认对应实例undo的文件位置三、确认回滚段使用情况四、检查undo segment状态五、创建新的undo表空间并进行切换六、等待原undo表空间segment状态变更为offline七、删除原undo表空间以及数据文件 前言 一、确认对应实例的undo表空间 show parameter undo 二、确认对应实

笔记:《利用Python进行数据分析》之apply的应用

这一节较难,十分灵活,可多花点时间 apply的简单应用 最通用的GroupBy方法是apply。 apply会将待处理的对象拆分成多个片段,然后对各片段调用传入的函数,最后尝试将各片段组合到一起。 回到之前那个小费数据集,假设你想要根据分组选出最高的5个tip_pct值。首先,编写一个选取指定列具有最大值的行的函数: In [74]: def top(df, n=5, c

Pandas-高级处理(六):map()【将自定义函数作用于Series的每个元素】、apply()【将自定义函数作用于DF的行或者列】、applymap()函数【将自定义函数作用于DF的所有元素】

一、map map()是Series对象的一个函数,DataFrame中没有map(),map()的功能是将一个自定义函数作用于Series对象的每个元素。 现在使用map()函数来将data1这一列的数据改为保留三位小数显示 df['data1'] = df['data1'].map(lambda x : "%.3f"%x) 二、apply apply()函数的功能是将一个自定