The READ-ONLY user cannot perform any DDL or DML activities.
Create a Read-Only PDB User: To create a Read-Only PDB use the new READ ONLY clause in the CREATE USER statement.
Connect to PDB user
SQL> ALTER SESSION SET CONTAINER = my_pdb;
Create readonly “hr_user”
SQL> CREATE USER hr_user IDENTIFIED BY passwordxxx READ ONLY;
SQL> CREATE USER hr_user IDENTIFIED BY passwordxxx READ ONLY;
Grant create session to hr_user
SQL> GRANT CREATE SESSION TO hr_user;
Note that the “hr_user” cannot be able to perform below tasks
SQL> GRANT CREATE SESSION TO hr_user;
Note that the “hr_user” cannot be able to perform below tasks
- User cannot run INSERT, DELETE, UPDATE or MERGE.
- User Cannot create or modify tables, indexs, views or procedures
- User cannot change roles or privileges
- User cannot modify session-level settings
Run below view to see the user is read-only or not
SQL> SELECT username, read_only from dba_users where username='HR_USER';
USERNAME READ_ONLY
-------------------- -----------------
HR_USER YES
SQL> Connect hr_user/paswordxxx;
Connected.
SQL> CREATE TABLE employee_test (emp_id number, emp_name varchar2(50));
*
ERROR at line 1:
ORA-28194: Can perform read operations only
SQL> DELETE FROM employee;
*
ERROR at line 1:
ORA-28194: Can perform read operations only
Note that READ-ONLY users can execute PL/SQL if it doesn’t have any DDL or DML.
The below procedure rev_salary has update statement and cannot perform the operation.
SQL> SELECT username, read_only from dba_users where username='HR_USER';
USERNAME READ_ONLY
-------------------- -----------------
HR_USER YES
SQL> Connect hr_user/paswordxxx;
Connected.
SQL> CREATE TABLE employee_test (emp_id number, emp_name varchar2(50));
*
ERROR at line 1:
ORA-28194: Can perform read operations only
SQL> DELETE FROM employee;
*
ERROR at line 1:
ORA-28194: Can perform read operations only
Note that READ-ONLY users can execute PL/SQL if it doesn’t have any DDL or DML.
The below procedure rev_salary has update statement and cannot perform the operation.
SQL> exec REV_SALARY;
ERROR at line 1:
ORA-28194: Can perform read operations only
ORA-06512: at "HR_USER.REV_SALARY", line 3
ORA-06512: at line 1
The READ-ONLY user can run a SELECT query without any issues.
SQL> SELECT emp_id, emp_name from employee;
EMP_ID EMP_NAME
-------------- ----------------------------
1 test_user1
2 test_user2
3 test_user3
SQL>
The Read-Only PDB Users provide a clean way to enforce non-modifiability of users at the database level. This helps with read intensive applications, as these users restricted to only SELECT and users cannot perform any DDL or DML activities.
Thanks & Regards,
That’s an interesting topic! If you’re looking for secure and exciting gameplay, TigerXplay offers just that. With its engaging rummy game players can enjoy smooth performance, fair competition, and real rewards. Whether you’re a beginner or a seasoned player, TigerXplay ensures a safe and fun environment where every move counts. Dive in, play smart, and experience nonstop entertainment with the thrilling rummy game on TigerXplay.
ReplyDeleteAmazing write up. Thanks for sharing this information.
ReplyDeleteIf you are looking for Digital Marketing classes in Hyderabad , you can get in depth training at Whitescholars. Most of the companies are looking for Digital marketers who have undergone Digital marketing training in Hyderabad
digital marketing course in hyderabad
What an exciting cricket match today! Non-stop action from start to finish. Loved tracking live moments on Gurubhai247 and betbook247 —both made the game even more thrilling for fans!
ReplyDeleteHelpful career-focused post.This Android developer training includes live projects.
ReplyDelete"Enhance your career with our comprehensive designed for beginners and professionals alike. Learn to manage Salesforce effectively and master the skills needed for certification and real-world application."
ReplyDeleteThe Lotus365 download APK installs easily and runs perfectly.
ReplyDeletehttps://winbuzz-247.com/
I usually don’t trust new platforms, but77bet gameseems decent so far. Found this guide useful before trying it myself.
ReplyDeleteI was specifically searching for 5222 game download apk old versionsince my phone is old. Glad someone mentioned it.
ReplyDeleteThanks for sharing this useful information.
ReplyDeleteAlso check out UI/UX Course in Kochi by Login360 and Digital Marketing Course by Login360.
Great explanation on managing read-only PDB users in Oracle 23c AI the step-by-step examples and clarity here make it much easier to grasp, especially for DBAs and developers working with pluggable databases and security configurations. Thanks for breaking it down so thoughtfully!
ReplyDeleteFor anyone reading through this and also looking to grow their digital skills in today’s competitive landscape, you might find value in checking out the Digital Marketing Training Institute in Coimbatore and the UI UX Design Course in Coimbatore. These are great resources for building practical expertise that complements technical knowledge.
Really enjoying the content here! The layout is clean and easy to navigate, making it a pleasant experience to browse through the posts. Keep up the great work — it’s refreshing to see such well-organized and informative content.
ReplyDeleteFor anyone looking to level up their design skills, this UI/UX design course syllabus is a fantastic resource to explore.
Great technical breakdown thanks for sharing such clear and practical insights on Oracle 23AI! This kind of content really helps developers understand advanced features and best practices. For anyone curious about how digital strategies help technical content reach a wider audience, here’s a helpful guide on What is Digital Marketing?
ReplyDeleteKeep up the informative posts!
Thanks for posting! I found this Learn UI UX Design Course Online.
ReplyDeleteThis article gives a clear and practical explanation of the new READ-ONLY PDB user feature in Oracle 23ai and its benefits for secure multitenant environments. The step-by-step examples make it easy to understand how restricting DDL and DML operations improves data protection and system stability. It’s especially useful for DBAs managing read-intensive workloads and controlled access scenarios.
ReplyDeleteFor those looking to enhance their technical and digital skills, you can also explore this helpful resource:
Best Digital Marketing Training Institute
This is a great piece of content. I enjoyed reading through it.
ReplyDeleteYou’ve explained things in a simple and effective way.
Also sharing a useful link:
Data Science or Data Analytics
Great content, easy to understand and very informative.
ReplyDeleteYou can also check Learn Data Science vs Data Analytics for more clarity.
Great read! Designers can improve their craft with the Figma UI/UX Course. Developers should also check out the Full Stack Developer Course in Chennai.
ReplyDeleteNicely explained! I found similar strategies in the Social Media Marketing Course.
ReplyDeleteVery well written and easy to understand.
ReplyDeleteI enjoyed reading this article.
Here’s a helpful link for learners:
Data Science Course with Placement
Also check out:
Best IT Training Institute in Coimbatore
Good explanation overall.
ReplyDeletePython Certification Course is useful.