0% found this document useful (0 votes)
363 views

How To Fix - PDB in Restricted - Database Blog

This document describes how to fix a PDB that is in restricted mode after a database restart. The steps taken were: 1. Check for PDB_PLUG_IN_VIOLATIONS which showed SQL patches were installed in the CDB but not the PDB. 2. Run datapatch to install missing patches in the PDB. 3. Check dba_registry_sqlpatch and saw the July 2020 patch was applied with errors twice in the PDB. 4. The datapatch command did not resolve the issue so the PDB was closed and reopened to fix it.

Uploaded by

senthil kumar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
363 views

How To Fix - PDB in Restricted - Database Blog

This document describes how to fix a PDB that is in restricted mode after a database restart. The steps taken were: 1. Check for PDB_PLUG_IN_VIOLATIONS which showed SQL patches were installed in the CDB but not the PDB. 2. Run datapatch to install missing patches in the PDB. 3. Check dba_registry_sqlpatch and saw the July 2020 patch was applied with errors twice in the PDB. 4. The datapatch command did not resolve the issue so the PDB was closed and reopened to fix it.

Uploaded by

senthil kumar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

5/9/23, 3:04 PM How To fix: PDB in restricted – Database Blog

 / Oracle / How To fix: PDB in restricted

How To fix: PDB in restricted


Alex written 2 years ago    3

This is a weird case we had for a Customer where DB/PDB’s were running fine and after a restart,
To search, type and hit en 
one of the PDB’s went to restricted YES.
We don’t know why it went to restricted mode because there hasn’t been a patching activity for a
while and DB had few restarts in the past with no issues. Recent Posts
We did not manage to know how this happened, but this is how we fixed. DBCA create DB fails with: ORA-15001:
diskgroup “DATA” does not exist or is not
INST HOST INST_NAME STATUS DB_ROLE OPEN_MODE STARTUP_TIME mounted / ORA-01017: invalid
---- ------------------ ---------- ---------- ----------------- --------------------- -------------------------
*1 DB_NODE PROD_DB_1 OPEN PRIMARY READ WRITE 11-FEVR.-2021 23:47:01
username/password; logon denied
RMAN – PL/SQL package
INST_ID NAME OPEN_MODE RES OPEN_TIME SYS.DBMS_RCVMAN version xxxxxx in
----------
1
--------------------
PDB$SEED
---------------------
READ ONLY
---
NO
------------------------------
11-FEVR.-2021 23:47:48
TARGET database is not current
1 PDB_1 READ WRITE NO 11-FEVR.-2021 23:47:49 How to Install Windows 2012R2 Standard
1 PDB_2 READ WRITE YES 11-FEVR.-2021 23:47:49 <<-------------
Edition in VirtualBox
How to Upgrade Oracle 12c to 19c on a
Window Failover Cluster Manager
SQL> select name, cause, type, message, status, action from PDB_PLUG_IN_VIOLATIONS where type like 'ERROR%' and status like
'PENDING' ; environment

NAME CAUSE TYPE MESSAGE STATUS ACTION


Windows: How to Install Oracle 19c
------- -------------------- --------- ---------------------------------------------------------------------- ---------- ---------- Database Software
--------------------
PDB_2 SQL patch error ERROR DBRU bundle patch 200714 (DATABASE JUL 2020 RELEASE UPDATE 12.2.0.1.20 PENDING Call
datapatch to reinstall
0714): APPLY with status WITH ERRORS (RETRYABLE) in the PDB.

