手动打PSU的步骤

Execute the following on each node of the cluster in non-shared CRS and DB home environment to apply the patch.

1.    Stop the CRS managed resources running from DB homes.

If this is a GI Home environment, as the database home owner execute:

$ <ORACLE_HOME>/bin/srvctl stop home -o <ORACLE_HOME> -s <status file location> -n <node name>

If this is an Oracle Restart Home environment, as the database home owner execute:

$ <ORACLE_HOME>/bin/srvctl stop home -o <ORACLE_HOME> -s <status file location>

 

Note:

You need to make sure that the Oracle ACFS file systems are unmounted (see Section 2.8) and all other Oracle processes are shutdown before you proceed.

 

2.    Run the pre root script.

If this is a GI Home, as the root user execute:

# <GI_HOME>/crs/install/rootcrs.pl -prepatch

If this is an Oracle Restart Home, as the root user execute:

# <GI_HOME>/crs/install/roothas.pl -prepatch

3.    Patch GI home.

As the GI home owner execute:

$ <GI_HOME>/OPatch/opatch apply -oh <GI_HOME> -local <UNZIPPED_PATCH_LOCATION>/%BUGNO%/%OCW TRACKING BUG%

$ <GI_HOME>/OPatch/opatch apply -oh <GI_HOME> -local <UNZIPPED_PATCH_LOCATION>/%BUGNO%/%ACFS TRACKING BUG%

$ <GI_HOME>/OPatch/opatch apply -oh <GI_HOME> -local <UNZIPPED_PATCH_LOCATION>/%BUGNO%/%DBWLM TRACKING BUG%

$ <GI_HOME>/OPatch/opatch apply -oh <GI_HOME> -local <UNZIPPED_PATCH_LOCATION>/%BUGNO%/%RDBMS PSU TRACKING BUG%

4.    Patch DB home.

As the database home owner execute:

$ <UNZIPPED_PATCH_LOCATION>/%BUGNO%/%OCW TRACKING BUG%/custom/scripts/prepatch.sh -dbhome <ORACLE_HOME>

$ <ORACLE_HOME>/OPatch/opatch apply -oh <ORACLE_HOME> -local <UNZIPPED_PATCH_LOCATION>/%BUGNO%/%OCW TRACKING BUG%

$ <ORACLE_HOME>/OPatch/opatch apply -oh <ORACLE_HOME> -local <UNZIPPED_PATCH_LOCATION>/%BUGNO%/%RDBMS PSU TRACKING BUG%

$ <UNZIPPED_PATCH_LOCATION>/%BUGNO%/%OCW TRACKING BUG%/custom/scripts/postpatch.sh -dbhome <ORACLE_HOME>  

5.    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 -postpatch

If this is an Oracle Restart Home, as the root user execute:

# <GI_HOME>/crs/install/roothas.pl -postpatch

6.    If the message, "A system reboot is recommended before using ACFS is shown, then a reboot must be issued before continuing. Failure to do so will result in running with an unpatched ACFS\ADVM\OKS driver.

7.    Start the CRS managed resources that were earlier running from DB homes.

If this is a GI Home environment, as the database home owner execute:

$ <ORACLE_HOME>/bin/srvctl start home -o <ORACLE_HOME> -s <status file location> -n <node name>

If this is an Oracle Restart Home environment, as the database home owner execute:

$ <ORACLE_HOME>/bin/srvctl start home -o <ORACLE_HOME> -s <status file location> 
 
8. For each database instance running on the Oracle home being patched, run the datapatch utility as described in next table.
 

Table 3: Steps to Run the datapatch Utility for Single Tenant Versus Multitenant (CDB/PDB)

Steps

Single Tenant (non-CDB/PDB)

Steps

Multitenant (CDB/PDB)

1

% sqlplus /nolog

1

% sqlplus /nolog

2

SQL> Connect / as sysdba

2

SQL> Connect / as sysdba

3

SQL> startup

3

SQL> startup

4

SQL> quit

4

SQL> alter pluggable database all open;Foot 1 

5

% cd $ORACLE_HOME/OPatch

5

SQL> quit

6

% ./datapatch -verbose

6

% cd $ORACLE_HOME/OPatch

  

7

% ./datapatch -verbose 

It is recommended the Post Install step be run on all pluggable databases; however, the following command (SQL> alter pluggable databasePDB_NAME open ) could be substituted to only open certain PDBs in the multitenant database. Doing so will result in the Post Install step only being run on the CDB and opened PDB's. To update a pluggable database at a later date (skipped or newly plugged in), open the database using the alter pluggable database command mentioned previously and rerun the datapatch utility.

The datapatch utility will then run the necessary rollback scripts. An entry will be added to the dba_registry_sqlpatch view reflecting the patch rollback.

Check the following log files in $ORACLE_HOME/sqlpatch/patch ID/ for errors:

patch ID_apply_<database SID>_<CDB name>_<timestamp>.log

where database SID is the database SID, CDB name is the name of the multitenant container database, and timestamp is of the form YYYYMMMDD_HH_MM_SS.

In addition, you can check the log files found in $ORACLE_BASE/cfgtoollogs/catbundle and is named catbundle_PSU_<database SID>_ROLLBACK_<TIMESTAMP>.log where TIMESTAMP is of the form YYYYMMMDD_HH_MM_SS.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值