Doubt in commands
627444Mar 24 2008 — edited Mar 24 2008session 1
---------
SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup mount
ORACLE instance started.
Database mounted.
SQL> alter database open read only;
Database altered.
--- --
session 2
===
SQL> conn scott/mks
Connected.
SQL> drop table emp;
drop table emp
*
ERROR at line 1:
ORA-16000: database open for read-only access
------------
session 1
--- --------
SQL> alter system enable restricted session;
System altered.
Session 3
-----------
SQL> conn hr/mks
ERROR:
ORA-01035: ORACLE only available to users with RESTRICTED SESSION privilege
session 2
----- ----
SQL> drop table emp;
drop table emp
*
ERROR at line 1:
ORA-16000: database open for read-only access
SQL> select * from emp;
EMPNO ENAME JOB MGR HIREDATE SAL COMM
---------- ---------- --------- ---------- --------- ---------- ----------
DEPTNO
----------
7369 SMITH CLERK 7902 17-DEC-80 800
20
I do all command in above manner on different session. I have doubt , Why after enable restricted session . session 2 working in read only mode or show output of query .but session 3 work in restricted mode . what is concept behind this .
Thanks