Oracle数据库日常检查

上传人:豆浆 文档编号:2038963 上传时间:2017-07-19 格式:DOC 页数:9 大小:349.50KB
返回 下载 相关 举报
Oracle数据库日常检查_第1页
第1页 / 共9页
Oracle数据库日常检查_第2页
第2页 / 共9页
Oracle数据库日常检查_第3页
第3页 / 共9页
Oracle数据库日常检查_第4页
第4页 / 共9页
Oracle数据库日常检查_第5页
第5页 / 共9页
点击查看更多>>
资源描述

《Oracle数据库日常检查》由会员分享,可在线阅读,更多相关《Oracle数据库日常检查(9页珍藏版)》请在金锄头文库上搜索。

1、Oracle 数据库日常检查A. 查看所有的实例及其后台进程是否正常确认所有的 instance 工作正常,登陆到所有的数据库或 instance 上,检测 oracle 后台进程$env | grep SIDORACLE_SID=UWNMS3B检查文件系统的使用情况如果文件系统的剩余空间小于 10,则需要删除不必要的文件以释放空间。$df -hFilesystem size used avail capacity Mounted on/dev/md/dsk/d0 20G 17G 3.1G 85% /proc 0K 0K 0K 0% /procmnttab 0K 0K 0K 0% /etc/m

2、nttabfd 0K 0K 0K 0% /dev/fdswap 85G 192K 85G 1% /var/rundmpfs 85G 0K 85G 0% /dev/vx/dmpdmpfs 85G 0K 85G 0% /dev/vx/rdmpswap 85G 213M 85G 1% /tmp/dev/vx/dsk/data10dg/Ora_File_Vol01394G 292G 98G 75% /data05/dev/vx/dsk/data1dg/vola0131443G 156G 283G 36% /archivelogAIX:$df g or df kHP-UX$bdf or df k or

3、df -h注意:需要特别关注根目录,数据库软件和数据库备份所在目录的剩余空间情况!备注:数据库运行日志的及时清除1). 可清除 bdump,cdump,udump 下的相关日志$ cd $ORACLE_BASE/admin/db_name/bdump$ ls -ltotal 174-rwxrwxrwx 1 oracle dba 59047 Jul 30 22:02 alert_UWNMS1.log-rwxrwxrwx 1 oracle dba 1000 Jul 14 22:00 uwnms1_j000_18128.trc-rw-r- 1 oracle dba 1000 Jul 22 22:00

4、 uwnms1_j001_5369.trc-rwxrwxrwx 1 oracle dba 695 Jul 14 19:12 uwnms1_lgwr_18100.trc-rwxrwxrwx 1 oracle dba 2668 Jul 30 22:02 uwnms1_lgwr_19661.trc-rwxrwxrwx 1 oracle dba 983 Jul 14 17:36 uwnms1_lgwr_7816.trc-rwxrwxrwx 1 oracle dba 955 Jul 14 19:11 uwnms1_lgwr_7883.trc-rwxrwxrwx 1 oracle dba 803 Jul

5、14 17:31 uwnms1_p000_7714.trc-rwxrwxrwx 1 oracle dba 801 Jul 14 17:31 uwnms1_p001_7716.trc$ cd ./cdump$ ls -ltotal 4drwxr-x- 2 oracle dba 512 Jul 25 14:12 core_18095drwxr-x- 2 oracle dba 512 Jul 25 19:17 core_25934$ cd ./udump$ ls -ltotal 20042-rw-r- 1 oracle dba 505 Jul 16 16:33 uwnms1_ora_14771.tr

6、c-rw-r- 1 oracle dba 4516169 Jul 25 14:12 uwnms1_ora_18095.trc-rwxrwxrwx 1 oracle dba 644 Jul 14 19:12 uwnms1_ora_18119.trc-rw-r- 1 oracle dba 505 Jul 30 15:11 uwnms1_ora_18820.trc-rwxrwxrwx 1 oracle dba 774 Jul 15 10:23 uwnms1_ora_19573.trc-rwxrwxrwx 1 oracle dba 587 Jul 15 10:23 uwnms1_ora_19645.t

