分析
使用rman删除归档出错,错误信息如下

从错误信息看,被删除的归档文件正在被使用。不管它是否真的正在被使用,我们假定ORACLE没有误报,首先应该检查是谁正在使用这个归档文件?
MOS上有一篇文档可以参考【ID 1472178.1】
The issue can be caused by any replication process running or hanging, holding this file.
For example a Golden Gate replication or shareplex replication process.
通常使用归档文件的都是一些数据同步软件,比如ogg或者文件同步(复制)软件,一旦复制进程挂起,该进程使用的文件就无法删除。可以通过停止并重启复制软件来释放文件上的锁。
文档摘录
SYMPTOMS
When rman backup is run, one of the old archive log is not deleted, and ORA-15028 is raised saying that it cannot be deleted and it is accessed by another process.
The file failed to be removed when tried through rman. And next failed to remove at OS level by connecting to asm when the database is shut down on all the nodes.
RMAN-03009:failure of delete command on ORA_DISK_1 channel at 06/30/2012
ORA-15028: ASM file '+TEST/mydb/archivelog/...' not dropped; currently being accessed
ASMCMD> ls -l Type Redund Striped Time Sys Name ARCHIVELOG UNPROT COARSE JUN 30 17:00:00 Y thread_3_seq_912.6629.785027243 ARCHIVELOG UNPROT COARSE JUN 30 17:00:00 Y thread_3_seq_913.4943.785027251 ARCHIVELOG UNPROT COARSE JUN 30 17:00:00 Y thread_3_seq_914.7770.785027269 ASMCMD> rm thread_3_seq_912.6629.785027243 ORA-15032: not all alterations performed ORA-15028: ASM file '+TEST/mydb/archivelog/2012_06_03/thread_3_seq_912.6629.785027243' not dropped; currently being accessed (DBD ERROR: OCIStmtExecute) |
CAUSE
The issue can be caused by any replication process running or hanging, holding this file.
For example a Golden Gate replication or shareplex replication process.
SOLUTION
Stop the replication process and try deleting the file uisng rman or ASMCMD.
You need to take care that the file is not needed by the replication process. And then you might have to disable or turn off the replication process.




