Change Autonomous AI Database Operation Mode to Read/Write Read-Only or Restricted

You can select an Autonomous AI Database operation mode: Read/Write, Read-Only, or Restricted. The default mode is Read/Write.

Change Autonomous AI Database Operation Mode for a Session

You can set the Autonomous AI Database operation mode for a session to Read-Only. When you set the session mode to Read-Only users in the session can only run queries.

To enable Read-Only mode for a session:

  1. Connect to Autonomous AI Database.

    You can connect as the ADMIN user or as the user whose session you want to set to Read-only mode.

  2. Run the following SQL statement:

ALTER SESSION SET READ_ONLY = TRUE;

To disable Read-Only mode for a session:

ALTER SESSION SET READ_ONLY = FALSE;

Note: The READ_ONLY session parameter applies when the database is in Read/Write mode. If the database is in Read-Only mode, setting the session parameter value to TRUE or to FALSE does not change the operation mode for the session.

Change Autonomous AI Database Operation Mode to Read/Write Read-Only or Restricted

From the Oracle Cloud Infrastructure Console you can select an Autonomous AI Database operation mode: Read/Write, Read-Only, or Restricted. The default mode is Read/Write.

If you select Read-Only mode users can only run queries. In addition, for Read-Only or Read/Write mode, you can restrict access to only allow users with the RESTRICTED SESSION privilege to connect to the database. The ADMIN user has this privilege. You can use the restricted access mode to perform administrative tasks such as indexing, data loads, or other planned activities.

Perform the following prerequisite steps as necessary:

To change the Autonomous AI Database operation mode, do the following:

  1. On the Details page, in the Mode field under General Information, click Edit.

    This shows the Change database mode panel.

    Description of adb_mode_edit.png follows

    Description of the illustration adb_mode_edit.png

  2. Select a mode, either Read/write or Read only.

  3. If you want to restrict access to only allow the ADMIN or privileged users, then select Allow administrator access only.

  4. Click Confirm.

    When concurrent operations such as scaling are active, the confirmation also confirms either pausing or canceling the concurrent operation. See Concurrent Operations on Autonomous AI Database for more information.

    While the mode changes, the Lifecycle state field shows Updating. After the mode change completes, the Lifecycle state field shows Available.

Notes for changing the database mode:

Autonomous AI Database Operation in Read-Only Mode

When the database is in Read-Only mode, each of the following is disabled: