查詢臨時(shí)表空間
在德陽(yáng)等地區(qū),都構(gòu)建了全面的區(qū)域性戰(zhàn)略布局,加強(qiáng)發(fā)展的系統(tǒng)性、市場(chǎng)前瞻性、產(chǎn)品創(chuàng)新能力,以專注、極致的服務(wù)理念,為客戶提供成都網(wǎng)站建設(shè)、成都網(wǎng)站設(shè)計(jì) 網(wǎng)站設(shè)計(jì)制作按需定制設(shè)計(jì),公司網(wǎng)站建設(shè),企業(yè)網(wǎng)站建設(shè),成都品牌網(wǎng)站建設(shè),成都全網(wǎng)營(yíng)銷推廣,外貿(mào)網(wǎng)站建設(shè),德陽(yáng)網(wǎng)站建設(shè)費(fèi)用合理。SELECT tt.con_id
,nvl(x.name, 'CDB$ROOT') AS DB_NAME
,ts1.tablespace_name AS "RES_NAME"
,round(nvl(tt.tmp_max_size, 0) / 1024 / 1024, 2) AS "TABLE_SIZE"
,round(nvl(tu.tmp_used_size, 0) / 1024 / 1024, 2) AS "USED_SIZE"
,CASE?
WHEN tt.tmp_space = 0
THEN 0
ELSE ROUND((nvl(tu.tmp_used_size, 0) * 100 / tt.tmp_max_size), 2)
END AS "USE_PERCENT"
,round((nvl(tt.tmp_max_size, 0) - nvl(tu.tmp_used_size, 0)) / 1024 / 1024, 2) AS "AVA_SIZE"
,ts1.CONTENTS AS "CONTENTS"
,ts1.STATUS AS "STATUS"
,ts1.ALLOCATION_TYPE AS "ALLOCATION_TYPE"
,tt.tmp_file_count AS "FILE_COUNT"
,CASE?
WHEN tt.tmp_auto_extens_c > 0
THEN 'YES'
ELSE 'NO'
END AS "AUTOEXTENSIBLE"
FROM cdb_tablespaces ts1
,v$pdbs x
,(
SELECT tablespace_name
,sum(nvl(bytes, 0)) / 1024 tmp_space
,con_id
,SUM(decode(AUTOEXTENSIBLE, 'YES', nvl(MAXBYTES, 0), nvl(bytes, 0))) / 1024 / 1024 tmp_max_size
,count(*) tmp_file_count
,sum(decode(AUTOEXTENSIBLE, 'YES', 1, 0)) tmp_auto_extens_c
FROM cdb_temp_files
GROUP BY tablespace_name
,con_id
) tt
,(
SELECT tablespace_name
,SUM(nvl(bytes_cached, 0)) / 1024 / 1024 tmp_used_size
FROM gv$temp_extent_pool
GROUP BY tablespace_name)tu
WHERE tt.tablespace_name = tu.tablespace_name
AND ts1.extent_management LIKE 'LOCAL'
AND ts1.contents LIKE 'TEMPORARY'
AND tt.tablespace_name = ts1.TABLESPACE_NAME
AND tt.con_id = ts1.CON_ID
AND ts1.con_id = x.con_id(+)
查詢undo和數(shù)據(jù)表空間
SELECT d.con_id
,nvl(x.name, 'CDB$ROOT') AS DB_NAME
,d.tablespace_name AS "RES_NAME"
,round(d.max_size / 1024 / 1024, 2) AS "TABLE_SIZE"
,round((d.SPACE - NVL(f.FREE_SPACE, 0)) / 1024 / 1024, 2) AS "USED_SIZE"
,CASE?
WHEN d.space = 0
THEN 0
ELSE ROUND(((d.SPACE - NVL(f.FREE_SPACE, 0)) * 100 / d.max_size), 2)
END AS "USE_PERCENT"
,round((d.max_size - d.space + NVL(f.FREE_SPACE, 0)) / 1024 / 1024, 2) AS "AVA_SIZE"
,ts.CONTENTS AS "CONTENTS"
,CASE?
WHEN ts.STATUS = 'READ ONLY'
AND d.offline_c = d.file_count
THEN 'OFFLINE(READ_ONLY)'
ELSE ts.STATUS
END AS "STATUS"
,ts.ALLOCATION_TYPE AS "ALLOCATION_TYPE"
,d.file_count AS "FILE_COUNT"
,CASE?
WHEN d.auto_extens_c > 0
THEN 'YES'
ELSE 'NO'
END AS "AUTOEXTENSIBLE"
FROM cdb_tablespaces ts
,v$pdbs x
,(
SELECT TABLESPACE_NAME
,con_id
,SUM(nvl(BYTES, 0)) / 1024 SPACE
,sum(decode(autoextensible, 'YES', nvl(maxbytes, 0), nvl(bytes, 0))) / 1024 max_size
,sum(decode(ONLINE_STATUS, 'OFFLINE', 1, 0)) offline_c
,count(*) file_count
,sum(decode(autoextensible, 'YES', 1, 0)) auto_extens_c
FROM cdb_DATA_FILES
GROUP BY TABLESPACE_NAME
,con_id
) d
,(
SELECT TABLESPACE_NAME
,SUM(nvl(BYTES, 0)) / 1024 FREE_SPACE
,con_id
FROM cdb_FREE_SPACE
GROUP BY TABLESPACE_NAME
,con_id
) f
WHERE d.TABLESPACE_NAME = f.TABLESPACE_NAME
AND d.con_id = f.con_id
AND ts.TABLESPACE_NAME = d.TABLESPACE_NAME
AND ts.con_id = d.con_id
AND ts.con_id = x.con_id(+)
另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)cdcxhl.cn,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時(shí)售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國(guó)服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡(jiǎn)單易用、服務(wù)可用性高、性價(jià)比高”等特點(diǎn)與優(yōu)勢(shì),專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場(chǎng)景需求。
當(dāng)前標(biāo)題:oracle12c、18c、19c表空間使用率查詢-創(chuàng)新互聯(lián)
網(wǎng)站鏈接:http://aaarwkj.com/article28/jcijp.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供Google、網(wǎng)站導(dǎo)航、網(wǎng)站建設(shè)、商城網(wǎng)站、小程序開發(fā)、外貿(mào)網(wǎng)站建設(shè)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容