Subject Privileges changes visibility
Author Bambang P
Will opened connection detect user privileges changes which happened
after the connection opened?

The scenario:

1. Run ISQL and create a database with a table and grant select on the
table to PUBLIC

SQL> create database 'JUST_A_TEST' user 'SYSDBA' password 'masterkey';
SQL> create TABLE TBL ( ID integer );
SQL> INSERT INTO TBL values (1);
SQL> commit;
SQL> select * from TBL;

ID
============

1
SQL> grant select on TBL to PUBLIC;

2. Run another ISQL and connect to the JUST_A_TEST, but now with
user name other than SYSDBA. As expected, I can query the table TBL
from this 2nd ISQL.

3. Without closing the 2nd ISQL, switch back to the first ISQL and revoke
the rights from PUBLIC:

SQL> revoke all on TBL from PUBLIC;
SQL> COMMIT;
SQL>

[Question: Is commit necessary here?]

4. Switch again to the 2nd ISQL. Now, I expect the 2nd instance of
ISQL will fails to query the table, because neither the user name nor
public has any rights on table TBL. However, the 2nd ISQL still
successfully query the table!!



--
Bambang P.