PSU是linux下的说法
Bundle Patch是windows下的说法
dataguard 备机的话只需要下面1、4和5中opatch apply这一个步骤
1.升级OPatch软件
cd $ORACLE_HOME;
mv OPatch OPatch.old;
unzip p6880880_112000_Linux-x86-64.zip
$ORACLE_HOME/OPatch/opatch version
2.整库备份
3.备份失效对象
cd $ORACLE_HOME/rdbms/admin
sqlplus>@utlrp.sql
sqlplus>create table invalid_20170101 as select * from dba_objects where status<>'VALID'
4.关闭监听和数据库(如果有standby库,把standby库也关闭,打完补丁启动成功后再去打standby库)
lsnrctl stop listenername
sqlplus>shutdown immediate
5.打补丁
cd 24006111
$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
打补丁过程不报错
打完补丁后再查看失效对象,看是否和之前备份的表中记录一致
Bundle Patch是windows下的说法
dataguard 备机的话只需要下面1、4和5中opatch apply这一个步骤
1.升级OPatch软件
cd $ORACLE_HOME;
mv OPatch OPatch.old;
unzip p6880880_112000_Linux-x86-64.zip
$ORACLE_HOME/OPatch/opatch version
2.整库备份
3.备份失效对象
cd $ORACLE_HOME/rdbms/admin
sqlplus>@utlrp.sql
sqlplus>create table invalid_20170101 as select * from dba_objects where status<>'VALID'
4.关闭监听和数据库(如果有standby库,把standby库也关闭,打完补丁启动成功后再去打standby库)
lsnrctl stop listenername
sqlplus>shutdown immediate
5.打补丁
cd 24006111
$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
打补丁过程不报错
打完补丁后再查看失效对象,看是否和之前备份的表中记录一致
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/30126024/viewspace-2133752/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/30126024/viewspace-2133752/