How To Check Oracle Database Read Write Mode

In this Oracle tutorial, we will learn about what is read-write mode in the Oracle database. We will also learn the procedure of how to check the read-write mode in the Oracle database.

What is Read Write in Oracle Database

In Oracle Database, Read Write is basically a modifier that is used to alter the clause. When data is in Read mode we cannot apply changes or updates but when the data is in read-write mode changes or updates can be done.

There are two different ways in which we can see that our Oracle database is in read or read-write mode.

  • Using Oracle Database
  • Using Command Prompt

Check Oracle Database Read Write Mode using Oracle GUI Database

We will see how to read-write mode in Oracle Database.

Step-1:

Open Oracle Database System and make a new connection as shown below

  • Click on the green PLUS icon.
How to check read write in oracle database
  • After which a window will open as (New/Select Database Connection) where we have to give Name, Username->Password->then select the role as SYSDBA->Declare Service Name(ORCL) and click on Test.
  • If the test result comes successful as we can see down left the Status: Success then we have to click on Connect.
check read write in oracle database

Step-2:

Then we can see the code screen which has appeared.

read write in oracle database

Step-3:

Write the code given below and get the output

select open_mode from v$database;

Here:

  • open_mode: It is a column in v$database, which tells about the open mode of the database i.e. either it is in read-write mode or read mode only.
  • v$database: It is a dynamic performance table of the Oracle database that displays information about the current database from the control file.
oracle database Read Write

Step-4:

To get the output click on the button depicted below.

oracle database checking Read Write

Step-5:

The output is.

checking oracle read write

Check Oracle Database Read Write Mode Command Prompt

Let’s see how to read-write mode in the command prompt.

Step-1:

Open Command Prompt and connect it to the database using the code given below.

sqlplus sys/sys123 as SYSDBA

where

  • sqlplus is the name of the database.
  • sys is the username that you have provided.
  • sys123 is the password that you have provided.
  • SYSDBA is the role of the database that we are working on.
check read write in oracle database using command prompt

Step-2:

Then the screen will appear depicted below with the message.

How to check read write in oracle database in command prompt

Step-3:

After which we have to display the same code as we wrote for the database query.

select open_mode from v$database;

open_mode: it declares the information about the database in what mode.

v$database: displays information about the database from the control file.

checking oracle read write using command prompt

Step-4:

We get the output as

read write in oracle database using command prompt

Conclusion

In this post, we learned about what is read-write mode and how to check Oracle database read-write mode.

You may also like: