使用するディスク領域と残りの領域をプログラムでクエリしたいと思います。どのようにすればdashDBでこれを行うことができますか?私はdashDBと同様のだろうどのようにdashDBでディスクの使用方法と利用方法を問い合わせる方法
column dummy noprint
column pct_used format 999.9 heading "%|Used"
column name format a16 heading "Tablespace Name"
column bytes format 9,999,999,999,999 heading "Total Bytes"
column used format 99,999,999,999 heading "Used"
column free format 999,999,999,999 heading "Free"
break on report
compute sum of bytes on report
compute sum of free on report
compute sum of used on report
set linesize 132
set termout off
select a.tablespace_name name,
b.tablespace_name dummy,
sum(b.bytes)/count(distinct a.file_id||'.'||a.block_id) bytes,
sum(b.bytes)/count(distinct a.file_id||'.'||a.block_id) -
sum(a.bytes)/count(distinct b.file_id) used,
sum(a.bytes)/count(distinct b.file_id) free,
100 * ((sum(b.bytes)/count(distinct a.file_id||'.'||a.block_id)) -
(sum(a.bytes)/count(distinct b.file_id)))/
(sum(b.bytes)/count(distinct a.file_id||'.'||a.block_id)) pct_used
from sys.dba_free_space a, sys.dba_data_files b
where a.tablespace_name = b.tablespace_name
group by a.tablespace_name, b.tablespace_name;
:Oracleで
、私はこのような何かを行うことができますか?
select_str(a.tabname、1,30)、(a.fpages * PAGESIZE/1024)をsize_k、a.cardをsyscat.tables a、syscat.tablespaces bから選択します。ここでa.TBSPACEID = b.TBSPACEID ; tabschema、tabnameによるSYSIBMADM.ADMINTABINFOグループからのSUM(DATA_OBJECT_P_SIZE)+ SUM(INDEX_OBJECT_P_SIZE)+ SUM(LONG_OBJECT_P_SIZE)+ SUM(LOB_OBJECT_P_SIZE)+ SUM(XML_OBJECT_P_SIZE)からのTABSCHEMA、 –