脚本实现查看表空间使用情况
2013-12-02 14:18
579 查看
#!/bin/bash
source ~/.bash_profile
. /home/ora10/system_tablespace
sqlplus -S oracle/hao12345@hxy <<EOF
col BYTES_USED for 9999999999999
set feed off
set linesize 100
set pagesize 200
spool /home/ora10/tablespace.alert
select a.tablespace_name,a.bytes bytes_used,b.largest,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;
spool off
exit;
EOF
source ~/.bash_profile
. /home/ora10/system_tablespace
sqlplus -S oracle/hao12345@hxy <<EOF
col BYTES_USED for 9999999999999
set feed off
set linesize 100
set pagesize 200
spool /home/ora10/tablespace.alert
select a.tablespace_name,a.bytes bytes_used,b.largest,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;
spool off
exit;
EOF
相关文章推荐
- Shell脚本实现监控swap空间使用情况和查看占用swap的进程
- Shell脚本实现监控swap空间使用情况和查看占用swap的进程
- unix自动登录Telnet,实现查看多台服务器硬盘及数据表空间使用情况
- Oracle常用脚本-查看表空间使用情况
- Shell脚本实现硬盘空间和表空间的使用情况统计并邮件通知
- Oracle 查看表空间的大小及使用情况sql语句和oracle增加表空间大小两种实现方法
- Shell脚本实现硬盘空间和表空间的使用情况统计并邮件通知
- unix自动登录Telnet,实现查看多台服务器硬盘及数据表空间使用情况
- 对Guava Cache的封装和使用(包括一个管理页面实现了查看统计信息、情况、查看记录等)
- DB2查看表空间大小及使用情况
- Oracle 查看表空间、数据文件的大小及使用情况
- 自动检查磁盘空间,内存和IO使用情况脚本
- linux 查看内存使用free命令 查看空间使用du命令 查看磁盘分区情况df命令
- 请实现一个算法,在不使用额外数据结构和储存空间的情况下,翻转一个给定的字符串(可以使用单个过程变量)。 给定一个string iniString,请返回一个string,为翻转后的字符串。保证字符串的
- Oracle查看表空间的大小及使用情况sql语句
- 查看ORACLE各表空间使用情况
- nagios监控redis内存使用情况脚本--shell实现
- Win10怎么查看磁盘空间使用情况?Win10查看系统磁盘空间使用情况的方法
- 查看oracle空间使用情况
- Oracle 查看表空间的大小及使用情况sql语句