1、查询现有表空间数据量;
-- system: 查询表空间使用情况
SELECT upper(f.tablespace_name) "Tablespace_name",
round((d.Tot_grootte_Mb - f.total_bytes) / d.Tot_grootte_Mb * 100,2) " Used (%) ",
round(f.total_bytes / d.Tot_grootte_Mb * 100,2) "Free (%)",
round(d.Tot_grootte_Mb/1024,2) "Total (GB)",
round((d.Tot_grootte_Mb - f.total_bytes)/1024,2) " Used (GB)",
round(f.total_bytes/1024,2) " Free_space (GB) "
FROM
(SELECT tablespace_name,
round(SUM(bytes)/(1024*1024),2) total_bytes,
round(MAX(bytes)/(1024*1024),2) max_bytes
FROM sys.dba_free_space
GROUP BY tablespace_name) f,
(SELECT dd.tablespace_name, round(SUM(dd.bytes)/(1024*1024),2) Tot_gr
oracle数据归档方案
最新推荐文章于 2024-09-25 14:04:46 发布
本文介绍了Oracle数据库的归档方案,包括查询表空间使用情况、创建临时表、迁移历史数据到新表、导出与导入数据、验证数据条数、删除原始数据以及异常情况下的数据库恢复步骤。

最低0.47元/天 解锁文章
1110





