(1) Required Privileges
You must have the ALTER DATABASE system privilege. To specify the RECOVER clause, you must also have the SYSDBA system privilege.
(2) Open the database -- READ ONLY / READ WRITE:
Example
The following statement opens the database in read-only mode: ALTER DATABASE OPEN READ ONLY;
The following statement opens the database in read/write mode and clears the online redo logs: ALTER DATABASE OPEN READ WRITE RESETLOGS;
(3) enable and disable a restricted session
alter system enable restricted session;
alter system disable restricted session;
to identify if the database is in that mode
select logins from v$instance;
In 10.2.0.3.0
ALTER SYSTEM QUIESCE RESTRICTED;