当前位置:操作系统 > Unix/Linux >>

一个有趣的测试

一个有趣的测试
 
SQL> show recyclebin
rows will be truncated
ORIGNAME_PLUS_SHOW_RECYC         OBJECTNAME_PLUS_SHOW_RECYC     OBJTYPE_PLUS_S
-------------------------------- ------------------------------ --------------
EMP_1                            BIN$0Q40up5pfKPgQAB/AQAbjg==$0 TABLE
TEST                             BIN$4MQeqBIB0bfgQAB/AQAnyw==$0 TABLE
TEST                             BIN$4MQeqBIA0bfgQAB/AQAnyw==$0 TABLE
SQL> create table test as select * from "BIN$4MQeqBIA0bfgQAB/AQAnyw==$0";
Table created.
SQL> show recyclebin
rows will be truncated
ORIGNAME_PLUS_SHOW_RECYC         OBJECTNAME_PLUS_SHOW_RECYC     OBJTYPE_PLUS_S
-------------------------------- ------------------------------ --------------
EMP_1                            BIN$0Q40up5pfKPgQAB/AQAbjg==$0 TABLE
TEST                             BIN$4MQeqBIB0bfgQAB/AQAnyw==$0 TABLE
TEST                             BIN$4MQeqBIA0bfgQAB/AQAnyw==$0 TABLE
SQL> select * from "BIN$4MQeqBIA0bfgQAB/AQAnyw==$0";
FILE_NAME
------------------------------------------------------------------------------
/u01/app/oracle/oradata/MYNEWDB/datafile/o1_mf_users_814jk5bg_.dbf
/u01/app/oracle/oradata/MYNEWDB/datafile/o1_mf_undotbs1_814jk569_.dbf
/u01/app/oracle/oradata/MYNEWDB/datafile/o1_mf_sysaux_814jk53d_.dbf
/u01/app/oracle/oradata/MYNEWDB/datafile/o1_mf_system_814jk4rs_.dbf
/u01/app/oracle/oradata/MYNEWDB/datafile/o1_mf_example_814jq4jj_.dbf
SQL> select * from test;
FILE_NAME
------------------------------------------------------------------------------
/u01/app/oracle/oradata/MYNEWDB/datafile/o1_mf_users_814jk5bg_.dbf
/u01/app/oracle/oradata/MYNEWDB/datafile/o1_mf_undotbs1_814jk569_.dbf
/u01/app/oracle/oradata/MYNEWDB/datafile/o1_mf_sysaux_814jk53d_.dbf
/u01/app/oracle/oradata/MYNEWDB/datafile/o1_mf_system_814jk4rs_.dbf
/u01/app/oracle/oradata/MYNEWDB/datafile/o1_mf_example_814jq4jj_.dbf
SQL>

 

 
至于为什么可以做跟recyclebin的工作原理有关
“The recycle bin is actually a data dictionary table containing information about 
dropped objects. Dropped tables and any associated objects such as indexes, 
constraints, nested tables, and the likes are not removed and still occupy space.”
 
recyclebin中对象只有在以下两情况下会真正清除物理文件:1、手工purge 2、表空间的空间大小约束,即空间不够的情况下oracle会自动清理其中对象。
 
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,