BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
PL/SQL Release 11.2.0.4.0 - Production
CORE 11.2.0.4.0 Production
TNS for Linux: Version 11.2.0.4.0 - Production
NLSRTL Version 11.2.0.4.0 - Production
创建1张表
查看该表的object_id 和 Data_object_id,
注:表tab$ 仲 OBJ# 存放的就是对象的object_id, 而 dataobj#存放的就是对象的data_object_id.
SQL> select obj#,dataobj#,tab# from tab$ where obj# in
2 (select object_id from user_objects where object_name='TMP_JASON1');
再查看该表的object_id 和 Data_object_id, ..(无变化,作者原文是变化了的,可能由于这张表原来就是空表的关系)
SQL> select obj#,dataobj#,tab# from tab$ where obj# in
2 (select object_id from user_objects where object_name='TMP_JASON1');
执行alter table xxx move, 这个语句一般用来移动表到另1个表空间(move 后面要加表空间参数),或者用来整理碎片(消除行移植和行链接), 但是会导致索引失效,所以要重建索引。 alter index xxx rebuild online
SQL> alter table tmp_jason1 move;
Table altered.
再查看该表的object_id 和 Data_object_id, 见到Data_obj_id已经发生变化了。
SQL> select obj#,dataobj#,tab# from tab$ where obj# in
2 (select object_id from user_objects where object_name='TMP_JASON1');