Oracle数据库日常管理_项目现场篇修改:2010/2/8 A. 查看所有的实例及其后台进程是否正常确认所有的instance工作正常,登陆到所有的数据库或instance上,检测oracle后台进程GDDB4-/export/home/oracle> env | grep SIDORACLE_SID=UWNMS3GDDB4-/export/home/oracle> ps -ef|grep UWNMS3 | grep -v grep | grep oraoracle 25119 1 0 Jun 24 ? 0:04 ora_dbw4_UWNMS3oracle 25110 1 0 Jun 24 ? 3:20 ora_dbw1_UWNMS3oracle 25146 1 0 Jun 24 ? 0:00 ora_reco_UWNMS3oracle 25125 1 0 Jun 24 ? 0:09 ora_dbw5_UWNMS3oracle 25142 1 0 Jun 24 ? 5:41 ora_smon_UWNMS3oracle 25155 1 0 Jun 24 ? 1:17 ora_mmon_UWNMS3oracle 25152 1 0 Jun 24 ? 101:32 ora_cjq0_UWNMS3oracle 25102 1 0 Jun 24 ? 0:02 ora_mman_UWNMS3oracle 25108 1 0 Jun 24 ? 7:37 ora_dbw0_UWNMS3oracle 25478 1 0 Jun 24 ? 0:45 ora_arc1_UWNMS3oracle 25470 1 0 Jun 24 ? 0:47 ora_arc0_UWNMS3oracle 25159 1 0 Jun 24 ? 84:02 ora_mmnl_UWNMS3oracle 25094 1 0 Jun 24 ? 17:30 ora_pmon_UWNMS3oracle 25117 1 0 Jun 24 ? 0:41 ora_dbw3_UWNMS3oracle 25131 1 0 Jun 24 ? 13:12 ora_lgwr_UWNMS3oracle 20175 1 0 18:27:25 ? 0:00 ora_j000_UWNMS3oracle 25100 1 0 Jun 24 ? 1:10 ora_psp0_UWNMS3oracle 25113 1 0 Jun 24 ? 0:14 ora_dbw2_UWNMS3oracle 25135 1 0 Jun 24 ? 23:50 ora_ckpt_UWNMS3B.检查文件系统的使用情况如果文件系统的剩余空间小于10%,则需要删除不必要的文件以释放空间。
GDDB4-/export/home/oracle> 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/mnttabfd 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% /archivelog注意:需要特别关注根目录,数据库软件和数据库备份所在目录的剩余空间情况!备注:数据库运行日志的及时清除1). 可清除bdump,cdump,udump下的相关日志$ cd 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 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 14 17:31 uwnms1_p000_7714.trc -rwxrwxrwx 1 oracle dba 801 Jul 14 17:31 uwnms1_p001_7716.trc $ cp /dev/null alert_UWNMS1.log$ rm *.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.trc -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.trc -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 -rwxrwxrwx 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 /dev/null listener.logC.查找警告日志文件1. 联接每一个操作管理系统2. 使用‘TELNET’或是可比较程序3. 对每一个管理实例,经常的执行$ORACLE_BASE/<SID>/bdump 操作,并使其能回退到控制数据库的SID。
4. 在提示下,使用UNIX 中的‘TAIL’命令查看alert_<SID>.log,或是用其他方式检查文件中最近时期的警告日志5. 如果发现任何ORA_ERRORS (ORA-XXX) 的错误,将它记录并且仔细的研究它们,或反馈给DB组如何确定警告日志文件的路径?通过参看起始参数文件 init<SID>.ora,而起始参数文件一般存储在$ORACLE_HOME/dbs下$ cd $ORACLE_HOME/dbs$ cat initUWNMS1.ora*.background_dump_dest='/opt/oracle/product/10g/admin/UWNMS1/bdump'*.core_dump_dest='/opt/oracle/product/10g/admin/UWNMS1/cdump'*.user_dump_dest='/opt/oracle/product/10g/admin/UWNMS1/udump'D.检查数据库备份是否成功※对RMAN备份方式:检查第三方备份工具的备份日志以确定备份是否成功如果具备恢复目录的,可直接登陆到rman环境下,发命令list backup查看具体备份集合的情况;GDDB4-/> rman target=sys/xxx@uwnms3 catalog=rman/rman@uwnms3Recovery Manager: Release 10.2.0.3.0 - Production on Thu Jul 31 11:39:37 2008 Copyright (c) 1982, 2005, Oracle. All rights reserved.connected to target database: UWNMS3 (DBID=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/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,expdp日志文件以确定备份是否成功※对其他备份方式:检查相应的日志文件E.检查表空间的使用情况1. 检查在表空间中有没有剩余空间。