Startup the database in Restrict Mode Oracle

Start the database in Single user Mode in Oracle

Restrict Mode in which Oracle database allow making connection with special rights such as DBA, SYSDBA to perform the maintenance activity like rebuilding index, remove fragmentation etc. It is very use full for DBA for start database in restricted mode for planned maintenance activity. So, No other user such as application users are able to connect with database until they have special rights.
startup restrict command: will open database in restricted mode.

Open database for Maintenance mode, So no one access it

Start the database in restricted mode:

Shutdown the database:

SQL> Shutdown immediate;

-- Start the database in restricted mode,So, no other user able to connect:
SQL> startup restrict;

OR 

alter system enable restricted session;

Check the database in restricted mode

SELECT INSTANCE_NAME, STATUS, DATABASE_STATUS 
FROM V$INSTANCE;

SQL> Select logins from v$instance;
LOGINS
--------------
RESTRICTED

Disable the session restricted mode or you can normal start the database.

SQL> alter system disable restricted session;

Verify the status that restricted mode is disable:
SQL> Select logins from v$instance;
LOGINS
--------------
ALLOWED

Without restart the database, we put it in restricted mode:

alter system enable restricted session;

Note: If restricted session is blocked by some session. May need to kill them if urgent. Check from v$session

3 thoughts on “Startup the database in Restrict Mode Oracle

  1. Pingback: However They Will Not Be Able To Make Any Changes To The Data – rkimball.com

    1. SandeepSingh DBA's avatarSandeepSingh DBA

      For Rac you can start database in restrict mode as : srvctl start database -d db_name -o restrict

      Reply
  2. Pingback: Why Use Restricted Mode In Oracle? – Programming & Design

Leave a Reply