Oracle表空间的状态(2)

2. 查询数据文件状态:
 
select file#, name, status from v$datafile;
 file  #name
 status
 ---  ------------------------------------------------------ ----------
 
11  /oracle/oradata_petest/petest/dcsopen_tbs02.dbf OFFLINE
 
DCSOPEN_TBS使用的数据文件状态已经置为OFFLINE。
 

3. 尝试查询已OFFLINE表空间:
 SQL> select * from test;
 select * from test
              *
 ERROR at line 1:
 ORA-00376: file 7 cannot be read at this time
 ORA-01110: data file 7: '/oracle/oradata_petest/petest/dcsopen_tbs01.dbf'
 
报错,提示此时数据文件不能读。
 

4. 将表空间置为online:
 SQL> alter tablespace dcsopen_tbs online;
 
Tablespace altered.
 


file  #name
 status
 ---  ------------------------------------------------------ ----------
 
11  /oracle/oradata_petest/petest/dcsopen_tbs02.dbf ONLINE
 

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/d37f8f756752cb5917839291430d3827.html