PDB_2 SQL Patch ERROR SQL patch ID/UID 30133625/23095898 (OJVM RELEASE UPDATE: 12.2.0.1.1910 PENDING Call Recent Comments
datapatch to install in t
15 (30133625)): Installed in the PDB but not in the CDB. he PDB or Alex on How To fix: PDB in restricted
the CDB
Alex on Autoupgrade fails with: Execution
PDB_2 SQL Patch ERROR DBRU bundle patch 200714 (DATABASE JUL 2020 RELEASE UPDATE 12.2.0.1.20 PENDING Call of Oracle Base utility,
datapatch to install in t
0714): Installed in the CDB but not in the PDB. he PDB or /u01/app/oracle/product/19c/dbhome_1/bin/orab
the CDB
failed for entry upg1.
PDB_2 SQL Patch ERROR SQL patch ID/UID 30133625/23095898 (OJVM RELEASE UPDATE: 12.2.0.1.1910 PENDING Call Alex on Oracle GoldenGate 19c: How to
datapatch to install in t
15 (30133625)): Installed in the CDB but not in the PDB. configure EXTRACT / REPLICAT
he PDB or the CDB
Alex on Oracle GoldenGate 19c: How to
configure EXTRACT / REPLICAT
SQL> alter session set container=PDB_2;
Session modifiee. Ho Tran on Oracle GoldenGate 19c: How to
SQL> show con_name
configure EXTRACT / REPLICAT

CON_NAME
------------------------------
PDB_2
SQL>
select BUNDLE_SERIES,PATCH_UID,PATCH_ID,VERSION,ACTION,STATUS,ACTION_TIME ,DESCRIPTION from dba_registry_sqlpatch;

BUNDLE_SERIES PATCH_UID PATCH_ID VERSION ACTION STATUS ACTION_TIME DESCRIPTION


--------------- ---------- ---------- ---------- --------- ------------------------ ------------------------ ----------------------
----------------------------
...
22597359 28790651 12.2.0.1 ROLLBACK SUCCESS 20-01-25 04:31:54,018927 OJVM RELEASE UPDATE:
12.2.0.1.190115 (28790651)
23095898 30133625 12.2.0.1 APPLY SUCCESS 20-01-25 04:31:54,025800 OJVM RELEASE UPDATE:
12.2.0.1.191015 (30133625)
DBRU 23136381 30138470 12.2.0.1 APPLY SUCCESS 20-01-25 04:31:55,895024 DATABASE OCT 2019
RELEASE UPDATE 12.2.0.1.191015
DBRU 23691705 31312468 12.2.0.1 APPLY WITH ERRORS (RETRYABLE) 20-11-22 05:54:37,738658 DATABASE JUL 2020
RELEASE UPDATE 12.2.0.1.200714
DBRU 23691705 31312468 12.2.0.1 APPLY WITH ERRORS (RETRYABLE) 20-11-22 07:20:32,085943 DATABASE JUL 2020
RELEASE UPDATE 12.2.0.1.200714 <<-----

13 lignes selectionnees.

SQL>

We tried the “datapatch -verbose” but this did not help:

https://www.alex-sanz.com/2021/08/11/how-to-fix-pdb-in-restricted/ 1/5
5/9/23, 3:04 PM How To fix: PDB in restricted – Database Blog

SQL> alter pluggable database PDB_2 close immediate;


Base de donnees pluggable modifiee.
SQL>
SQL> alter pluggable database PDB_2 open upgrade;
Base de donnees pluggable modifiee.
SQL>

oracle@DB_NODE:~$ /u01/app/oracle/product/12.2.0.1/dbhome_1/OPatch/datapatch -verbose


SQL Patching tool version 12.2.0.1.0 Production on Fri Feb 12 08:43:48 2021
Copyright (c) 2012, 2020, Oracle. All rights reserved.

Log file for this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_18174_2021_02_12_08_43_48/sqlpatch_invocation.log

Connecting to database...OK
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 SQL patches:


Patch 28440725 (OJVM RELEASE UPDATE: 12.2.0.1.181016 (28440725)):
Not installed in the binary or the SQL registry
Patch 28790651 (OJVM RELEASE UPDATE: 12.2.0.1.190115 (28790651)):
Not installed in the binary or the SQL registry
Patch 30133625 (OJVM RELEASE UPDATE: 12.2.0.1.191015 (30133625)):
Installed in the binary registry and CDB$ROOT PDB$SEED PDB_1 PDB_2
Bundle series DBRU:
ID 200714 in the binary registry and ID 200714 in PDB CDB$ROOT, ID 200714 in PDB PDB$SEED, ID 200714 in PDB PDB_1, ID 200714 with
errors in PDB PDB_2

