Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

[PSU] Oracle hits PSU and uninstalls PSU (single instance)

2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

I. Planning

Database version: Oracle 11.2.0.4 single instance

Operating system: Redhat 6.5 64-bit

PSU: p28204707_112040_Linux-x86-64.zip

OPatch: p6880880_112000_Linux-x86-64.zip

Second, clear thinking 1. Play PSU

Step1: environmental check before PSU

Step2: full database backup before PSU

Step3: upload PSU package

Step4: read README.html

Step5: update Opatch if necessary

Step6: software hits PSU

Step7: database beat PSU

Step8: check after playing PSU

two。 Uninstall PSU

Step1: uninstall the software PSU

Step2: uninstalling database PSU

Step3: check after uninstalling PSU

Matters needing attention 1. Read the Readme documentation

Every CPU/PSU has an Readme document, and the information about that CPU/PSU is in the Readme document. Be sure to read it carefully before typing CPU/PSU.

2. Opatch

You need to use Opatch tools to play PSU. The version of Opatch must meet the version requirements in the patch pack readme documentation, otherwise the Opatch version needs to be upgraded.

View opatch version

$cd $ORACLE_HOME/OPatch

$. / opatch version

4. Prepare for PSU 1. Check instance status

SQL > select instance_name,status from v$instance

INSTANCE_NAME STATUS

--

Orcl OPEN

two。 Check the database version

SQL > select * from v$version

BANNER

-Oracle Database 11g Enterprise Edition Release 11.2.0.4.0-64bit Production

PL/SQL Release 11.2.0.4.0-Production

CORE 11.2.0.4.0 Production

TNS for Linux: Version 11.2.0.4.0-Production

NLSRTL Version 11.2.0.4.0-Production

3. Check the PSU situation

SQL > set linesize 200

SQL > col comments for A30

SQL > select ACTION_TIME, ACTION, COMMENTS from sys.DBA_REGISTRY_HISTORY

ACTION_TIME ACTION COMMENTS

24-AUG-13 12.03.45.119862 PM APPLY Patchset 11.2.0.2.0

30-JUL-18 10.04.26.133727 AM APPLY Patchset 11.2.0.2.0

4. View invalid object

SQL > select count (*) from dba_objects where status'VALID'

SQL > select object_name,object_type,owner,status from dba_objects where status'VALID'

5. Determine if the currently existing one-off patch conflicts with PSU

$unzip p28204707_112040_Linux-x86-64.zip

$cd 28204707

$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail-ph. /

6. Database backup

It is recommended to make a full RMAN backup of the database before patching to avoid accidental patching and can be restored from the backup.

5. Patch 1. Upload the patch pack and decompress it

$unzip p28204707_112040_Linux-x86-64.zip

two。 View the current OPatch version

$cd / u01/app/oracle/product/11.2.0/db_1/OPatch/

$. / opatch version

OPatch Version: 11.2.0.3.4

3. Update Opatch

If you find that the Opatch version is low, download the latest Opatch and overwrite the original Opatch

$ls

P6880880_112000_Linux-x86-64.zip

$mv $ORACLE_HOME/OPatch $ORACLE_HOME/OPatch_bak20200804

$cp-r OPatch $ORACLE_HOME/

$cd / u01/app/oracle/product/11.2.0/db_1/OPatch

$. / opatch version

OPatch Version: 11.2.0.3.18

4. Play PSU

1) close Instance and listener

SQL > shutdown immediate

SQL > exit

$lsnrctl stop

2) View the current PSU version

$$ORACLE_HOME/OPatch/opatch lsinv

3) install PSU (software PSU)

$pwd

/ home/oracle/28204707

$$ORACLE_HOME/OPatch/opatch apply

In the end, there may be warnings, which can be ignored. If it's error, you can't ignore it.

4) install PSU (database PSU)

$cd $ORACLE_HOME/rdbms/admin

$sqlplus / nolog

SQL > CONNECT / AS SYSDBA

SQL > STARTUP

SQL > @ catbundle.sql psu apply

SQL > QUIT

5) if there is OJVM PSU in the previous PSU, then we can see some invalid JAVA classes after executing catbundle.sql, in which case, run the following command

$cd $ORACLE_HOME/rdbms/admin

$sqlplus / nolog

SQL > CONNECT / AS SYSDBA

SQL > @ utlrp.sql

6) check the patch log to see if there is any error

$cd / u01/app/oracle/cfgtoollogs/catbundle

Catbundle_PSU_ _ APPLY_ .log

Catbundle_PSU_ _ GENERATE_ .log

7) check

$cd / u01/app/oracle/product/11.2.0/db_1/OPatch

$. / opatch lsinv

Patch 28204707: applied on Tue Aug 04 13:15:43 EDT 2020

Unique Patch ID: 22491169

Patch description: "Database Patch Set Update: 11.2.0.4.181016 (28204707)"

Created on 19 Sep 2018, 03:24:06 hrs PST8PDT

SQL > select COMP_ID,COMP_NAME,VERSION,STATUS from DBA_REGISTRY

SQL > select ACTION_TIME, ACTION, COMMENTS from DBA_REGISTRY_HISTORY

SQL > select owner,object_name,object_type,status from dba_objects where status'VALID'

SQL > select count (*) from dba_objects where status'VALID'

6. Uninstall PSU1. Uninstall the software PSU

1) check whether the file exists

$ORACLE_HOME/rdbms/admin/catbundle_PSU__ROLLBACK.sql

2) turn off instance and monitoring

SQL > shutdown immediate

SQL > exit

$lsnrctl stop

3) execute the uninstall command

$cd $ORACLE_HOME/OPatch

$. / opatch rollback-id 28204707

In the end, there may be warnings, which can be ignored. If it's error, you can't ignore it.

two。 Uninstall database PSU

$cd $ORACLE_HOME/rdbms/admin

$sqlplus / nolog

SQL > CONNECT / AS SYSDBA

SQL > STARTUP

SQL > @ catbundle_PSU_ _ ROLLBACK.sql

SQL > QUIT

3. Compile invalid object

If there is OJVM PSU in the previous PSU, then we can see some invalid JAVA classes after executing catbundle.sql, in which case, run the following command

$cd $ORACLE_HOME/rdbms/admin

$sqlplus / nolog

SQL > CONNECT / AS SYSDBA

SQL > @ utlrp.sql

4. Check the log

$cd / u01/app/oracle/cfgtoollogs/catbundle

Catbundle_PSU__ROLLBACK_.log

-end

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report