前几天,一个客户在查询表空间容量大小时,显示总大小为空,客户就急了,表空间还在,怎么查不到容量信息了啊?
用的是以下查询语句
select tablespace_name, file_id, file_name,
round(bytes/(1024*1024),0) total_space
from dba_data_files
TS_FZ3_DIC 103 /dev/rdata4_4_10_rw
TS_FZ3_INDEX 104 /dev/rdata4_4_11_rw
TS_FZ3_INDEX_APPSYS 105 /dev/rdata4_4_12_rw
上面三个表空间容量为空
原因是:
根据v$datafile视图,查到这三个数据文件状态是offline
用以下命令将数据文件online,根据情况,可能需要做recover
recover datafile '/dev/rdata4_4_10_rw' ;
recover datafile '/dev/rdata4_4_11_rw';
recover datafile '/dev/rdata4_4_12_rw';
alter database datafile '/dev/rdata4_4_10_rw' online;
alter database datafile '/dev/rdata4_4_11_rw' online;
alter database datafile '/dev/rdata4_4_12_rw' online;
online成功后,表空间容量大小信息就可以正常显示了。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/7199859/viewspace-591822/ ,如需转载,请注明出处,否则将追究法律责任。