ITPUB??ì3
12月微软Hyper-V虚拟化沙龙主题征集
ITPUB论坛 » Oracle数据库管理 » 刚刚执行了alter table move tablespace命令。其他正常,只是依赖此表的package&b

标题: 刚刚执行了alter table move tablespace命令。其他正常,只是依赖此表的package&b
离线 muhaook
上帝保佑吃饱了饭的人



精华贴数 0
个人空间 0
技术积分 798 (2413)
社区积分 15 (8779)
注册日期 2002-2-6
论坛徽章:1
授权会员     
      

发表于 2002-3-16 04:37 
刚刚执行了alter table move tablespace命令。其他正常,只是依赖此表的package&b

thanks


__________________
There is no other choices, for there is no other peaces.
只看该作者    顶部
离线 Yong Huang
版主



精华贴数 2
个人空间 0
技术积分 4382 (324)
社区积分 129 (3072)
注册日期 2001-10-9
论坛徽章:6
现任管理团队成员ITPUB元老管理团队2006纪念徽章会员2006贡献徽章授权会员2008年新春纪念徽章
      

发表于 2002-3-16 17:55 
Re: 刚刚执行了alter table move tablespace命令。其他正常,只是依赖此表的package&a

You remember wrong. After alter table move, indexes become UNUSABLE. Packages, package bodies are still valid. But if you alter table and do some other action such as add a column, packages/package bodies will be invalidated.

Yong Huang


只看该作者    顶部
离线 muhaook
上帝保佑吃饱了饭的人



精华贴数 0
个人空间 0
技术积分 798 (2413)
社区积分 15 (8779)
注册日期 2002-2-6
论坛徽章:1
授权会员     
      

发表于 2002-3-18 23:02 
Re: Re: 刚刚执行了alter table move tablespace命令。其他正常,只是依赖此表的packa

相关索引也是valid的。
我把情况说一下:
表及其索引在表空间1上。构成这个表空间的是操作系统文件。
我新建了表空间2,建在裸磁盘上。
alter table XXX move tablespace2;
索引仍然在表空间1上。
索引是有效状态。我没有rebuild

QUOTE:
最初由 Yong Huang 发布
You remember wrong. After alter table move, indexes become UNUSABLE. Packages, package bodies are still valid. But if you alter table and do some other action such as add a column, packages/package bodies will be invalidated.

Yong Huang





__________________
There is no other choices, for there is no other peaces.
只看该作者    顶部
在线/呼叫 biti_rainy
人生就是如此



精华贴数 38
个人空间 0
技术积分 111201 (4)
社区积分 11832 (132)
注册日期 2001-12-12
论坛徽章:41
现任管理团队成员ITPUB长老会成员ITPUB元老年度论坛发贴之星年度论坛发贴之星ITPUB北京九华山庄2008年会纪念徽章
管理团队2007贡献徽章参与2007年甲骨文全球大会(中国上海)纪念ITPUB北京香山2007年会纪念徽章管理团队2006纪念徽章会员2007贡献徽章会员2006贡献徽章

发表于 2002-3-19 00:37 
也许你的索引是有效状态

但肯定是不能用的,呵呵
rowid都已经变了还怎么用啊

但出现这个情况,也许是bug?


__________________
眼界决定边界,态度决定高度
blog:
人生就是如此
只看该作者    顶部
离线 Yong Huang
版主



精华贴数 2
个人空间 0
技术积分 4382 (324)
社区积分 129 (3072)
注册日期 2001-10-9
论坛徽章:6
现任管理团队成员ITPUB元老管理团队2006纪念徽章会员2006贡献徽章授权会员2008年新春纪念徽章
      

发表于 2002-3-19 01:03 
Re: Re: Re: 刚刚执行了alter table move tablespace命令。其他正常,只是依赖此表的p

Is your table empty? My test shows that if the table is empty, the index is VALID, otherwise it's UNUSABLE:

SQL> create table t (a number);

Table created.

SQL> create index t_ind on t(a);

Index created.

SQL> select tablespace_name from user_tables where table_name = 'T';

TABLESPACE_NAME
------------------------------
USERS

SQL> select tablespace_name, status from user_indexes where index_name = 'T_IND';

TABLESPACE_NAME                STATUS
------------------------------ --------
USERS                          VALID

SQL> alter table t move tablespace tools;

Table altered.

SQL> select tablespace_name, status from user_indexes where index_name = 'T_IND';

TABLESPACE_NAME                STATUS
------------------------------ --------
USERS                          VALID

SQL> alter table t move tablespace users;

Table altered.

SQL> select tablespace_name, status from user_indexes where index_name = 'T_IND';

TABLESPACE_NAME                STATUS
------------------------------ --------
USERS                          VALID

SQL> insert into t values (123);

1 row created.

SQL> alter table t move tablespace tools;

Table altered.

SQL> select tablespace_name, status from user_indexes where index_name = 'T_IND';

TABLESPACE_NAME                STATUS
------------------------------ --------
USERS                          UNUSABLE

This test is done on both 8.1.7 and 9.0.1.1.1.

Yong Huang

QUOTE:
最初由 muhaook 发布
相关索引也是valid的。
我把情况说一下:
表及其索引在表空间1上。构成这个表空间的是操作系统文件。
我新建了表空间2,建在裸磁盘上。
alter table XXX move tablespace2;
索引仍然在表空间1上。
索引是有效状态。我没有rebuild






只看该作者    顶部
离线 Arraymuhaook
上帝保佑吃饱了饭的人



精华贴数 0
个人空间 0
技术积分 798 (2413)
社区积分 15 (8779)
注册日期 2002-2-6
论坛徽章:1
授权会员     
      

发表于 2002-3-19 01:19 
你们说得对。是我想得不全面。

thanks a lot!


__________________
There is no other choices, for there is no other peaces.
只看该作者    顶部
 
    

相关内容


CopyRight 1999-2006 itpub.net All Right Reserved.
北京皓辰广域网络信息技术有限公司. 版权所有
E-mail:Webmaster@itpub.net
京ICP证:010037号 联系我们 法律顾问