oracle 10g rac+asm 归档路径磁盘组空间满问题处理
本帖最后由 paulyi 于 2014-2-10 15:55 编辑
1 概述 问题简述:10g RAC+ASM 归档路径dbrecover磁盘组空间满,导致日志无法切换,数据库hang住,原因是legato备份软件出问题后,没有及时备走归档日志。
2 问题描述
巡检查看数据库日志,一直报在线重做日志无法归档,通过咨询用户,说前台业务也受到影响。
3 处理过程
1. 查看归档目录磁盘组剩余空间SQL> archive log list Database log mode Archive ModeAutomatic archival EnabledArchive destination USE_DB_RECOVERY_FILE_DESTOldest online log sequence 18724Next log sequence to archive 18728Current log sequence 18728
Show parameter db_recovery_file
db_recovery_file_dest string +DGRECOVERdb_recovery_file_dest_size big integer 48G
[oracle@dbsvr4:/oracle/app/oracle/script]$export ORACLE_SID=+ASM1[oracle@dbsvr4:/oracle/app/oracle/script]$asmcmdASMCMD> lsdgState Type Rebal Unbal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks NameMOUNTED EXTERN N N 512 4096 1048576 51200 91 0 32476 0 DGRECOVER/
2.由于是asm磁盘组,无法通过操作系统cp命令把归档日志拷贝到文件系统中,只能用BACKUP ARCHIVELOG delete input 命令来移走部分归档文件到磁盘中。运行脚本如下:rman target sys/sys@gn2connect catalog rman/rman@rmanBACKUP ARCHIVELOG FROM LOGSEQ 17828 UNTIL LOGSEQ 17869 THREAD 2 format /bak/U%_arc.bak delete input;
3. 用以上命令备份归档成功后,大约删除10g的归档容量,这时日志切换和应用恢复正常。
4. 解决legato备份软件问题后,用备份软件备份剩余归档日志到磁带中。
5. 恢复17828到17869段的归档日志运行脚本如下:rman target sys/sys@gn2connect catalog rman/rman@rmanRMAN> restore archivelog from logseq 17828 until logseq 17869 thread 2;archive log thread=2 sequence=17869channel ORA_DISK_1: reading from backup piece /bak/U%_arc.bakchannel ORA_DISK_1: restored backup piece 1piece handle=/bak/U%_arc.bak tag=TAG20091118T112811channel ORA_DISK_1: restore complete, elapsed time: 00:03:38Finished restore at 18-NOV-09
6. 再用备份软件备走恢复的归档日志,这是查看dgrecover磁盘组,空间已经释放ASMCMD> lsdgState Type Rebal Unbal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks NameMOUNTED EXTERN N N 512 4096 1048576 204800 158607 0 158607 0 DGDATA/MOUNTED EXTERN N N 512 4096 1048576 51200 41199 0 31199 0 DGRECOVER/MOUNTED EXTERN N N 512 4096 1048576 51200 6211 0 6211 0 DGSYSTEM/ASMCMD> 4 总结在备份与恢复指定的归档日志时,一定要加上日志对应的实例thread 号,因为是RAC模式,要不报找不到备份集的错误。released channel: t1RMAN-00571: ===========================================================RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============RMAN-00571: ===========================================================RMAN-03002: failure of restore command at 11/18/2009 16:17:03RMAN-06026: some targets not found - aborting restoreRMAN-06102: no channel to restore a backup or copy of log thread 1 seq 17869 lowscn 1156551412RMAN-06102: no channel to restore a backup or copy of log thread 1 seq 17868 lowscn 1156320510RMAN-06102: no channel to restore a backup or copy of log thread 1 seq 17867 lowscn 1156320475