PSU和Bundle Patch安裝概要
阿新 • • 發佈:2018-12-07
PSU是linux下的說法
Bundle Patch是windows下的說法
dataguard 備機的話只需要下面1、4和5中opatch apply這一個步驟
1.升級OPatch軟體
mv OPatch OPatch.old;
unzip p6880880_112000_Linux-x86-64.zip
$ORACLE_HOME/OPatch/opatch version
2.整庫備份
3.備份失效物件
sqlplus>@utlrp.sql
sqlplus>create table invalid_20170101 as select * from dba_objects where status<>'VALID'
4.關閉監聽和資料庫(如果有standby庫,把standby庫也關閉,打完補丁啟動成功後再去打standby庫)
sqlplus>shutdown immediate
5.打補丁
$ORACLE_HOME/OPatch/opatch apply
cd $ORACLE_HOME/rdbms/admin
sqlplus / as sysdba
sqlplus>startup
sqlplus>@catbundle.sql psu apply
sqlplus>@utlrp.sql
官方文件提供的windows的步驟
Perform a clean shutdown of all (databases, Oracle listeners, Oracle agents, and so on.) that run from the Oracle Home where you install this patch.
Stop all Oracle services, Recovery catalog, ODBC applications, and other applications that use Oracle Client. This may include Web servers that load the Oracle client in the mid-tier environment
net stop msdtc
set PATH=%ORACLE_HOME%\perl\bin;%PATH%
Shut down all instances and listeners associated with the Oracle home that you are updating
unzip p24922870_112040_.zip
cd 24922870
opatch apply
cd %ORACLE_HOME%\rdbms\admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catbundle.sql PSU apply
SQL> QUIT
官方文件提供的linux的步驟
If you are using a Data Guard Physical Standby database, you must install this patch on both the primary database and the physical standby database
If this is not a Oracle RAC environment, shut down all instances and listeners associated with the Oracle home that you are updating
unzip p24006111_112040_.zip
cd 24006111
opatch apply
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catbundle.sql psu apply
SQL> QUIT
6.啟動監聽和檢查
lsnrctl start listenername
$ORACLE_HOME/OPatch/opatch version
$ORACLE_HOME/OPatch/opatch lsinventory
打補丁過程不報錯
打完補丁後再檢視失效物件,看是否和之前備份的表中記錄一致