中文字幕av专区_日韩电影在线播放_精品国产精品久久一区免费式_av在线免费观看网站

溫馨提示×

oracle數據庫表空間使用率查詢

小樊
86
2024-07-16 02:03:43
欄目: 云計算

To check the tablespace usage in an Oracle database, you can query the DBA_TABLESPACES view. Here is an example SQL query that will show the usage of each tablespace in the database:

SELECT tablespace_name,
       ROUND((1 - (free_space / total_space)) * 100, 2) AS used_percent
FROM
  (SELECT tablespace_name,
          SUM(bytes) / 1024 / 1024 AS total_space,
          SUM(maxbytes) / 1024 / 1024 AS max_space,
          SUM(bytes - decode(autoextensible, 'YES', maxbytes, bytes)) / 1024 / 1024 AS free_space
   FROM dba_data_files
   GROUP BY tablespace_name);

This query will return the name of each tablespace in the database along with the percentage of space that is currently being used. The used_percent column will show how much of each tablespace is currently in use.

0
连城县| 都兰县| 华容县| 湟中县| 于田县| 周口市| 宁河县| 石门县| 海原县| 东台市| 贺州市| 东乌珠穆沁旗| 三原县| 新郑市| 荔波县| 西青区| 宣恩县| 遂溪县| 茶陵县| 鹤山市| 江陵县| 南昌县| 沭阳县| 灵丘县| 涞源县| 兰州市| 梅河口市| 迁安市| 丰都县| 新化县| 虎林市| 云林县| 息烽县| 郯城县| 高淳县| 甘谷县| 诸城市| 轮台县| 寻乌县| 措勤县| 乌拉特中旗|