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