看到IamDBA又改回了原来的AnySQL,感触颇深。最搞笑的是,Eygle还就此发表了自己的评论。想想自己的Blog名字一直留空,于是干脆把自己的Blog名字改为了现在的“Ask Corrs”,嘿嘿……极度恶心吧。
内容
|
数据库是否处于归档模式
|
||
检查方法
|
sqlplus sys/......
SQL>archive log list;
看数据库是否处于归档模式,并启动了自动归档进程
|
||
检查结果
|
◆正常 □异常
|
||
备注
|
|
||
|
|||
内容
|
文件系统使用情况
|
||
检查方法
|
执行df –k,检查有没有使用率超过80%的文件系统,特别是存放归档日志的文件系统
|
||
检查结果
|
◆正常 □异常
|
||
备注
|
|
||
|
|||
内容
|
alert_SID.log文件
|
||
检查方法
|
检查alert_SID.log有无报错信息(ORA-600、ORA-1578)、ORA-60
|
||
检查结果
|
◆正常 □异常
|
||
备注
|
|
||
|
|||
内容
|
备份文件是否正常
|
||
检查方法
|
检查文件大小及生成日期
检查export的日志文件
用imp工具生成建表脚本,看能否正常完成
imp system/.... file=backup.dmp rows=n indexfile=backup.sql
|
||
检查结果
|
◆正常 □异常
|
||
备注
|
|
||
|
|||
内容
|
表空间使用情况
|
||
检查方法
|
col tablespace_name form a25
select tablespace_name,
count(*) chunks,
max(bytes)/1024/1024 max_chunk,
sum(bytes)/1024/1024 total_space
from dba_free_space
group by tablespace_name;
如果最大可用块(max_chunk)与总大小(total_space)相比太小,要考虑接合表空间碎片或重建某些数据库对象。
碎片接合的方法:
alter tablespace 表空间名 coalesce;
|
||
检查结果
|
◆正常 □异常
|
||
备注
|
|
||
|
|||
内容
|
数据库对象的存储参数设置
|
||
检查方法
|
select segment_name,
next_extent,
tablespace_name
from dba_segments
where next_extent >[上一个检查中的最小的max_chunk]
如果有结果返回,说明有些对象的下一次扩展(从表空间的空闲区中分配空间的操作)会失败
|
||
检查结果
|
◆正常 □异常
|
||
备注
|
|
||
|
|||
内容
|
检查是否有超过200个extent的对象
|
||
检查方法
|
select segment_name,
tablespace_name,
extents
from dba_segments
where owner not in ('SYS','SYSTEM')
and extents >200;
如果有结果返回,说明这些对象分配了太多的extent,可以考虑重建这些对象。
|
||
检查结果
|
◆正常 □异常
|
||
备注
|
|
||
|
|||
内容
|
检查是否有失效的索引
|
||
检查方法
|
select index_name,
owner,
table_name,
tablespace_name
from dba_indexes
where owner not in ('SYS','SYSTEM')
and status != 'VALID';
如果有记录返回,考虑重建这些索引
|
||
检查结果
|
◆正常 □异常
|
||
备注
|
|
||
|
|||
内容
|
检查是否有无效的对象
|
||
检查方法
|
select object_name,
object_type,
owner,
status
from dba_objects
where status !='VALID'
and owner not in ('SYS','SYSTEM')
and object_type in
('TRIGGER','VIEW','PROCEDURE','FUNCTION');
如果存在无效的对象,手工重新编译一下。
|
||
检查结果
|
□正常 □异常
|
||
备注
|
|
||
|
|||
内容
|
检查Sequence的使用
|
||
检查方法
|
select sequence_owner,
sequence_name,
min_value,
max_value,
increment_by,
last_number,
cache_size,
cycle_flag
from dba_sequences;
检查是否存在即将达到max_value的sequence
|
||
检查结果
|
◆正常 □异常
|
||
备注
|
|
||
|
|||
内容
|
检查有无运行失败的JOB
|
||
检查方法
|
select job,
this_date,
this_sec,
next_date,
next_sec,
failures,
what
from dba_jobs
where failures !=0 or failures is not null;
|
||
检查结果
|
◆正常 □异常
|
||
备注
|
|
||
|
|||
内容
|
检查SGA使用情况
|
||
检查方法
|
select * from v$sga;
检查SGA各部份的分配情况,与实际内存比较是否合理
|
||
检查结果
|
□正常 □异常
|
||
备注
|
|
||
|
|||
内容
|
检查SGA各部分占用内存情况
|
||
检查方法
|
select * from v$sgastat;
检查有无占用大量Shared pool的对象,及是否有内存浪费情况
|
||
检查结果
|
□正常 □异常
|
||
备注
|
|
||
内容
|
检查回滚段使用情况
|
||
检查方法
|
select n.name,
wraps,
extends,
shrinks,
optsize,
waits,
xacts,
aveactive,
hwmsize
from v$rollstat r, v$rollname n
where r.usn=n.usn;
检查回滚段的shrink和extends次数是否过多。
检查optimal设置是否合理,是否占用了过多的回滚段表空间
|
||
检查结果
|
□正常 □异常
|
||
备注
|
|
||
|
|||
内容
|
|