今天在做测试中一次偶然发现,详见以下测试过程
引用
SQL> create index t_idx1 on t(dataobj#) tablespace indexs;
Index created.
SQL> alter tablespace indexs offline;
Tablespace altered.
SQL> insert into t select * from t where rownum=1;
insert into t select * from t where rownum=1
*
ERROR at line 1:
ORA-00376: file 5 cannot be read at this time
ORA-01110: data file 5: '/opt/ora11g/oradata/db11g/index01.dbf'
SQL> alter index t_idx1 rebuild;
alter index t_idx1 rebuild
*
ERROR at line 1:
ORA-00376: file 5 cannot be read at this time
ORA-01110: data file 5: '/opt/ora11g/oradata/db11g/index01.dbf'
SQL> alter index t_idx1 rebuild tablespace users;
alter index t_idx1 rebuild tablespace users
*
ERROR at line 1:
ORA-00376: file 5 cannot be read at this time
ORA-01110: data file 5: '/opt/ora11g/oradata/db11g/index01.dbf'
SQL> select INDEX_NAME,status from user_indexes;
INDEX_NAME STATUS
------------------------------ --------
T_IDX1 VALID
SQL> drop index t_idx1;