purgerecyclebin之后dba_segments仍然有BIN$段(二)

2014-11-24 17:08:08 · 作者: · 浏览: 1
he table "T1" is owned by user "TEST" and user "SCOTT" doesn't have a table named "T1":

SQL>CONNECT TEST/TEST
SQL>GRANT SELECT ON T1 TO SCOTT;
SQL>CONNECT scott/tiger
SQL>SELECT * FROM SCOTT.T1; <<<<< you must specify the table prefix "SCOTT."
SQL>ALTER SESSION SET CURRENT_SCHEMA = test;
SQL>SELECT * FROM T1; <<<<< Now you need not to add the prefix "SCOTT."

After the session set CURRENT_SCHEMA = test, the only change is that the user "SCOTT" can access the table "TEST.T1" without specifying the table prefix.
The current user is still "TEST", This time when you perform a "purge recyclebin", it just purges the recyclebin in user "TEST", not "SCOTT".

For more details, please refer to:

Oracle Database SQL Reference
10g Release 2 (10.2)
B14200-02

http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_2012.htm#SQLRF00901

一句话总结:都是基本概念没过关,很多事情想当然的去理解,Oracle文档还是值得很多人细细的读。