Discussions
Categories
- 197.1K All Categories
- 2.5K Data
- 546 Big Data Appliance
- 1.9K Data Science
- 450.7K Databases
- 221.9K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 552 MySQL Community Space
- 479 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3.1K ORDS, SODA & JSON in the Database
- 555 SQLcl
- 4K SQL Developer Data Modeler
- 187.2K SQL & PL/SQL
- 21.3K SQL Developer
- 296.3K Development
- 17 Developer Projects
- 139 Programming Languages
- 293K Development Tools
- 110 DevOps
- 3.1K QA/Testing
- 646.1K Java
- 28 Java Learning Subscription
- 37K Database Connectivity
- 158 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.2K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 19 Java Essentials
- 162 Java 8 Questions
- 86K Java Programming
- 81 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 204 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 466 LiveLabs
- 39 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.7K Other Languages
- 2.3K Chinese
- 175 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 233 Portuguese
Database Open in Read Only Mode

513596
Member Posts: 80
Hi
I would like to open database in read only mode
like
SQL> startup mount
SQL> ALTER DATABASE OPEN READ ONLY
this will open database for read only mode for all user
i want to give read write access on database to one user
any idea how i can proccess
Thanks
Chetan
I would like to open database in read only mode
like
SQL> startup mount
SQL> ALTER DATABASE OPEN READ ONLY
this will open database for read only mode for all user
i want to give read write access on database to one user
any idea how i can proccess
Thanks
Chetan
Tagged:
Answers
-
Hi,
It is not possible to open the database in read only mode and allow any one user to write .
The only thing I can see is open the databse in read/write mode and remove the write privilege on other users.
You may like to think about
Change the password of the user who owns the table and create the synonym in new users with select privilege only.
Regards
Anurag Tibrewal -
Hi there,
opening a db read only means read only for all, even for sys.
maybe you can set all tablespaces to read only, except those for the user you want to allow read write.
Another option which I never tested could be the resource manager. You can assign undo quotas
to users. If you give all users except the one an undo quota of zero they should not be able to
change any data. Happy testing.
HTH Mathias -
Hi there,
i couldn't stand it not to test it right away. the answer is: its a pitty. update, delete, create table are not
working with undo quota 0. but unfortunately insert is :-(
Maybe another solution:
how about triggers on all tables that you want to protect?
in the trigger body you check the user, if you do not allow them you do not allow the change.
but there are still things to consider. for example, what about grants?
HTH Mathias -
Hi,
Alter database open read only;
this should work fine and everything will be in read only mode. Hence if any auditing is going on and audit_trial=db then it fails to open the database in read only mode.
If you want to control only users to stop writing to it, you may remove tablespace quotas for those users. Also, you may control them through grants. Remove any current grants assigned to them or to roles through which the grants are assigned.
Several ways to do this. If you tell us the particular scenario then we might help in getting a solution.
Regards,
Vasu. -
ChetanS wrote:What that user is? Is it a normal or DBA user? What's the version of the db and o/s ?
Hi
I would like to open database in read only mode
like
SQL> startup mount
SQL> ALTER DATABASE OPEN READ ONLY
this will open database for read only mode for all user
i want to give read write access on database to one user
any idea how i can proccess
HTH
Aman.... -
hi
since it is not posible to open the database in read and write for some user and read only for some user.
so you batter open the databse in read and write mode and isolate the read only users using roles and privillages.
Thanks.
This discussion has been closed.