################################
Remove PDB from Restricted Mode
################################
SYS@sajid>show pdbs;
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 SAJIDPDB READ WRITE YES
SYS@sajid>select time,name,cause,status,message from PDB_PLUG_IN_VIOLATIONS order by name;
TIME NAME
--------------------------------------------------------------------------- --------------------------------------------------------------------------------
CAUSE STATUS
---------------------------------------------------------------- ---------
MESSAGE
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
05-AUG-15 04.43.00.384584 PM SAJIDPDB
Database CHARACTER SET RESOLVED
Character set mismatch: PDB character set US7ASCII. CDB character set AL32UTF8.
.
.
.====>OUTPUT TRUNCATED
.
Parameter RESOLVED
CDB parameter statistics_level mismatch: Previous 'BASIC' Current 'TYPICAL'
12-AUG-15 10.07.45.271476 AM SAJIDPDB
SQL Patch PENDING
PSU bundle patch 4 (Database Patch Set Update : 12.1.0.2.4 (20831110)): Installed in the CDB but not in the PDB.
9 rows selected.
SYS@sajid>show pdbs;
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 SAJIDPDB READ WRITE YES
SYS@sajid>select * from v$pdbs;
CON_ID DBID CON_UID GUID NAME OPEN_MODE RES
---------- ---------- ---------- -------------------------------- -------------------------------------------------------------------------------- ---------- ---
OPEN_TIME CREATE_SCN TOTAL_SIZE BLOCK_SIZE RECOVERY SNAPSHOT_PARENT_CON_ID
--------------------------------------------------------------------------- ---------- ---------- ---------- -------- ----------------------
2 1135512145 1135512145 1C974DBD71DC5F9FE0530E10C80AD3D6 PDB$SEED READ ONLY NO
12-AUG-15 09.35.35.395 AM -04:00 1594365 859832320 8192 ENABLED 0
3 1837615348 1837615348 1C976770B51776AFE0530E10C80AB6E3 SAJIDPDB READ WRITE YES
12-AUG-15 09.42.49.900 AM -04:00 1759290 2477522944 8192 ENABLED 0
Invoke Datapatch: New concept in 12c replacing catbunble scripts.
[Sajid@SAJID01] /u01/app/Sajid/product/12.1.0/network/admin: cd /u01/app/Sajid/product/12.1.0/OPatch/
[Sajid@SAJID01] /u01/app/Sajid/product/12.1.0/OPatch: ls -ltr datapatch
-rwxr-x--- 1 Sajid oinstall 537 Jul 2 05:08 datapatch
SYS@sajid>alter pluggable database SAJIDPDB close instances =all;
Pluggable database altered.
SYS@sajid>alter pluggable database SAJIDPDB open read write instances =all;
Pluggable database altered.
SYS@sajid>show pdbs;
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 SAJIDPDB READ WRITE NO
SYS@sajid>select time,name,cause,status,message from PDB_PLUG_IN_VIOLATIONS order by name;
TIME NAME
--------------------------------------------------------------------------- --------------------------------------------------------------------------------
CAUSE STATUS
---------------------------------------------------------------- ---------
MESSAGE
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
.
.
.====>OUTPUT TRUNCATED
.
Parameter RESOLVED
CDB parameter statistics_level mismatch: Previous 'BASIC' Current 'TYPICAL'
12-AUG-15 04.00.02.252077 PM SAJIDPDB
SQL Patch RESOLVED
PSU bundle patch 4 (Database Patch Set Update : 12.1.0.2.4 (20831110)): Installed in the CDB but not in the PDB.
9 rows selected.
##############
Second Option
##############
You can even use the second method too, if you are not planning to bounce the PDB'S.
SQL> alter session set container=SAJIDPDB;
Session altered.
SQL> select con_id,logins,status from v$instance;
CON_ID LOGINS STATUS
---------- ---------- ------------
0 RESTRICTED OPEN
SQL> alter pluggable database open force;
Pluggable database altered.
SQL> select con_id,logins,status from v$instance;
CON_ID LOGINS STATUS
---------- ---------- ------------
0 ALLOWED OPEN
very thank to you.
ReplyDeleteGlad it was helpful to you :).
DeleteThis comment has been removed by a blog administrator.
ReplyDeletehow can we disable PDB$SEED from restricted mode
ReplyDelete