数据库|mysql教程
Oracle,数据库,空间,容量,调整,脚本
数据库-mysql教程
闲来十三水源码,ubuntu安装gdk,Tomcat7在mye,爬虫视频自学,PHP一定要用框架吗,百度seo哪年推广的lzw
(表空间缩容脚本)] –1、获取需要释放空间的表空间信息(包含oracle database自有表空间) –drop table system.tbs_detail; create table system.tbs_detail as select a.tablespace_name, a.bytes/1024/1024 Sum_MB, (a.bytes-b.bytes)/1024/1024 used_MB, b
最好的影视收费系统源码,vscode无法进行调试,ubuntu host,tomcat配置反向代理,sqlite 星期,温州制作网页设计,mysql数据库5.0,虚拟服务器域名修改,织梦伪静态插件,前端网页一般用什么框架,爬虫res,php微信授权登录,论坛如何seo,springboot的跳转,css div实现标签卡tab效果,php淘宝商城网站源码,项目介绍网页模板免费下载,织梦会员登陆模板,wdcp后台进不去了,jq点击关闭当前页面,直销会员管理系统源码,离散粒子群算法matlab程序lzw
最全四大神兽源码和教程,ubuntu上网痕迹清理,爬虫采集最佳方案,手机php文件批量转mp4,廊坊seo攻略lzw
(表空间缩容脚本)]
–1、获取需要释放空间的表空间信息(包含oracle database自有表空间)
–drop table system.tbs_detail;
create table system.tbs_detail as select
a.tablespace_name,
a.bytes/1024/1024 “Sum_MB”,
(a.bytes-b.bytes)/1024/1024 “used_MB”,
b.bytes/1024/1024 “free_MB”,
round(((a.bytes-b.bytes)/a.bytes)*100,2) “percent_used”
from
(select tablespace_name,sum(bytes) bytes from dba_data_files group by tablespace_name) a,
(select tablespace_name,sum(bytes) bytes,max(bytes) largest from dba_free_space group by tablespace_name) b
where a.tablespace_name=b.tablespace_name
order by ((a.bytes-b.bytes)/a.bytes) desc;
–select * from system.tbs_detail order by “Sum_MB” desc,”free_MB” desc;
–2、获取需要释放空间的应用表空间数据文件使用情况
–drop table system.datafile_space;
create table system.datafile_space as
select a.TABLESPACE_NAME,
a.FILE_NAME,
a.BYTES / 1024 / 1024 total,
b.sum_free / 1024 / 1024 free
from dba_data_files a,
(select file_id, sum(bytes) sum_free
from dba_free_space
group by file_id) b
where a.FILE_ID = b.file_id
and a.TABLESPACE_NAME in (select tablespace_name
from system.tbs_detail
where (tablespace_name like ‘%CQLT%’ or
tablespace_name like ‘%CQST%’
or tablespace_name like ‘TS%’ or tablespace_name like ‘IDX%’
or tablespace_name like ‘%HX%’)
and “Sum_MB” > 100);
–select * from system.datafile_space;
–3、生成数据文件大小重置脚本,,在每个数据文件当前实际使用空间大小基础上增加 100m 空间
select ‘alter database datafile ”’ || file_name || ”’ resize ‘ ||
round(to_number(total – free + 100),0) || ‘ M;’
from system.datafile_space;
–查看 ASM 磁盘组使用情况
sqlplus / as sysdba <
set feed off
set linesize 200
set pagesize 200
set echo off
spool /home/oracle/check_log/chktbs.log append
select name,state,type,total_mb,free_mb from v$asm_diskgroup;
spool off
quit
EOF