7、rc-rwxrwxrwx 1 oracle dba 644 Jul 15 10:23 uwnms1_ora_19680.trc-rw-r- 1 oracle dba 720942 Jul 15 16:28 uwnms1_ora_24759.trc-rw-r- 1 oracle dba 4951562 Jul 25 19:17 uwnms1_ora_25934.trc-rw-r- 1 oracle dba 505 Jul 15 17:21 uwnms1_ora_27326.trc-rw-r- 1 oracle dba 503 Jul 30 16:54 uwnms1_ora_6612.trc-rw

8、xrwxrwx 1 oracle dba 585 Jul 14 17:12 uwnms1_ora_7523.trc-rwxrwxrwx 1 oracle dba 767 Jul 14 17:30 uwnms1_ora_7566.trc2). 可清除 oracle 的监听日志$ cd $ORACLE_HOME/network/log$ ls -ltotal 533072-rwxrwxrwx 1 oracle dba 272507851 Jul 31 11:28 listener.log-rw-r-r- 1 oracle dba 257876 Jul 31 08:48 sqlnet.log$ cp

9、 /dev/null listener.logC查找警告日志文件1. 联接每一个操作管理系统2. 使用TELNET 或是可比较程序3. 对每一个管理实例,经常的执行$ORACLE_BASE/bdump 操作,并使其能回退到控制数据库的 SID。4. 在提示下,使用 UNIX 中的TAIL 命令查看 alert_.log,或是用其他方式检查文件中最近时期的警告日志5. 如果发现任何 ORA_ERRORS (ORA-XXX) 的错误,将它记录并且仔细的研究它们,或反馈给DB 组如何确定警告日志文件的路径? 通过参看起始参数文件 init.ora,而起始参数文件一般存储在$ORACLE_HOME/d

10、bs 下D检查数据库备份是否成功对 RMAN 备份方式:检查第三方备份工具的备份日志以确定备份是否成功如果具备恢复目录的,可直接登陆到 rman 环境下,发命令 list backup 查看具体备份集合的情况; $rman target / nocatalogRecovery Manager: Release 10.2.0.3.0 - Production on Thu Jul 31 11:39:37 2008Copyright (c) 1982, 2005, Oracle. All rights reserved.connected to target database: UWNMS3 (D

11、BID=2229785441)connected to recovery catalog databaseRMAN list backup; List of Backup Sets=BS Key Type LV Size Device Type Elapsed Time Completion Time - - - - - - -422624 Incr 0 12.59M DISK 00:00:07 2008-07-28 03:15:21BP Key: 422631 Status: AVAILABLE Compressed: YES Tag: BK0Piece Name: /export/home

12、/oracle/rman3/bk0_UWNMS3_20080728_2393List of Datafiles in backup set 422624File LV Type Ckp SCN Ckp Time Name- - - - - -2 0 Incr 35321096 2008-07-28 03:15:14 /archivelog/oradata/UWNMS3/undo01.dbf5 0 Incr 35321096 2008-07-28 03:15:14 /archivelog/oradata/UWNMS3/system2.dbf对 EXPORT,EXPDP 逻辑备份方式:检查 exp

13、,expdp 日志文件以确定备份是否成功对其他备份方式:检查相应的日志文件E检查表空间的使用情况1. 检查在表空间中有没有剩余空间。对每一个实例来说,检查在表空间中是否存在有剩余空间来满足当天的预期的需要。当数据库中已有的数据是稳定的,数据日增长的平均数也是可以计算出来,最小的剩余空间至少要能满足每天数据的增长。脚本:select t.tablespace_name, total, free, round(100*(1-(free/total),3)|% as 已使用的空间比例from (select tablespace_name, sum(bytes)/1024/1024 total from dba_data_files group by tablespace_name) t,(select tablespace_name, sum(bytes)/1024/1024 free from dba_free_space group by tablespace_name) f where t.tablespace_name=f.tablespace_name(+)and t.tablespace_name not in (DRSYS,ORDIM,SPATIAL

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 电子/通信 > 综合/其它

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号