job-bug问题Delete On SYS.SCHEDULER$_DBMSJOB_MAP Causing Row Locks (Doc ID 2645984.1)查看:https://blog.csdn.net/jycjyc/article/details/107659227
[root@rac1 ~]# cd /patch
[root@rac1 patch]# ll
total 236
drwxrwxrwx 3 grid oinstall 45 Jul 22 15:26 31326369
-rw-r--r-- 1 root root 239935 Jul 29 11:18 p30835853_198000DBRU_Linux-x86-64.zip
[root@rac1 patch]# chown oracle:oinstall p30835853_198000DBRU_Linux-x86-64.zip
[root@rac1 patch]# su - oracle
Last login: Tue Jul 28 22:35:15 CST 2020 on pts/0
[oracle@rac1 ~]$ cd /patch/
[oracle@rac1 patch]$ ls
31326369 p30835853_198000DBRU_Linux-x86-64.zip
[oracle@rac1 patch]$ unzip p30835853_198000DBRU_Linux-x86-64.zip
Archive: p30835853_198000DBRU_Linux-x86-64.zip
creating: 30835853/
creating: 30835853/etc/
creating: 30835853/etc/config/
inflating: 30835853/etc/config/actions.xml
inflating: 30835853/etc/config/inventory.xml
inflating: 30835853/README.txt
creating: 30835853/files/
creating: 30835853/files/lib/
creating: 30835853/files/lib/libserver19.a/
inflating: 30835853/files/lib/libserver19.a/jskc.o
creating: 30835853/files/sqlpatch/
creating: 30835853/files/sqlpatch/30835853/
creating: 30835853/files/sqlpatch/30835853/23614142/
inflating: 30835853/files/sqlpatch/30835853/23614142/30835853_apply.sql
creating: 30835853/files/sqlpatch/30835853/23614142/rollback_files/
creating: 30835853/files/sqlpatch/30835853/23614142/rollback_files/19.8.0.0.0-RU-Release_Update-200614105333/
creating: 30835853/files/sqlpatch/30835853/23614142/rollback_files/19.8.0.0.0-RU-Release_Update-200614105333/rdbms/
creating: 30835853/files/sqlpatch/30835853/23614142/rollback_files/19.8.0.0.0-RU-Release_Update-200614105333/rdbms/admin/
inflating: 30835853/files/sqlpatch/30835853/23614142/rollback_files/19.8.0.0.0-RU-Release_Update-200614105333/rdbms/admin/prvtbsch.plb
inflating: 30835853/files/sqlpatch/30835853/23614142/30835853_rollback.sql
inflating: 30835853/files/sqlpatch/30835853/23614142/30835853.xml
creating: 30835853/files/rdbms/
creating: 30835853/files/rdbms/admin/
inflating: 30835853/files/rdbms/admin/prvtbsch.plb
inflating: PatchSearch.xml
[oracle@rac1 patch]$ ll
total 240
drwxr-xr-x 4 oracle oinstall 48 Jun 22 04:34 30835853
drwxrwxrwx 3 grid oinstall 45 Jul 22 15:26 31326369
-rw-r--r-- 1 oracle oinstall 239935 Jul 29 11:18 p30835853_198000DBRU_Linux-x86-64.zip
-rw-rw-r-- 1 oracle oinstall 2956 Jun 22 19:34 PatchSearch.xml
[oracle@rac1 patch]$ pwd
/patch
[oracle@rac1 patch]$ scp -rp 30835853 rac2:/patch/
actions.xml 100% 1776 1.8MB/s 00:00
inventory.xml 100% 1991 2.9MB/s 00:00
README.txt 100% 6825 10.2MB/s 00:00
jskc.o 100% 186KB 69.8MB/s 00:00
30835853_apply.sql 100% 1370 2.4MB/s 00:00
prvtbsch.plb 100% 111KB 59.4MB/s 00:00
30835853_rollback.sql 100% 1379 1.9MB/s 00:00
30835853.xml 100% 916 1.4MB/s 00:00
prvtbsch.plb 100% 111KB 22.0MB/s 00:00
[oracle@rac1 patch]$ opatch lspatches
31219897;OJVM RELEASE UPDATE: 19.8.0.0.200714 (31219897)
31305087;OCW RELEASE UPDATE 19.8.0.0.0 (31305087)
31281355;Database Release Update : 19.8.0.0.200714 (31281355)
OPatch succeeded.
[oracle@rac1 patch]$ pwd
/patch
[oracle@rac1 patch]$ ls
30835853 31326369 p30835853_198000DBRU_Linux-x86-64.zip PatchSearch.xml
[oracle@rac1 patch]$ cd 30835853/
[oracle@rac1 30835853]$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 12.2.0.1.21
Copyright (c) 2020, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /oracle/app/oracle/product/19c/dbhome_1
Central Inventory : /oracle/app/oraInventory
from : /oracle/app/oracle/product/19c/dbhome_1/oraInst.loc
OPatch version : 12.2.0.1.21
OUI version : 12.2.0.7.0
Log file location : /oracle/app/oracle/product/19c/dbhome_1/cfgtoollogs/opatch/opatch2020-07-29_12-27-45PM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
[oracle@rac1 30835853]$ srvctl stop database -d orcl
[oracle@rac1 30835853]$ opatch apply
Oracle Interim Patch Installer version 12.2.0.1.21
Copyright (c) 2020, Oracle Corporation. All rights reserved.
Oracle Home : /oracle/app/oracle/product/19c/dbhome_1
Central Inventory : /oracle/app/oraInventory
from : /oracle/app/oracle/product/19c/dbhome_1/oraInst.loc
OPatch version : 12.2.0.1.21
OUI version : 12.2.0.7.0
Log file location : /oracle/app/oracle/product/19c/dbhome_1/cfgtoollogs/opatch/opatch2020-07-29_12-28-51PM_1.log
Verifying environment and performing prerequisite checks...
OPatch continues with these patches: 30835853
Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/oracle/app/oracle/product/19c/dbhome_1')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '30835853' to OH '/oracle/app/oracle/product/19c/dbhome_1'
Patching component oracle.rdbms.dbscripts, 19.0.0.0.0...
Patching component oracle.rdbms, 19.0.0.0.0...
Patch 30835853 successfully applied.
Log file location: /oracle/app/oracle/product/19c/dbhome_1/cfgtoollogs/opatch/opatch2020-07-29_12-28-51PM_1.log
OPatch succeeded.
[oracle@rac1 30835853]$ ssh rac2
Last login: Tue Jul 28 22:02:25 2020 from rac1
[oracle@rac2 ~]$ cd /patch
[oracle@rac2 patch]$ ls
30835853 31326369
[oracle@rac2 patch]$ cd 30835853/
[oracle@rac2 30835853]$ opatch apply
Oracle Interim Patch Installer version 12.2.0.1.21
Copyright (c) 2020, Oracle Corporation. All rights reserved.
Oracle Home : /oracle/app/oracle/product/19c/dbhome_1
Central Inventory : /oracle/app/oraInventory
from : /oracle/app/oracle/product/19c/dbhome_1/oraInst.loc
OPatch version : 12.2.0.1.21
OUI version : 12.2.0.7.0
Log file location : /oracle/app/oracle/product/19c/dbhome_1/cfgtoollogs/opatch/opatch2020-07-29_12-30-05PM_1.log
Verifying environment and performing prerequisite checks...
OPatch continues with these patches: 30835853
Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/oracle/app/oracle/product/19c/dbhome_1')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '30835853' to OH '/oracle/app/oracle/product/19c/dbhome_1'
Patching component oracle.rdbms.dbscripts, 19.0.0.0.0...
Patching component oracle.rdbms, 19.0.0.0.0...
Patch 30835853 successfully applied.
Log file location: /oracle/app/oracle/product/19c/dbhome_1/cfgtoollogs/opatch/opatch2020-07-29_12-30-05PM_1.log
OPatch succeeded.
[oracle@rac2 30835853]$ opatch lspatches
30835853;DBMS_JOB.SUBMIT PROCEDURE BEHAVIOR CHANGE IN 19C
31219897;OJVM RELEASE UPDATE: 19.8.0.0.200714 (31219897)
31305087;OCW RELEASE UPDATE 19.8.0.0.0 (31305087)
31281355;Database Release Update : 19.8.0.0.200714 (31281355)
OPatch succeeded.
[oracle@rac2 30835853]$ exit
logout
Connection to rac2 closed.
[oracle@rac1 30835853]$ opatch lspatches
30835853;DBMS_JOB.SUBMIT PROCEDURE BEHAVIOR CHANGE IN 19C
31219897;OJVM RELEASE UPDATE: 19.8.0.0.200714 (31219897)
31305087;OCW RELEASE UPDATE 19.8.0.0.0 (31305087)
31281355;Database Release Update : 19.8.0.0.200714 (31281355)
OPatch succeeded.
[oracle@rac1 30835853]$ srvctl start database -d orcl
[oracle@rac1 30835853]$ cd $ORACLE_HOME/OPatch
[oracle@rac1 OPatch]$ ./datapatch -verbose
SQL Patching tool version 19.8.0.0.0 Production on Wed Jul 29 12:33:00 2020
Copyright (c) 2012, 2020, Oracle. All rights reserved.
Log file for this invocation: /oracle/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_16347_2020_07_29_12_33_00/sqlpatch_invocation.log
Connecting to database...OK
Gathering database info...done
Note: Datapatch will only apply or rollback SQL fixes for PDBs
that are in an open state, no patches will be applied to closed PDBs.
Please refer to Note: Datapatch: Database 12c Post Patch SQL Automation
(Doc ID 1585822.1)
Bootstrapping registry and package to current versions...done
Determining current state...done
Current state of interim SQL patches:
Interim patch 30835853 (DBMS_JOB.SUBMIT PROCEDURE BEHAVIOR CHANGE IN 19C):
Binary registry: Installed
PDB CDB$ROOT: Not installed
PDB PDB: Not installed
PDB PDB$SEED: Not installed
Interim patch 31219897 (OJVM RELEASE UPDATE: 19.8.0.0.200714 (31219897)):
Binary registry: Installed
PDB CDB$ROOT: Applied successfully on 28-JUL-20 10.15.21.672220 PM
PDB PDB: Applied successfully on 28-JUL-20 10.15.21.705940 PM
PDB PDB$SEED: Applied successfully on 28-JUL-20 10.15.21.687311 PM
Current state of release update SQL patches:
Binary registry:
19.8.0.0.0 Release_Update 200703031501: Installed
PDB CDB$ROOT:
Applied 19.8.0.0.0 Release_Update 200703031501 successfully on 27-JUL-20 09.52.49.305000 PM
PDB PDB:
Applied 19.8.0.0.0 Release_Update 200703031501 successfully on 27-JUL-20 09.52.52.237480 PM
PDB PDB$SEED:
Applied 19.8.0.0.0 Release_Update 200703031501 successfully on 27-JUL-20 09.52.53.065046 PM
Adding patches to installation queue and performing prereq checks...done
Installation queue:
For the following PDBs: CDB$ROOT PDB$SEED PDB
No interim patches need to be rolled back
No release update patches need to be installed
The following interim patches will be applied:
30835853 (DBMS_JOB.SUBMIT PROCEDURE BEHAVIOR CHANGE IN 19C)
Installing patches...
Patch installation complete. Total patches installed: 3
Validating logfiles...done
Patch 30835853 apply (pdb CDB$ROOT): SUCCESS
logfile: /oracle/app/oracle/cfgtoollogs/sqlpatch/30835853/23614142/30835853_apply_ORCL_CDBROOT_2020Jul29_12_33_40.log (no errors)
Patch 30835853 apply (pdb PDB$SEED): SUCCESS
logfile: /oracle/app/oracle/cfgtoollogs/sqlpatch/30835853/23614142/30835853_apply_ORCL_PDBSEED_2020Jul29_12_33_44.log (no errors)
Patch 30835853 apply (pdb PDB): SUCCESS
logfile: /oracle/app/oracle/cfgtoollogs/sqlpatch/30835853/23614142/30835853_apply_ORCL_PDB_2020Jul29_12_33_44.log (no errors)
SQL Patching tool complete on Wed Jul 29 12:49:35 2020
[oracle@rac1 OPatch]$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Wed Jul 29 12:50:05 2020
Version 19.8.0.0.0
Copyright (c) 1982, 2020, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.8.0.0.0
SQL> show pdbs;
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 PDB READ WRITE NO
SQL> set line 160
SQL> set wrap off
SQL> select patch_id,action,status,ACTION_TIME from dba_registry_sqlpatch;
PATCH_ID ACTION STATUS ACTION_TIME
---------- --------------- ------------------------- ---------------------------------------------------------------------------
29517242 APPLY SUCCESS 26-JUL-20 12.14.21.091505 PM
31281355 APPLY SUCCESS 27-JUL-20 09.52.49.305000 PM
31219897 APPLY SUCCESS 28-JUL-20 10.15.21.672220 PM
30835853 APPLY SUCCESS 29-JUL-20 12.49.27.769237 PM
SQL> alter session set container=pdb;
Session altered.
SQL> select patch_id,action,status,ACTION_TIME from dba_registry_sqlpatch;
PATCH_ID ACTION STATUS ACTION_TIME
---------- --------------- ------------------------- ---------------------------------------------------------------------------
29517242 APPLY SUCCESS 26-JUL-20 12.21.57.588343 PM
31281355 APPLY SUCCESS 27-JUL-20 09.52.52.237480 PM
31219897 APPLY SUCCESS 28-JUL-20 10.15.21.705940 PM
30835853 APPLY SUCCESS 29-JUL-20 12.49.27.810132 PM
SQL> select count(*) from dba_objects where status='INVALID';
COUNT(*)
----------
0
SQL> show pdbs;
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
3 PDB READ WRITE NO
SQL> conn /as sysdba
Connected.
SQL> show pdbs;
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 PDB READ WRITE NO
SQL> select count(*) from dba_objects where status='INVALID';
COUNT(*)
----------
0
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.8.0.0.0