Atikh's DBA blog
  • Home
  • Oracle
  • MySQL
  • MongoDB
  • PostgreSQL
  • Snowflake
  • About Me
  • Contact Us

Oracle 23c : New Feature- Hybrid Read only mode for PDB

 Atikh Shaikh     oracle, Oracle23c     No comments   

In General, DBA's open pluggable database or PDB either in Read Write Mode or Read-only, what if the database behaves in read-only, and read-write mode based on the connected user. One such feature is introduced in Oracle 23c. As we know there are two types of users in multitenant database starting from Oracle12c, local user and common user, Local users are local to the pluggable database and common users are common to all pluggable and container databases. Common users can connect to a container and several pluggable databases. 

As the Oracle database 23c release date was announced, everybody was excited about new features for DBA's in Oracle 23c. So here is one feature with many benefits: Hybrid Read-only mode for a pluggable database. Hybrid Read only mode enables the pluggable database to operate either in read-only or read-write mode.

Oracle 23c, oracle 23c database


For common users- a pluggable database or PDB will be in both read-write and read-only mode

For Local users/application users - a pluggable database or PDB will be restricted to read-only mode

To enable Hybrid read-only mode, alter pluggable database command needs to be executed against PDB.

we will not be able to see hybrid read-only mode  through v$database or v$pdbs, it can be viewed through v$container_topology with new column IS_HYBRID_READ _ONLY

SQL> desc v$container_topology

 Name                    Null?    Type

 ---------------------- -------- ----------------------------

 INSTANCE_NUMBER                     NUMBER

 CON_NAME                            VARCHAR2(128)

 OPEN_MODE                           VARCHAR2(10)

 CPU_COUNT                           NUMBER

 CON_ID                              NUMBER

 RESTRICTED                                VARCHAR2(3)

 IS_HYBRID_READ_ONLY                       VARCHAR2(3)

 

While we can see some different output in v$pdbs as well, for local users it will be read-only for common users it will be read-write mode

SQL> select con_name , open_mode , is_hybrid_read_only from v$container_topology;

 

CON_NAME        OPEN_MODE  IS_HYBRID_READ_ONLY

-------------------- ---------- --------------------------

FREEPDB1        READ WRITE NO

 

common users

 

SQL> show user

USER is "SYS"

SQL> select name,open_mode from v$pdbs;

 

NAME            OPEN_MODE

----------------- -----------------------------------

FREEPDB1        READ WRITE


As local user 


SQL> show user

USER is "LOCAL_USR"

SQL> select name,open_mode from v$pdbs;

 

NAME            OPEN_MODE

----------------- -----------------------------------

FREEPDB1        READ WRITE

 

SQL> 

Now change the mode of the pluggable database to Hybrid read-only mode. If the database is in open mode, close it using the close immediate command and open the pluggable database in hybrid read-only by using the below steps

 

SQL> alter pluggable database close immediate;

 

Pluggable database altered.

 

SQL> alter pluggable database open hybrid read-only;

 

Pluggable database altered.

 

SQL> show con_name

 

CON_NAME

------------------------------

FREEPDB1

SQL> select con_name , open_mode , is_hybrid_read_only from v$container_topology;

 

CON_NAME        OPEN_MODE                    IS_HYBRID_READ_ONLY

-------------------- ----------------------------------- -----------------------------------

FREEPDB1        READ WRITE             YES

 

SQL> show user

USER is "SYS"

SQL> 

SQL> select name,open_mode from v$pdbs;

 

NAME            OPEN_MODE

------------------ -----------------------------------

FREEPDB1        READ WRITE

 

SQL> conn local_usr/Test123@freepdb1

Connected.

SQL> 

SQL> select name,open_mode from v$pdbs;

 

NAME            OPEN_MODE

------------------ -----------------------------------

FREEPDB1        READ ONLY

 

SQL> 


In the above output, we can see, with common user SYS, it is READ WRITE mode, while with the local user it is READ ONLY mode

 

Reverting to the original state (Read Write):  follow simple steps to revert Oracle pluggable database to read-only mode

 

SQL> conn sys@freepdb1 as sysdba

Enter password: 

Connected.

SQL> alter pluggable database close immediate;

 

Pluggable database altered.

 

SQL> alter pluggable database open;

 

