首页 > Linux操作系统 > Linux操作系统 > Oracle DB 日常保養腳本
select * from gv$resource_limit where resource_name = 'sessions';
select owner,object_name,created,last_ddl_time,status from dba_objects where status='INVALID' and object_type <> 'SYNONYM';
select round(sum(a.bytes_alloc)/1024/1024/1024,2) "Tablespace_all_size(G)",
round( (sum(a.bytes_alloc)-sum(nvl(b.bytes_free, 0)))/1024/1024/1024,3) "Tablespace_used_size(G)"
from ( select f.tablespace_name,
sum(f.bytes) bytes_alloc
from dba_data_files f
group by tablespace_name) a,
( select f.tablespace_name,
sum(f.bytes) bytes_free
from dba_free_space f
group by tablespace_name) b
where a.tablespace_name = b.tablespace_name (+) ;
select job,schema_user,last_date,next_date,failures,what from dba_jobs order by schema_user;
大家日常檢查的時候增加一項,確認Linux機器的磁盤不做定期的磁盤檢查,以免影響開啟速度,誤以為機器掛掉
以下是實例
# tune2fs -i 0 -c 0 /dev/sdb1
# tune2fs -l /dev/sdb1
root下麵執行
上面意思是取消sdb1的磁盤掛載次數及未關機天數設置
重點的/u01 /data /data1 /data2 大數據量的分區 需要取消磁盤檢查
100
# tune2fs -i 0 -c 0 /dev/sdb1
# tune2fs -l /dev/sdb1
# tune2fs -i 10 -c 80 /dev/sda8
# tune2fs -l /dev/sda8
10.161.8.71
# tune2fs -i 0 -c 0 /dev/sda8
# tune2fs -l /dev/sda8
10.161.8.72
# tune2fs -i 0 -c 0 /dev/sda5
# tune2fs -l /dev/sda8
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/25198367/viewspace-688880/ ,如需转载,请注明出处,否则将追究法律责任。