Verify the pbs’s in the database.

Create the pluggable database using the below command.

In the above screenshot, new pluggable database opened with errors and in restriction mode.

While verifying the alert log, the issue is with the patch. i.e., mentioned patch is installed in the pdb but not in the cdb.

So the solution is to execute the datapatch verbose.

Executing the datapatch verbose in $ORACLE_HOME/OPatch directory.

 

[oracle@patchtest admin]$ export PATH=$ORACLE_HOME/OPatch:$PATH

[oracle@patchtest dbhome_1]$ cd OPatch/

[oracle@patchtest OPatch]$ ./datapatch -verbose

SQL Patching tool version 19.25.0.0.0 Production on Tue Dec 10 23:30:10 2024

Copyright (c) 2012, 2024, Oracle.  All rights reserved.

 

Log file for this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_31897_2024_12_10_23_30_10/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 35354406 (OJVM RELEASE UPDATE: 19.20.0.0.230718 (35354406)):

Binary registry: Not installed

PDB ACDB_CLONE: Rolled back successfully on 11-JAN-24 09.23.39.213838 PM

PDB CDB$ROOT: Not installed

PDB DBTEST_PDB1: Not installed

PDB PDB$SEED: Not installed

Interim patch 35648110 (OJVM RELEASE UPDATE: 19.21.0.0.231017 (35648110)):

Binary registry: Not installed

PDB ACDB_CLONE: Rolled back successfully on 10-AUG-24 10.44.09.062903 PM

PDB CDB$ROOT: Not installed

PDB DBTEST_PDB1: Not installed

PDB PDB$SEED: Not installed

Interim patch 36334755 (TRACKING BUG FOR REGRESSION RTI 27955099 CAUSED BY JJYE_BUG-36202979 WHICH FIXED A PRODUCTION BUG):

Binary registry: Not installed

PDB ACDB_CLONE: Applied successfully on 10-AUG-24 10.45.48.389786 PM

PDB CDB$ROOT: Rolled back successfully on 10-DEC-24 08.17.09.097688 PM

PDB DBTEST_PDB1: Rolled back successfully on 10-DEC-24 08.18.05.905066 PM

PDB PDB$SEED: Rolled back successfully on 10-DEC-24 08.18.05.906482 PM

Interim patch 36334755 (TRACKING BUG FOR REGRESSION RTI 27955099 CAUSED BY JJYE_BUG-36202979 WHICH FIXED A PRODUCTION BUG):

Binary registry: Installed

PDB ACDB_CLONE: Not installed

PDB CDB$ROOT: Applied successfully on 10-DEC-24 08.17.35.755422 PM

PDB DBTEST_PDB1: Applied successfully on 10-DEC-24 08.18.18.484754 PM

PDB PDB$SEED: Applied successfully on 10-DEC-24 08.18.18.479940 PM

Interim patch 36414915 (OJVM RELEASE UPDATE: 19.24.0.0.240716 (36414915)):

Binary registry: Not installed

PDB ACDB_CLONE: Applied successfully on 10-AUG-24 10.44.09.187581 PM

PDB CDB$ROOT: Rolled back successfully on 10-DEC-24 08.17.06.824161 PM

PDB DBTEST_PDB1: Rolled back successfully on 10-DEC-24 08.18.05.403045 PM

PDB PDB$SEED: Rolled back successfully on 10-DEC-24 08.18.05.434622 PM

Interim patch 36878697 (OJVM RELEASE UPDATE: 19.25.0.0.241015 (36878697)):

Binary registry: Installed

PDB ACDB_CLONE: Not installed

PDB CDB$ROOT: Applied successfully on 10-DEC-24 08.17.06.939969 PM

PDB DBTEST_PDB1: Applied successfully on 10-DEC-24 08.18.05.528582 PM

PDB PDB$SEED: Applied successfully on 10-DEC-24 08.18.05.545322 PM

 

Current state of release update SQL patches:

Binary registry:

19.25.0.0.0 Release_Update 241010184253: Installed

PDB ACDB_CLONE:

Applied 19.24.0.0.0 Release_Update 240627235157 successfully on 10-AUG-24 10.45.40.579947 PM

PDB CDB$ROOT:

Applied 19.25.0.0.0 Release_Update 241010184253 successfully on 10-DEC-24 08.17.29.457580 PM

PDB DBTEST_PDB1:

Applied 19.25.0.0.0 Release_Update 241010184253 successfully on 10-DEC-24 08.18.15.820277 PM

PDB PDB$SEED:

Applied 19.25.0.0.0 Release_Update 241010184253 successfully on 10-DEC-24 08.18.15.820280 PM

 

Adding patches to installation queue and performing prereq checks…done

Installation queue:

For the following PDBs: CDB$ROOT PDB$SEED DBTEST_PDB1

No interim patches need to be rolled back

No release update patches need to be installed

No interim patches need to be applied

For the following PDBs: ACDB_CLONE

The following interim patches will be rolled back:

36414915 (OJVM RELEASE UPDATE: 19.24.0.0.240716 (36414915))

36334755 (TRACKING BUG FOR REGRESSION RTI 27955099 CAUSED BY JJYE_BUG-36202979 WHICH FIXED A PRODUCTION BUG)

Patch 36912597 (Database Release Update : 19.25.0.0.241015 (36912597)):

Apply from 19.24.0.0.0 Release_Update 240627235157 to 19.25.0.0.0 Release_Update 241010184253

The following interim patches will be applied:

36878697 (OJVM RELEASE UPDATE: 19.25.0.0.241015 (36878697))

36334755 (TRACKING BUG FOR REGRESSION RTI 27955099 CAUSED BY JJYE_BUG-36202979 WHICH FIXED A PRODUCTION BUG)

 

Installing patches…

Patch installation complete.  Total patches installed: 5

 

Validating logfiles…done

Patch 36414915 rollback (pdb ACDB_CLONE): SUCCESS

logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/36414915/25700138/36414915_rollback_DBTEST_ACDB_CLONE_2024Dec10_23_30_36.log (no errors)

Patch 36334755 rollback (pdb ACDB_CLONE): SUCCESS

logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/36334755/25776432/36334755_rollback_DBTEST_ACDB_CLONE_2024Dec10_23_30_43.log (no errors)

Patch 36912597 apply (pdb ACDB_CLONE): SUCCESS

logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/36912597/25871884/36912597_apply_DBTEST_ACDB_CLONE_2024Dec10_23_30_43.log (no errors)

Patch 36878697 apply (pdb ACDB_CLONE): SUCCESS

logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/36878697/25797620/36878697_apply_DBTEST_ACDB_CLONE_2024Dec10_23_30_43.log (no errors)

Patch 36334755 apply (pdb ACDB_CLONE): SUCCESS

logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/36334755/25858167/36334755_apply_DBTEST_ACDB_CLONE_2024Dec10_23_30_55.log (no errors)

 

Automatic recompilation incomplete; run utlrp.sql to revalidate.

PDBs: ACDB_CLONE

SQL Patching tool complete on Tue Dec 10 23:30:58 2024

[oracle@patchtest OPatch]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 – Production on Tue Dec 10 23:31:21 2024

Version 19.25.0.0.0

Copyright (c) 1982, 2024, Oracle.  All rights reserved.

Connected to:

Oracle Database 19c EE High Perf Release 19.0.0.0.0 – Production

Version 19.25.0.0.0

SQL> @?/rdbms/admin/utlrp.sql

Session altered.

TIMESTAMP

——————————————————————————–

COMP_TIMESTAMP UTLRP_BGN              2024-12-10 23:31:35

DOC>   The following PL/SQL block invokes UTL_RECOMP to recompile invalid

DOC>   objects in the database. Recompilation time is proportional to the

DOC>   number of invalid objects in the database, so this command may take

DOC>   a long time to execute on a database with a large number of invalid

DOC>   objects.

DOC>

DOC>   Use the following queries to track recompilation progress:

DOC>

DOC>   1. Query returning the number of invalid objects remaining. This

DOC>      number should decrease with time.

DOC>         SELECT COUNT(*) FROM obj$ WHERE status IN (4, 5, 6);

DOC>

DOC>   2. Query returning the number of objects compiled so far. This number

DOC>      should increase with time.

DOC>         SELECT COUNT(*) FROM UTL_RECOMP_COMPILED;

DOC>

DOC>   This script automatically chooses serial or parallel recompilation

DOC>   based on the number of CPUs available (parameter cpu_count) multiplied

DOC>   by the number of threads per CPU (parameter parallel_threads_per_cpu).

DOC>   On RAC, this number is added across all RAC nodes.

DOC>

DOC>   UTL_RECOMP uses DBMS_SCHEDULER to create jobs for parallel

DOC>   recompilation. Jobs are created without instance affinity so that they

DOC>   can migrate across RAC nodes. Use the following queries to verify

DOC>   whether UTL_RECOMP jobs are being created and run correctly:

DOC>

DOC>   1. Query showing jobs created by UTL_RECOMP

DOC>         SELECT job_name FROM dba_scheduler_jobs

DOC>            WHERE job_name like ‘UTL_RECOMP_SLAVE_%’;

DOC>

DOC>   2. Query showing UTL_RECOMP jobs that are running

DOC>         SELECT job_name FROM dba_scheduler_running_jobs

DOC>            WHERE job_name like ‘UTL_RECOMP_SLAVE_%’;

DOC>#

PL/SQL procedure successfully completed.

TIMESTAMP

——————————————————————————–

COMP_TIMESTAMP UTLRP_END              2024-12-10 23:31:36

DOC> The following query reports the number of invalid objects.

DOC>

DOC> If the number is higher than expected, please examine the error

DOC> messages reported with each object (using SHOW ERRORS) to see if they

DOC> point to system misconfiguration or resource constraints that must be

DOC> fixed before attempting to recompile these objects.

DOC>#

OBJECTS WITH ERRORS

——————-

0

DOC> The following query reports the number of exceptions caught during

DOC> recompilation. If this number is non-zero, please query the error

DOC> messages in the table UTL_RECOMP_ERRORS to see if any of these errors

DOC> are due to misconfiguration or resource constraints that must be

DOC> fixed before objects can compile successfully.

DOC> Note: Typical compilation errors (due to coding errors) are not

DOC>       logged into this table: they go into DBA_ERRORS instead.

DOC>#

ERRORS DURING RECOMPILATION

—————————

0

Function created.

PL/SQL procedure successfully completed.

Function dropped.

PL/SQL procedure successfully completed.

 

Bounce the database.

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

 

SQL> startup

ORACLE instance started.

Total System Global Area 1.5569E+10 bytes

Fixed Size                  9196304 bytes

Variable Size            2214592512 bytes

Database Buffers         1.3187E+10 bytes

Redo Buffers              158572544 bytes

Database mounted.

Database opened.

 

SQL> show pdbs

CON_ID CON_NAME                       OPEN MODE  RESTRICTED

———- —————————— ———- ———-

2 PDB$SEED                       READ ONLY  NO

3 DBTEST_PDB1                    READ WRITE NO

4 ACDB_CLONE                     READ WRITE NO

 

Now the pluggable database is not in restricted mode.

Recent Posts

Start typing and press Enter to search