check database patch with opatch tools
當給資料庫打完patch以後,如何查詢是否打patch成功?
或者,剛剛接到一個資料庫伺服器,如何查詢這個資料庫伺服器都曾經打過哪些patch?
1. 下載並安裝opatch工具
下載:p6880880_102000_LINUX.zip
解壓:unzip p6880880_102000_LINUX.zip OPatch
更新環境變數: vi .bash_profile 追加PATH引數
export PATH=$ORACLE_HOME/bin:$ORA_CRS_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin:/home/oracle/OPatch
2.opatch的命令
a.查詢opatch的用法
[oracle@rac1 ~]$ opatch
/home/oracle/OPatch/opatch: line 55: [: =: unary operator expected
Invoking OPatch 10.2.0.4.7
Oracle Interim Patch Installer version 10.2.0.4.7
Copyright (c) 2009, Oracle Corporation. All rights reserved.
Syntax Error... No command specified.
Usage: opatch [ -help ] [ -r[eport] ] [ command ]
command := auto
apply
lsinventory
napply
nrollback
rollback
query
version
prereq
util
-report Print the actions without executing.
example:
'opatch -help'
'opatch auto -help'
'opatch apply -help'
'opatch lsinventory -help'
'opatch napply -help'
'opatch nrollback -help'
'opatch rollback -help'
'opatch prereq -help'
'opatch util -help'
OPatch failed with error code 14
b.list資料庫patch
[oracle@rac1 ~]$ opatch lsinventory
Invoking OPatch 10.2.0.4.7
Oracle Interim Patch Installer version 10.2.0.4.7
Copyright (c) 2009, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/10.2.0/db_1
Central Inventory : /u01/app/oracle/oraInventory
from : /etc/oraInst.loc
OPatch version : 10.2.0.4.7
OUI version : 10.2.0.4.0
OUI location : /u01/app/oracle/product/10.2.0/db_1/oui
Log file location : /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch2009-07-20_17-48-38PM.log
Patch history file: /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch_history.txt
Lsinventory Output file location : /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2009-07-20_17-48-38PM.txt
--------------------------------------------------------------------------------
Installed Top-level Products (2):
Oracle Database 10g 10.2.0.1.0
Oracle Database 10g Release 2 Patch Set 3 10.2.0.4.0
There are 2 products installed in this Oracle Home.
There are no Interim patches installed in this Oracle Home.
Rac system comprising of multiple nodes
Local node = rac1
Remote node = rac2
--------------------------------------------------------------------------------
OPatch succeeded.
3. 也可以透過sql語句來查詢
Run the following command to check the status of all the components after the upgrade:
SQL> select comp_name, version, status from sys.dba_registry;
COMP_NAME VERSION STATUS
------------------------------ ------------------------------ ----------------------
Oracle Enterprise Manager 10.2.0.4.0 VALID
Spatial 10.2.0.4.0 VALID
Oracle interMedia 10.2.0.4.0 VALID
OLAP Catalog 10.2.0.4.0 VALID
Oracle XML Database 10.2.0.4.0 VALID
Oracle Text 10.2.0.4.0 VALID
Oracle Expression Filter 10.2.0.4.0 VALID
Oracle Rules Manager 10.2.0.4.0 VALID
Oracle Workspace Manager 10.2.0.4.3 VALID
Oracle Data Mining 10.2.0.4.0 VALID
Oracle Database Catalog Views 10.2.0.4.0 VALID
COMP_NAME VERSION STATUS
------------------------------ ------------------------------ ----------------------
Oracle Database Packages and T 10.2.0.4.0 VALID
ypes
JServer JAVA Virtual Machine 10.2.0.4.0 VALID
Oracle XDK 10.2.0.4.0 VALID
Oracle Database Java Packages 10.2.0.4.0 VALID
OLAP Analytic Workspace 10.2.0.4.0 VALID
Oracle OLAP API 10.2.0.4.0 VALID
Oracle Real Application Cluste 10.2.0.4.0 VALID
In the output of the preceding command, the status of all the components should be VALID for a successful upgrade
參考文獻:
1. Subject: Opatch - Where Can I Find the Latest Version of Opatch?
Doc ID: 224346.1 Type: BULLETIN
Modified Date : 28-MAY-2009 Status: PUBLISHED
2.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9252210/viewspace-609748/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle 19c Database Management ToolsOracleDatabase
- $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithOracleAI
- Opatch - Where Can I Find the Latest Version of Opatch?
- 如何使用git 生成patch 和打入patchGit
- LINUX 的patch 製作,及打patchLinux
- 打 patch 報錯:corrupt patch at line 36
- OPatch install "Missing command :fuser"
- OPatch failed with error code 73AIError
- Diff and Patch
- onclick="return check()" 和 onclick="check()" 區別
- 【ERROR】OPatch failed with error code 73ErrorAI
- Oracle的OPatch補丁更新Oracle
- Oracle更新Opatch故障處理Oracle
- 2.3.3.4 Application PatchAPP
- 【mos 1265700.1】Oracle Patch Assurance - Data Guard Standby-First Patch ApplyOracleAPP
- Tools and Languages
- Check if String is HappyAPP
- weblogic報錯: OPatch failed with error code 73WebAIError
- The database owner SID recorded in the master database differs from the database owner SID recorded in database 'DB_NAME'DatabaseAST
- CHECK_INTERFACE作用
- check_document_position
- Command Line Tools
- Tools_py
- chatgpt tools呼叫ChatGPT
- openGauss 支援SQL-PATCHSQL
- 如何編寫 iOS PatchiOS
- Some notes about patch workflows
- SAP WM中階Storage Type的Capacity Check – Usage check based on SUT
- ORACLE 12C opatch fuser與ChecksystemCommandAvailable failedOracleAI
- Oracle Database Cloud - Database as a Service Quick StartOracleDatabaseCloudUI
- Error querying database. XXXXXXXXXXXXX, No database selected。ErrorDatabase
- Convert a Physical Standby Database into a Snapshot Standby DatabaseDatabase
- [LintCode] Check Full Binary Tree
- Mysql replication check指令碼MySql指令碼
- Check connection related issue of mysqlMySql
- 括展actuator health check
- check memcached process and restart if downREST
- Golang Tools 介紹Golang
- JDK tools-javadocJDKJava