2.325 READ_ONLY

READ_ONLY enables or disables read-only mode for a user session.

Property Description

Parameter type

Boolean

Default value

false

Modifiable

ALTER SESSION

Modifiable in a PDB

No

Range of values

true | false

Basic

No

Oracle RAC

Different instances can use different values.

The READ_ONLY parameter allows you to prohibit write operations in a user session, without having to put an entire CDB or container into read-only mode. You can set this parameter in a session created by any type of user, such as a CDB common user, an application common user, or a local user. This parameter is effective in any type of container, such as the CDB root, a PDB, an application root, or an application PDB, when the container is open in read/write mode.

  • To enable read-only mode for the current session, set the READ_ONLY parameter to true. You cannot set this parameter to true when there are active transactions in the session.

  • To disable read-only mode for the current session, set the READ_ONLY parameter to false.

The READ_ONLY parameter value for a user session does not affect the value of the OPEN_MODE column for the session's container, as displayed in views such as V$CONTAINER_TOPOLOGY, V$CONTAINERS, V$DATABASE, and V$PDBS.

Note:

This parameter is available starting with Oracle Database 23ai.