Adding patches to installation queue and performing prereq checks...


Installation queue:
For the following PDBs: CDB$ROOT PDB$SEED PDB_1 PDB_2
Nothing to roll back
Nothing to apply

SQL Patching tool complete on Fri Feb 12 08:45:51 2021


oracle@DB_NODE:~$

This is how we fixed, we forced the patch “31312468/23691705”:

https://www.alex-sanz.com/2021/08/11/how-to-fix-pdb-in-restricted/ 2/5
5/9/23, 3:04 PM How To fix: PDB in restricted – Database Blog

oracle@DB_NODE:~$ /u01/app/oracle/product/12.2.0.1/dbhome_1/OPatch/datapatch -verbose -apply 31312468/23691705 -force -pdbs PDB_2


SQL Patching tool version 12.2.0.1.0 Production on Fri Feb 12 11:39:37 2021
Copyright (c) 2012, 2020, Oracle. All rights reserved.

Log file for this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_17882_2021_02_12_11_39_37/sqlpatch_invocation.log

Connecting to database...OK
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 SQL patches:


Patch 28440725 (OJVM RELEASE UPDATE: 12.2.0.1.181016 (28440725)):
Not installed in the binary or the SQL registry
Patch 28790651 (OJVM RELEASE UPDATE: 12.2.0.1.190115 (28790651)):
Not installed in the binary or the SQL registry
Patch 30133625 (OJVM RELEASE UPDATE: 12.2.0.1.191015 (30133625)):
Installed in PDB_2 only
Patch 31312468 ():
Not installed in the binary or the SQL registry
Bundle series DBRU:
ID 200714 in the binary registry and ID 200714 with errors in PDB PDB_2

Adding patches to installation queue and performing prereq checks...


Installation queue:
For the following PDBs: PDB_2
Nothing to roll back
The following patches will be applied:
31312468 (DATABASE JUL 2020 RELEASE UPDATE 12.2.0.1.200714)

Installing patches...

Patch installation complete. Total patches installed: 1

Validating logfiles...
Patch 31312468 apply (pdb PDB_2): SUCCESS
logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/31312468/23691705/31312468_apply_PROD_DB_PDB_2_2021Feb12_11_39_41.log (no errors)
SQL Patching tool complete on Fri Feb 12 11:47:55 2021
oracle@DB_NODE:~$

SQL> alter pluggable database PDB_2 close immediate;


Base de donnees pluggable modifiee.
SQL> alter pluggable database PDB_2 open ;
Base de donnees pluggable modifiee.

SQL> show pdbs

CON_ID CON_NAME OPEN MODE RESTRICTED


---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
4 PDB_1 READ WRITE NO
5 PDB_2 READ WRITE NO

SQL> alter session set container=PDB_2;

Session modifiee.

SQL> select BUNDLE_SERIES,PATCH_UID,PATCH_ID,VERSION,ACTION,STATUS,ACTION_TIME ,DESCRIPTION from dba_registry_sqlpatch;

BUNDLE_SERIES PATCH_UID PATCH_ID VERSION ACTION STATUS ACTION_TIME DESCRIPTION


