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

Oracle 23ai : The all new Hybrid Read-Only for pluggable databases (PDBs)

 Atikh Shaikh     oracle 23ai     No comments   

 

The latest Oracle database version, Oracle 23ai, introduced a new open mode called Hybrid Read-Only for pluggable databases (PDBs). Local users can only connect with read-only access when a PDB is set to this new mode. However, common users are not restricted and can still perform write operations.

Command to convert to this mode

SQL> ALTER PLUGGABLE DATABASE TECHNOPDB OPEN HYBRID READ ONLY;
Pluggable database altered.

SQL> show pdbs;
    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 TECHNOPDB                      READ WRITE NO

Testing Write Access with common user - SYS

Now, we connect to TECHNOPDB as the SYS user and test write operations:

sqlplus "sys/sys@target:1521/TECHNOPDB as sysdba"

SQL> show user;
USER is "SYS"

SQL> select OPEN_MODE from v$pdbs;
OPEN_MODE
----------
READ WRITE

SQL> create table tech_user.test_tab(id number);
Table created.

As we can see, the SYS user sees the OPEN_MODE as READ WRITE, even though the PDB was opened in HYBRID READ ONLY mode.

Testing Write Access as any Local User

Now, let us repeat the test with a local user named VAHID:

sqlplus "tech_local/test123@target:1521/TECHNOPDB"

SQL> show user;
USER is "tech_local"

SQL> select OPEN_MODE from v$pdbs;
OPEN_MODE
----------
READ ONLY


SQL> create table tech_user.test_tab(id number);
ORA-16000: Attempting to modify database or pluggable database that is open for read-only access.

As expected, the local user (TECH_LOCAL) is not allowed to perform write operations.

Checking Hybrid Read-Only Mode Status

The view V$CONTAINER_TOPOLOGY can help to check the HYBRID READ ONLY mode:

SQL> select IS_HYBRID_READ_ONLY, CON_NAME, OPEN_MODE from V$CONTAINER_TOPOLOGY;

IS_HYBRID_READ_ONLY  CON_NAME   OPEN_MODE
-------------------- ---------- ----------
YES                  ORCLORPDB  READ WRITE

 

  • Share This:  
  •  Facebook
  •  Twitter
  •  Instagram
  •  Pin
  •  linkedin
  •  reddit
Email ThisBlogThis!Share to XShare to Facebook
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 (21)
  • 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)
    • ►  June (1)
    • ►  September (1)
    • ►  October (1)
    • ►  December (3)
  • ►  2024 (5)
    • ►  January (2)
    • ►  March (3)
  • ▼  2025 (7)
    • ►  March (1)
    • ►  April (3)
    • ▼  May (2)
      • Oracle 23ai : The all new Hybrid Read-Only for plu...
      • Oracle Active Data Guard Features and Benefits
    • ►  August (1)
  • ►  2026 (1)
    • ►  January (1)

Popular Posts

  • RMAN Backup of Single Datafile and List Backup
    This post will discuss about taking backup of single datafile, provided database is in archive log mode. Check if ARCHIVELOG mode is o...
  • PostgreSQL : pg_hba. conf configuration file
    In PostgreSQL, there are a number of configuration files, some of the files needs to be managed by postgres DBA, out of which  pg_hba.conf ...
  • Create local user in oracle pluggable database
    In this short article, I will give a brief idea about how to create a local user in a pluggable database and how to check its status as well...
  • User Managed Backups in Oracle
    Definition :Backup is real and consistent copy of data from database that could be used to reconstruct the data after and incident. ...
  • 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...

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 © Atikh's DBA blog | Powered by Blogger