Pluggable database altered.

 

SQL> select name,open_mode from v$pdbs;

 

NAME            OPEN_MODE

-------------------- -----------------------------------

FREEPDB1        READ WRITE


In this way, we simply tested Oracle database 23c new feature of hybrid read-only mode, looks impressive feature, we will discuss more such features associated with oracle 23c.

 

  • Share This:  
  •  Facebook
  •  Twitter
  •  Instagram
  •  Pin
  •  linkedin
  •  reddit
Email ThisBlogThis!Share to XShare to Facebook

Related Posts:

  • pfile and spfile in oracle database In this short article, we will discuss the server parameter file and initialization parameter file i.e., spfile and pfile   pfile - param… Read More
  • Flashback query in oracleYou must have heard about the time machine in movies or magazines, just think of an oracle providing the same feature with its databases, and that is … Read More
  • Installation of Python 3.10 on windows This is going to be a short article with just a few steps for the installation of pythonStep 1: download python for windows for installation from … Read More
  • Introduction to Python and Writing first programPython is an open-source programming language, open-source refers to free availability and cost-effectiveness. Python is a cross-platform languag… Read More
  • Oracle : Database Links - Create, Use and DropA database link is an important schema object in the oracle database, we should know details about it in order to implement it in real-time applicatio… Read More
Newer Post Older Post Home

0 comments:

Post a Comment

Author

Atikh Shaikh
View my complete profile

Categories

  • MongoDB (18)
  • Oracle 12c (30)
  • Oracle12cR2 New Feature (3)
  • PostgreSQL (20)
  • RMAN (10)
  • Snowflake (8)
  • mysql (23)
  • oracle (74)

Blog Archive

  • ►  2018 (38)
    • ►  November (25)
    • ►  December (13)
  • ►  2019 (33)
    • ►  January (15)
    • ►  February (6)
    • ►  March (2)
    • ►  April (5)
    • ►  May (5)
  • ►  2020 (5)
    • ►  April (1)
    • ►  May (2)
    • ►  July (2)
  • ►  2021 (8)
    • ►  June (3)
    • ►  July (3)
    • ►  August (1)
    • ►  December (1)
  • ►  2022 (33)
    • ►  May (3)
    • ►  June (10)
    • ►  July (3)
    • ►  August (4)
    • ►  September (8)
    • ►  October (3)
    • ►  November (2)
  • ▼  2023 (14)
    • ►  February (1)
    • ►  April (5)
    • ▼  May (2)
      • Oracle 23c : New Feature- Hybrid Read only mode fo...
      • Oracle 23c : Changing Default PDB name "FREE" to c...
    • ►  June (1)
    • ►  September (1)
    • ►  October (1)
    • ►  December (3)
  • ►  2024 (5)
    • ►  January (2)
    • ►  March (3)
  • ►  2025 (6)
    • ►  March (1)
    • ►  April (3)
    • ►  May (2)

Popular Posts

  • ORA-29283: invalid file operation: unexpected "LFI" error (1509)[29437]
    I was trying to export the schema in my windows PC, it got stuck with below error    C:\Users\shaik\Videos\technodba exp>expdp userid...
  • ERROR 1221 (HY000): Incorrect usage of DB GRANT and GLOBAL PRIVILEGES
    In previous articles, we have learned about user creation and grants  in MySQL in detail, but there are a few privileges called global priv...
  • PostgreSQL : How to get data directory location for PostgreSQL instance
    Sometimes, you start working on a PostgreSQL instance but forget about the data directory, here we will discuss different methods to know th...
  • Oracle 23ai : Use of NOVALIDATE Constraints in IMPDP
    While performing impdp operations in the Oracle database, Oracle performs validation checks for every constraint on the imported table, that...
  • Oracle Dataguard Broker Configuration (DGMGRL)
    Data Guard Broker is a command-line interface that makes managing primary and standby databases easy. DBA can use a single command to switch...

Labels

oracle Oracle 12c mysql PostgreSQL MongoDB oracle 19c Oracle23c oracle19c Orale PDB-CDB oracle12c python AWS Oracle ASM Virtualbox pluggable database storage engine

Pages

  • Disclaimer
  • Privacy Policy

Follow TechnoDBA

Copyright © 2025 Atikh's DBA blog | Powered by Blogger