如何打补丁及升级


1、找到Opatch目录

第一种方法,使用linux命令:

[oracle@kel ~]$ find ./* -type f -name "opatch"
./product/10.2.0/db_1/OPatch/opatch


第二种方法,使用:

[oracle@kel ~]$ echo $ORACLE_HOME
/home/oracle/product/10.2.0/db_1
[oracle@kel ~]$ cd $ORACLE_HOME
[oracle@kel db_1]$ cd OPatch/
[oracle@kel OPatch]$ ls opatch
opatch


2、查看数据库版本及补丁信息

进入到OPach目录之后,使用命令:

[oracle@kel OPatch]$ pwd
/home/oracle/product/10.2.0/db_1/OPatch
[oracle@kel OPatch]$ ./opatch lsinventory
Invoking OPatch 10.2.0.1.0


Oracle interim Patch Installer version 10.2.0.1.0
Copyright (c) 2005, Oracle Corporation.  All rights reserved..




Oracle Home       : /home/oracle/product/10.2.0/db_1
Central Inventory : /home/oracle/oraInventory
    from           : /home/oracle/product/10.2.0/db_1/oraInst.loc
OPatch version    : 10.2.0.1.0
OUI version       : 10.2.0.1.0
OUI location      : /home/oracle/product/10.2.0/db_1/oui
Log file location : /home/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch-2013_May_12_07-38-54-PDT_Sun.log


Lsinventory Output file location : /home/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory-2013_May_12_07-38-54-PDT_Sun.txt


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


Oracle Database 10g                                                  10.2.0.1.0
There are 1 products installed in this Oracle Home.




There are no Interim patches installed in this Oracle Home.


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


OPatch succeeded.


从而可以看到当前数据库的版本为10.2.0.1.0


3、使用opatch来给数据库打补丁

进入补丁目录之后,使用命令:

$ORACLE_HOME/OPatch/opach apply


会有询问是否要更新文件,选择Y,然后即可

最后可用用$ORACLE_HOME/OPatch/opach lsinventory来进行检查,看是否成功的给数据库打上补丁

4、什么叫Opatch?

  Opatch是oracle支持的Oracle临时补丁的安装实用程序。是针对Oracle数据库第二版9.2.0后安装临时补丁。Opatch是一个基于Perl的程序。

5、对数据库进行升级

将升级文件上传到oracle服务器之后,进行解压

然后进入到解压之后的路径之后

直接输入命令:

./runInstaller
即可进行数据库升级,然后利用

$ORACLE_HOME/OPatch/opatch lsinventory
来进行数据库检查,看是否升级成功。


posted @   KEL  阅读(513)  评论(0编辑  收藏  举报
编辑推荐:
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
阅读排行:
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· 分享 3 个 .NET 开源的文件压缩处理库,助力快速实现文件压缩解压功能!
· Ollama——大语言模型本地部署的极速利器
· [AI/GPT/综述] AI Agent的设计模式综述
点击右上角即可分享
微信分享提示