--------------- ---------- ---------- ---------- -------- ------------------------ ------------------------ -----------------------
---------------------------
22459205 28440725 12.2.0.1 APPLY SUCCESS 19-05-31 09:41:34,584326 OJVM RELEASE UPDATE:
12.2.0.1.181016 (28440725)
DBRU 22500316 28662603 12.2.0.1 APPLY SUCCESS 19-05-31 09:41:35,168888 DATABASE OCT 2018
RELEASE UPDATE 12.2.0.1.181016
22459205 28440725 12.2.0.1 ROLLBACK WITH ERRORS 19-08-19 10:21:20,829716 OJVM RELEASE UPDATE:
12.2.0.1.181016 (28440725)
22597359 28790651 12.2.0.1 APPLY WITH ERRORS 19-08-19 10:21:20,831092 OJVM RELEASE UPDATE:
12.2.0.1.190115 (28790651)
DBRU 22643228 28822515 12.2.0.1 APPLY WITH ERRORS 19-08-19 10:21:20,832200 DATABASE JAN 2019
RELEASE UPDATE 12.2.0.1.190115
22459205 28440725 12.2.0.1 ROLLBACK SUCCESS 19-08-19 10:36:48,221427 OJVM RELEASE UPDATE:
12.2.0.1.181016 (28440725)
22597359 28790651 12.2.0.1 APPLY SUCCESS 19-08-19 10:36:48,227307 OJVM RELEASE UPDATE:
12.2.0.1.190115 (28790651)
DBRU 22643228 28822515 12.2.0.1 APPLY SUCCESS 19-08-19 10:36:48,271799 DATABASE JAN 2019
RELEASE UPDATE 12.2.0.1.190115
22597359 28790651 12.2.0.1 ROLLBACK SUCCESS 20-01-25 04:31:54,018927 OJVM RELEASE UPDATE:
12.2.0.1.190115 (28790651)
23095898 30133625 12.2.0.1 APPLY SUCCESS 20-01-25 04:31:54,025800 OJVM RELEASE UPDATE:
12.2.0.1.191015 (30133625)
DBRU 23136381 30138470 12.2.0.1 APPLY SUCCESS 20-01-25 04:31:55,895024 DATABASE OCT 2019
RELEASE UPDATE 12.2.0.1.191015
DBRU 23691705 31312468 12.2.0.1 APPLY WITH ERRORS (RETRYABLE) 20-11-22 05:54:37,738658 DATABASE JUL 2020
RELEASE UPDATE 12.2.0.1.200714
DBRU 23691705 31312468 12.2.0.1 APPLY WITH ERRORS (RETRYABLE) 20-11-22 07:20:32,085943 DATABASE JUL 2020
RELEASE UPDATE 12.2.0.1.200714
DBRU 23691705 31312468 12.2.0.1 APPLY SUCCESS 21-02-12 11:47:54,738592 DATABASE JUL 2020
RELEASE UPDATE 12.2.0.1.200714 <<----

14 lignes selectionnees.

SQL>

 Post Views: 12,770

Last modified: 14 August 2021

 PDB  restricted 

https://www.alex-sanz.com/2021/08/11/how-to-fix-pdb-in-restricted/ 3/5
5/9/23, 3:04 PM How To fix: PDB in restricted – Database Blog

Author

Alex

Comments

Rachid commented 4 months ago 

Thank you/Merci Alex. helped me solve my problem.

Alex commented 3 months ago Author 

Thanks for checkign this page, glad it fixed your problem!

Eddy commented 3 months ago 

Thanks for the information. Helped me a lot!

Write a Reply or Comment


Your email address will not be published.

 Name  Email

 Website

Send

 How To Analyze wait: ‘enq: HW – contention’


 How To Recover Tables to a Specified Point in Time

Archives Categories Meta


April 2023 AUTOUPGRADE Log in
December 2022 cloud patching Entries feed
November 2022 DATAGUARD Comments feed
October 2022 DBCA WordPress.org
June 2022 Failover Cluster Manager
May 2022 GOLDENGATE
April 2022 Install
March 2022 LINUX
November 2021 Oracle
October 2021 PATCHING
September 2021 PERFORMANCE
August 2021 RMAN
July 2021 SQL
April 2021 Standby DB
March 2021 TDE
February 2021 TrueNAS
UPGRADE
Upgrade
VirtualBox
Windows

https://www.alex-sanz.com/2021/08/11/how-to-fix-pdb-in-restricted/ 4/5
5/9/23, 3:04 PM How To fix: PDB in restricted – Database Blog

Copyright © 2023 Database Blog. All rights reserved. Theme by Mynote.

https://www.alex-sanz.com/2021/08/11/how-to-fix-pdb-in-restricted/ 5/5

You might also like